Skip to content

Commit

Permalink
Create new testnet list for amoy and cardona
Browse files Browse the repository at this point in the history
  • Loading branch information
py-zoid committed Feb 4, 2024
1 parent 8bb3bf2 commit 1b506f0
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const v2MappedTokens = require("./tokens/mappedTokens.json");
const v2PopularTokensTestnet = require("./tokens/defaultTokensTestnet.json");
const v2MappedTokensTestnet = require("./tokens/mappedTokensTestnet.json");
const v2PopularTokensStaging = require("./tokens/defaultTokensStaging.json");
const v2MappedTokensTestnetNew = require("./tokens/mappedTokensTestnetNew.json");
const polygonTokensTokenList = require("./metadata/polygonTokens.json");
const popularTokenList = require("./metadata/popularTokens.json");
const testnetTokenList = require("./metadata/testnetTokens.json");
Expand All @@ -26,6 +27,7 @@ const v2MappedTokenList = require("./metadata/mappedTokens.json");
const v2PopularTestnetTokenList = require("./metadata/defaultTokensTestnet.json");
const v2MappedTestnetTokenList = require("./metadata/mappedTokensTestnet.json");
const v2PopularTokenListStaging = require("./metadata/defaultTokensStaging.json");
const v2MappedTestnetNewTokenList = require("./metadata/mappedTokensTestnetNew.json");

// Remove the project information from lists
allPolygonTokens.forEach((token) => {
Expand Down Expand Up @@ -63,6 +65,10 @@ module.exports = function buildList() {
timestamp,
tokens: v2MappedTokensTestnet,
}); //v2 Mapped Testnet List
Object.assign(v2MappedTestnetNewTokenList, {
timestamp,
tokens: v2MappedTokensTestnetNew,
}); //v2 Mapped Testnet New List

Object.assign(allPolygonTokenList, { timestamp, tokens: allPolygonTokens }); // Aggregated Polygon Tokens List
Object.assign(allPolygonPopularTokenList, {
Expand Down Expand Up @@ -105,5 +111,6 @@ module.exports = function buildList() {
v2MappedTokenList,
v2PopularTestnetTokenList,
v2MappedTestnetTokenList,
v2MappedTestnetNewTokenList,
};
};
45 changes: 45 additions & 0 deletions src/metadata/mappedTokensTestnetNew.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "Mapped Tokens Testnet",
"version": 2,
"logoURI": "https://assets.polygon.technology/tokenAssets/matic.svg",
"description": "Contains tokens that are mapped to Polygon PoS and Polygon zkEVM. Anyone can propose updates to this list.",
"tags": {
"lxly": {
"name": "lxly",
"description": "Token mapped through lxly bride"
},
"pos": {
"name": "pos",
"description": "Token mapped through pos bride"
},
"plasma": {
"name": "plasma",
"description": "Token mapped through plasma bride"
},
"fx": { "name": "fx", "description": "Token mapped through fx bride" },
"zkevmMessageBridge": {
"name": "zkevmMessageBridge",
"description": "Token mapped through zkevmMessageBridge bride"
},
"customFx": {
"name": "customFx",
"description": "Token mapped through customFx bride"
},
"erc20": {
"name": "erc20",
"description": "Token of ERC20 token type"
},
"nativeToken": {
"name": "nativeToken",
"description": "Native token of the chain"
},
"customWithdrawEventSig": {
"name": "customWithdrawEventSig",
"description": "The token has a custom withdraw event signature"
},
"noDeposit": {
"name": "noDeposit",
"description": "Token not eligible for deposits"
}
}
}
1 change: 1 addition & 0 deletions src/tokens/mappedTokensTestnetNew.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
12 changes: 12 additions & 0 deletions src/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ fs.writeFile(
}
);

// v2 Mapped Testnet New List
fs.writeFile(
"build/tokenlists/mappedTestnetNew.tokenlist.json",
JSON.stringify(tokenlists.v2MappedTestnetNewTokenList, null, 2),
(err) => {
if (err) {
throw err;
}
console.log("mappedTestnetNew.tokenlist.json successfully built");
}
);

// Aggregated List
fs.writeFile(
"build/tokenlists/polygon.tokenlist.json",
Expand Down

0 comments on commit 1b506f0

Please sign in to comment.