diff --git a/lists/images/arbitrum/0x912CE59144191C1204E64559FE8253a0e49E6548.png b/lists/images/arbitrum/0x912CE59144191C1204E64559FE8253a0e49E6548.png new file mode 100644 index 00000000..5402ed6b Binary files /dev/null and b/lists/images/arbitrum/0x912CE59144191C1204E64559FE8253a0e49E6548.png differ diff --git a/lists/images/arbitrum/0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8.png b/lists/images/arbitrum/0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8.png new file mode 100644 index 00000000..eafbaac1 Binary files /dev/null and b/lists/images/arbitrum/0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8.png differ diff --git a/lists/pancakeswap-arbitrum-default.json b/lists/pancakeswap-arbitrum-default.json new file mode 100644 index 00000000..a0ee4601 --- /dev/null +++ b/lists/pancakeswap-arbitrum-default.json @@ -0,0 +1,65 @@ +{ + "name": "PancakeSwap Arbitrum Default", + "timestamp": "2023-08-07T03:09:58.256Z", + "version": { + "major": 0, + "minor": 0, + "patch": 3 + }, + "logoURI": "https://pancakeswap.finance/logo.png", + "keywords": [ + "pancakeswap", + "default", + "arbitrum" + ], + "tokens": [ + { + "name": "Wrapped Ether", + "symbol": "WETH", + "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "chainId": 42161, + "decimals": 18, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/weth.png" + }, + { + "name": "USD Coin", + "symbol": "USDC", + "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + "chainId": 42161, + "decimals": 6, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/usdc.png" + }, + { + "name": "Bridged USDC", + "symbol": "USDC.e", + "address": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8", + "chainId": 42161, + "decimals": 6, + "logoURI": "https://tokens.pancakeswap.finance/images/arbitrum/0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8.png" + }, + { + "name": "Tether USD", + "symbol": "USDT", + "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", + "chainId": 42161, + "decimals": 6, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/usdt.png" + }, + { + "name": "Arbitrum", + "symbol": "ARB", + "address": "0x912CE59144191C1204E64559FE8253a0e49E6548", + "chainId": 42161, + "decimals": 18, + "logoURI": "https://tokens.pancakeswap.finance/images/arbitrum/0x912CE59144191C1204E64559FE8253a0e49E6548.png" + }, + { + "name": "Wrapped BTC", + "symbol": "WBTC", + "address": "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + "chainId": 42161, + "decimals": 8, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/wbtc.png" + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json index d52ae2f3..203f1eb4 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,9 @@ "checksum:pcs-polygon-zkevm-default": "yarn build && node ./dist checksum pancakeswap-polygon-zkevm-default", "generate:pcs-polygon-zkevm-default": "yarn test --list=pancakeswap-polygon-zkevm-default && yarn build && node ./dist generate pancakeswap-polygon-zkevm-default", "makelist:pcs-polygon-zkevm-default": "yarn checksum:pcs-polygon-zkevm-default && yarn generate:pcs-polygon-zkevm-default", + "checksum:pcs-arbitrum-default": "yarn build && node ./dist checksum pancakeswap-arbitrum-default", + "generate:pcs-arbitrum-default": "yarn test --list=pancakeswap-arbitrum-default && yarn build && node ./dist generate pancakeswap-arbitrum-default", + "makelist:pcs-arbitrum-default": "yarn checksum:pcs-arbitrum-default && yarn generate:pcs-arbitrum-default", "checksum:pcs-eth-mm": "yarn build && node ./dist checksum pancakeswap-eth-mm", "generate:pcs-eth-mm": "yarn test --list=pancakeswap-eth-mm && yarn build && node ./dist generate pancakeswap-eth-mm", "makelist:pcs-eth-mm": "yarn checksum:pcs-eth-mm && yarn generate:pcs-eth-mm", diff --git a/src/buildList.ts b/src/buildList.ts index 97ec4d9a..d5d08f5e 100644 --- a/src/buildList.ts +++ b/src/buildList.ts @@ -15,10 +15,12 @@ import { version as coingeckoVersion } from "../lists/coingecko.json"; import { version as cmcVersion } from "../lists/cmc.json"; import { version as pancakeswapMiniVersion } from "../lists/pancakeswap-mini.json"; import { version as pancakeswapMiniExtendedVersion } from "../lists/pancakeswap-mini-extended.json"; +import { version as pancakeswapArbitrumVersion } from "../lists/pancakeswap-arbitrum-default.json"; import pancakeswapAptos from "./tokens/pancakeswap-aptos.json"; import pancakeswapDefault from "./tokens/pancakeswap-default.json"; import pancakeswapPolygonZkevmDefault from "./tokens/pancakeswap-polygon-zkevm-default.json"; import pancakeswapZksyncDefault from "./tokens/pancakeswap-zksync-default.json"; +import pancakeswapArbDefault from "./tokens/pancakeswap-arbitrum-default.json"; import pancakeswapEthDefault from "./tokens/pancakeswap-eth-default.json"; import pancakeswapEthMM from "./tokens/pancakeswap-eth-mm.json"; import pancakeswapExtended from "./tokens/pancakeswap-extended.json"; @@ -68,6 +70,14 @@ const lists = { sort: false, currentVersion: pancakeswapPolygonZkevmDefaultVersion, }, + "pancakeswap-arbitrum-default": { + list: pancakeswapArbDefault, + name: "PancakeSwap Arbitrum Default", + keywords: ["pancakeswap", "default", "arbitrum"], + logoURI: "https://pancakeswap.finance/logo.png", + sort: false, + currentVersion: pancakeswapArbitrumVersion, + }, "pancakeswap-eth-default": { list: pancakeswapEthDefault, name: "PancakeSwap Ethereum Default", diff --git a/src/checksum.ts b/src/checksum.ts index 81f1aaef..d67f9d03 100644 --- a/src/checksum.ts +++ b/src/checksum.ts @@ -5,6 +5,7 @@ import pancakeswapDefault from "./tokens/pancakeswap-default.json"; import pancakeswapEthDefault from "./tokens/pancakeswap-eth-default.json"; import pancakeswapZksyncDefault from "./tokens/pancakeswap-zksync-default.json"; import pancakeswapPolygonZkevmDefault from "./tokens/pancakeswap-polygon-zkevm-default.json"; +import pancakeswapArbitrumDefault from "./tokens/pancakeswap-arbitrum-default.json"; import pancakeswapEthMM from "./tokens/pancakeswap-eth-mm.json"; import pancakeswapBnbMM from "./tokens/pancakeswap-bnb-mm.json"; import pancakeswapExtended from "./tokens/pancakeswap-extended.json"; @@ -19,6 +20,7 @@ const lists = { "pancakeswap-default": pancakeswapDefault, "pancakeswap-eth-default": pancakeswapEthDefault, "pancakeswap-polygon-zkevm-default": pancakeswapPolygonZkevmDefault, + "pancakeswap-arbitrum-default": pancakeswapArbitrumDefault, "pancakeswap-zksync-default": pancakeswapZksyncDefault, "pancakeswap-eth-mm": pancakeswapEthMM, "pancakeswap-bnb-mm": pancakeswapBnbMM, diff --git a/src/ci-check.ts b/src/ci-check.ts index a677a445..8843de9f 100644 --- a/src/ci-check.ts +++ b/src/ci-check.ts @@ -1,6 +1,7 @@ import srcDefault from "./tokens/pancakeswap-default.json"; import srcEthDefault from "./tokens/pancakeswap-eth-default.json"; import srcPolygonZkevmDefault from "./tokens/pancakeswap-polygon-zkevm-default.json"; +import srcArbitrumDefault from "./tokens/pancakeswap-arbitrum-default.json"; import srcZksyncDefault from "./tokens/pancakeswap-zksync-default.json"; import srcExtended from "./tokens/pancakeswap-extended.json"; import srcTop100 from "./tokens/pancakeswap-top-100.json"; @@ -13,6 +14,7 @@ import defaultList from "../lists/pancakeswap-default.json"; import defaultEthList from "../lists/pancakeswap-eth-default.json"; import defaultPolygonZkevmList from "../lists/pancakeswap-polygon-zkevm-default.json"; import defaultZksyncList from "../lists/pancakeswap-zksync-default.json"; +import defaultArbitrumList from "../lists/pancakeswap-arbitrum-default.json"; import extendedtList from "../lists/pancakeswap-extended.json"; import top15List from "../lists/pancakeswap-top-15.json"; import top100tList from "../lists/pancakeswap-top-100.json"; @@ -42,6 +44,11 @@ const lists = [ src: srcPolygonZkevmDefault, actual: defaultPolygonZkevmList, }, + { + name: "pancakeswap-arbitrum-default", + src: srcArbitrumDefault, + actual: defaultArbitrumList, + }, { name: "pancakeswap-extended", src: srcExtended, diff --git a/src/tokens/pancakeswap-arbitrum-default.json b/src/tokens/pancakeswap-arbitrum-default.json new file mode 100644 index 00000000..4567037e --- /dev/null +++ b/src/tokens/pancakeswap-arbitrum-default.json @@ -0,0 +1,50 @@ +[ + { + "name": "Wrapped Ether", + "symbol": "WETH", + "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "chainId": 42161, + "decimals": 18, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/weth.png" + }, + { + "name": "USD Coin", + "symbol": "USDC", + "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + "chainId": 42161, + "decimals": 6, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/usdc.png" + }, + { + "name": "Bridged USDC", + "symbol": "USDC.e", + "address": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8", + "chainId": 42161, + "decimals": 6, + "logoURI": "https://tokens.pancakeswap.finance/images/arbitrum/0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8.png" + }, + { + "name": "Tether USD", + "symbol": "USDT", + "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", + "chainId": 42161, + "decimals": 6, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/usdt.png" + }, + { + "name": "Arbitrum", + "symbol": "ARB", + "address": "0x912CE59144191C1204E64559FE8253a0e49E6548", + "chainId": 42161, + "decimals": 18, + "logoURI": "https://tokens.pancakeswap.finance/images/arbitrum/0x912CE59144191C1204E64559FE8253a0e49E6548.png" + }, + { + "name": "Wrapped BTC", + "symbol": "WBTC", + "address": "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + "chainId": 42161, + "decimals": 8, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/wbtc.png" + } +] diff --git a/src/utils/multicall.ts b/src/utils/multicall.ts index c3ac9de2..b92b83be 100644 --- a/src/utils/multicall.ts +++ b/src/utils/multicall.ts @@ -8,6 +8,7 @@ const multicall = { [56]: "0xcA11bde05977b3631167028862bE2a173976CA11", [1101]: "0xcA11bde05977b3631167028862bE2a173976CA11", [324]: "0xF9cda624FBC7e059355ce98a31693d299FACd963", + [42161]: "0xcA11bde05977b3631167028862bE2a173976CA11", }; interface MultiCall { diff --git a/src/utils/simpleRpcProvider.ts b/src/utils/simpleRpcProvider.ts index cc5ea6e3..96dcbac2 100644 --- a/src/utils/simpleRpcProvider.ts +++ b/src/utils/simpleRpcProvider.ts @@ -9,12 +9,14 @@ const bscRpcProvider = new ethers.providers.StaticJsonRpcProvider(RPC_URL, 56); const ethRpcProvider = new ethers.providers.StaticJsonRpcProvider(ETH_RPC_URL, 1); const polygonZkevmRpcProvider = new ethers.providers.StaticJsonRpcProvider(POLYGON_ZKEVM_RPC_URL, 1101); const zksyncRpcProvider = new ethers.providers.StaticJsonRpcProvider(ZKSYNC_RPC_URL, 324); +const arbitrumRpcProvider = new ethers.providers.StaticJsonRpcProvider("https://arb1.arbitrum.io/rpc", 42161); const simpleRpcProvider = { [1]: ethRpcProvider, [56]: bscRpcProvider, [1101]: polygonZkevmRpcProvider, [324]: zksyncRpcProvider, + [42161]: arbitrumRpcProvider, }; export default simpleRpcProvider; diff --git a/test/default.test.ts b/test/default.test.ts index ccaa7b95..bfaff881 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -7,6 +7,7 @@ import pancakeswapSchema from "@pancakeswap/token-lists/schema/pancakeswap.json" import currentPancakeswapDefaultList from "../lists/pancakeswap-default.json"; import currentPancakeswapEthDefaultList from "../lists/pancakeswap-eth-default.json"; import currentPancakeswapZksyncDefaultList from "../lists/pancakeswap-zksync-default.json"; +import currentPancakeswapArbitrumDefaultList from "../lists/pancakeswap-arbitrum-default.json"; import currentPancakeswapPolygonZkevmDefaultList from "../lists/pancakeswap-polygon-zkevm-default.json"; import currentPancakeswapEthMMList from "../lists/pancakeswap-eth-mm.json"; import currentPancakeswapBnbMMList from "../lists/pancakeswap-bnb-mm.json"; @@ -32,6 +33,7 @@ const CASES = [ ["pancakeswap-eth-default"], ["pancakeswap-zksync-default"], ["pancakeswap-polygon-zkevm-default"], + ["pancakeswap-arbitrum-default"], ["pancakeswap-eth-mm"], ["pancakeswap-extended"], ["pancakeswap-top-100"], @@ -52,6 +54,7 @@ const currentLists = { "pancakeswap-bnb-mm": currentPancakeswapBnbMMList, "pancakeswap-eth-default": currentPancakeswapEthDefaultList, "pancakeswap-zksync-default": currentPancakeswapZksyncDefaultList, + "pancakeswap-arbitrum-default": currentPancakeswapArbitrumDefaultList, "pancakeswap-polygon-zkevm-default": currentPancakeswapPolygonZkevmDefaultList, "pancakeswap-extended": currentPancakeswapExtendedtList, "pancakeswap-top-100": currentPancakeswapTop100tList, @@ -88,6 +91,7 @@ const pathToImages = path.join(path.resolve(), "lists", "images"); const pathToEthImages = path.join(path.resolve(), "lists", "images", "eth"); const pathToZksyncImages = path.join(path.resolve(), "lists", "images", "zksync"); const pathToPolygonZkevmImages = path.join(path.resolve(), "lists", "images", "polygon-zkevm"); +const pathToARbImages = path.join(path.resolve(), "lists", "images", "arbitrum"); const logoFiles = fs .readdirSync(pathToImages, { withFileTypes: true }) @@ -109,11 +113,17 @@ const polygonZkevmLogoFiles = fs .filter((f) => f.isFile()) .filter((f) => !/(^|\/)\.[^\/\.]/g.test(f.name)); +const pathToARbImagesLogoFiles = fs + .readdirSync(pathToARbImages, { withFileTypes: true }) + .filter((f) => f.isFile()) + .filter((f) => !/(^|\/)\.[^\/\.]/g.test(f.name)); + const multiChainLogoPath = { [56]: "", [1]: "/eth", [1101]: "/polygon-zkevm", [324]: "/zksync", + [42161]: "/arbitrum", }; const multiChainLogoFiles = { @@ -121,6 +131,7 @@ const multiChainLogoFiles = { [1]: ethLogoFiles, [1101]: polygonZkevmLogoFiles, [324]: polygonZksyncFiles, + [42161]: pathToARbImagesLogoFiles, }; // Modified https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_get @@ -191,6 +202,13 @@ expect.extend({ // Note: fs.existsSync can't be used here because its not case sensetive hasLocalLogo = multiChainLogoFiles[token.chainId]?.map((f) => f.name).includes(fileName); } + + if (token.logoURI === `https://tokens.pancakeswap.finance/images/symbol/${token.symbol.toLowerCase()}.png`) { + return { + message: () => ``, + pass: true, + }; + } if (hasTWLogo || hasLocalLogo) { return { message: () => ``,