diff --git a/lists/images/linea/.gitkeep b/lists/images/linea/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/lists/pancakeswap-linea-default.json b/lists/pancakeswap-linea-default.json new file mode 100644 index 00000000..06935904 --- /dev/null +++ b/lists/pancakeswap-linea-default.json @@ -0,0 +1,57 @@ +{ + "name": "PancakeSwap Linea Default", + "timestamp": "2023-08-24T03:02:01.934Z", + "version": { + "major": 0, + "minor": 0, + "patch": 3 + }, + "logoURI": "https://pancakeswap.finance/logo.png", + "keywords": [ + "pancakeswap", + "default", + "linea" + ], + "tokens": [ + { + "name": "Wrapped Ether", + "symbol": "WETH", + "address": "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f", + "chainId": 59144, + "decimals": 18, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/weth.png" + }, + { + "name": "USD Coin", + "symbol": "USDC", + "address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff", + "chainId": 59144, + "decimals": 6, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/usdc.png" + }, + { + "name": "Tether USD", + "symbol": "USDT", + "address": "0xA219439258ca9da29E9Cc4cE5596924745e12B93", + "chainId": 59144, + "decimals": 6, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/usdt.png" + }, + { + "name": "Dai Stablecoin", + "symbol": "DAI", + "address": "0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5", + "chainId": 59144, + "decimals": 18, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/dai.png" + }, + { + "name": "Wrapped BTC", + "symbol": "WBTC", + "address": "0x3aAB2285ddcDdaD8edf438C1bAB47e1a9D05a9b4", + "chainId": 59144, + "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 a5614666..d61472ae 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,9 @@ "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-linea-default": "yarn build && node ./dist checksum pancakeswap-linea-default", + "generate:pcs-linea-default": "yarn test --list=pancakeswap-linea-default && yarn build && node ./dist generate pancakeswap-linea-default", + "makelist:pcs-linea-default": "yarn checksum:pcs-linea-default && yarn generate:pcs-linea-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 3c52c4c1..29b89a28 100644 --- a/src/buildList.ts +++ b/src/buildList.ts @@ -16,12 +16,14 @@ 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 { version as pancakeswapLineaVersion } from "../lists/pancakeswap-linea-default.json"; import { version as pancakeswapOnrampVersion } from "../lists/pancakeswap-onramp.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 pancakeswapLineaDefault from "./tokens/pancakeswap-linea-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"; @@ -64,6 +66,14 @@ const lists = { sort: false, currentVersion: pancakeswapZksyncDefaultVersion, }, + "pancakeswap-linea-default": { + list: pancakeswapLineaDefault, + name: "PancakeSwap Linea Default", + keywords: ["pancakeswap", "default", "linea"], + logoURI: "https://pancakeswap.finance/logo.png", + sort: false, + currentVersion: pancakeswapLineaVersion, + }, "pancakeswap-polygon-zkevm-default": { list: pancakeswapPolygonZkevmDefault, name: "PancakeSwap Zkevm Default", diff --git a/src/checksum.ts b/src/checksum.ts index 34128ded..847e790d 100644 --- a/src/checksum.ts +++ b/src/checksum.ts @@ -4,6 +4,7 @@ import { getAddress } from "@ethersproject/address"; import pancakeswapDefault from "./tokens/pancakeswap-default.json"; import pancakeswapEthDefault from "./tokens/pancakeswap-eth-default.json"; import pancakeswapZksyncDefault from "./tokens/pancakeswap-zksync-default.json"; +import pancakeswapLineaDefault from "./tokens/pancakeswap-linea-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"; @@ -22,6 +23,7 @@ const lists = { "pancakeswap-eth-default": pancakeswapEthDefault, "pancakeswap-polygon-zkevm-default": pancakeswapPolygonZkevmDefault, "pancakeswap-arbitrum-default": pancakeswapArbitrumDefault, + "pancakeswap-linea-default": pancakeswapLineaDefault, "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 88cdd58c..c4f49b9a 100644 --- a/src/ci-check.ts +++ b/src/ci-check.ts @@ -3,6 +3,7 @@ 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 srcLineaDefault from "./tokens/pancakeswap-linea-default.json"; import srcExtended from "./tokens/pancakeswap-extended.json"; import srcTop100 from "./tokens/pancakeswap-top-100.json"; import srcTop15 from "./tokens/pancakeswap-top-15.json"; @@ -16,6 +17,7 @@ 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 defaultLineaList from "../lists/pancakeswap-linea-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"; @@ -51,6 +53,11 @@ const lists = [ src: srcArbitrumDefault, actual: defaultArbitrumList, }, + { + name: "pancakeswap-linea-default", + src: srcLineaDefault, + actual: defaultLineaList, + }, { name: "pancakeswap-extended", src: srcExtended, diff --git a/src/fetchThirdPartyList.ts b/src/fetchThirdPartyList.ts index 3f2166b7..5b316cc7 100644 --- a/src/fetchThirdPartyList.ts +++ b/src/fetchThirdPartyList.ts @@ -36,6 +36,7 @@ const CMC_BAD_TOKENS = [ "0xcFA52F180538032402E0A2E702a4Da6fD1817fF5", // no a token "0x199e5A83509F35CD5Eb38a2D28B56A7Cd658E337", // no a token "0xBb6CD639724417A20a7db0F45C1fb2fE532f490A", // no a token + "0xCb73918ac58D0c90d71c7992637c61094c15305b", // self destruct ].map((a) => a.toLowerCase()); const badTokens = { diff --git a/src/tokens/cmc.json b/src/tokens/cmc.json index d97ff1a3..8b06c0d0 100644 --- a/src/tokens/cmc.json +++ b/src/tokens/cmc.json @@ -50927,14 +50927,6 @@ "decimals": 18, "logoURI": "https://s2.coinmarketcap.com/static/img/coins/64x64/19913.png" }, - { - "name": "Scorefam", - "symbol": "SFT", - "address": "0xCb73918ac58D0c90d71c7992637c61094c15305b", - "chainId": 56, - "decimals": 8, - "logoURI": "https://s2.coinmarketcap.com/static/img/coins/64x64/19914.png" - }, { "name": "Crypto Snack", "symbol": "SNACK", diff --git a/src/tokens/pancakeswap-linea-default.json b/src/tokens/pancakeswap-linea-default.json new file mode 100644 index 00000000..b25e826d --- /dev/null +++ b/src/tokens/pancakeswap-linea-default.json @@ -0,0 +1,42 @@ +[ + { + "name": "Wrapped Ether", + "symbol": "WETH", + "address": "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f", + "chainId": 59144, + "decimals": 18, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/weth.png" + }, + { + "name": "USD Coin", + "symbol": "USDC", + "address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff", + "chainId": 59144, + "decimals": 6, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/usdc.png" + }, + { + "name": "Tether USD", + "symbol": "USDT", + "address": "0xA219439258ca9da29E9Cc4cE5596924745e12B93", + "chainId": 59144, + "decimals": 6, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/usdt.png" + }, + { + "name": "Dai Stablecoin", + "symbol": "DAI", + "address": "0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5", + "chainId": 59144, + "decimals": 18, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/dai.png" + }, + { + "name": "Wrapped BTC", + "symbol": "WBTC", + "address": "0x3aAB2285ddcDdaD8edf438C1bAB47e1a9D05a9b4", + "chainId": 59144, + "decimals": 8, + "logoURI": "https://tokens.pancakeswap.finance/images/symbol/wbtc.png" + } +] diff --git a/src/utils/multicall.ts b/src/utils/multicall.ts index b92b83be..eca4cf2e 100644 --- a/src/utils/multicall.ts +++ b/src/utils/multicall.ts @@ -9,6 +9,7 @@ const multicall = { [1101]: "0xcA11bde05977b3631167028862bE2a173976CA11", [324]: "0xF9cda624FBC7e059355ce98a31693d299FACd963", [42161]: "0xcA11bde05977b3631167028862bE2a173976CA11", + [59144]: "0xcA11bde05977b3631167028862bE2a173976CA11", }; interface MultiCall { diff --git a/src/utils/simpleRpcProvider.ts b/src/utils/simpleRpcProvider.ts index 96dcbac2..2099ccc7 100644 --- a/src/utils/simpleRpcProvider.ts +++ b/src/utils/simpleRpcProvider.ts @@ -10,6 +10,7 @@ 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 lineaRpcProvider = new ethers.providers.StaticJsonRpcProvider("https://rpc.linea.build", 59144); const simpleRpcProvider = { [1]: ethRpcProvider, @@ -17,6 +18,7 @@ const simpleRpcProvider = { [1101]: polygonZkevmRpcProvider, [324]: zksyncRpcProvider, [42161]: arbitrumRpcProvider, + [59144]: lineaRpcProvider, }; export default simpleRpcProvider; diff --git a/test/default.test.ts b/test/default.test.ts index bfaff881..ef31f103 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -9,6 +9,7 @@ import currentPancakeswapEthDefaultList from "../lists/pancakeswap-eth-default.j 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 currentPancakeswapLineaDefaultList from "../lists/pancakeswap-linea-default.json"; import currentPancakeswapEthMMList from "../lists/pancakeswap-eth-mm.json"; import currentPancakeswapBnbMMList from "../lists/pancakeswap-bnb-mm.json"; import currentPancakeswapExtendedtList from "../lists/pancakeswap-extended.json"; @@ -34,6 +35,7 @@ const CASES = [ ["pancakeswap-zksync-default"], ["pancakeswap-polygon-zkevm-default"], ["pancakeswap-arbitrum-default"], + ["pancakeswap-linea-default"], ["pancakeswap-eth-mm"], ["pancakeswap-extended"], ["pancakeswap-top-100"], @@ -54,6 +56,7 @@ const currentLists = { "pancakeswap-bnb-mm": currentPancakeswapBnbMMList, "pancakeswap-eth-default": currentPancakeswapEthDefaultList, "pancakeswap-zksync-default": currentPancakeswapZksyncDefaultList, + "pancakeswap-linea-default": currentPancakeswapLineaDefaultList, "pancakeswap-arbitrum-default": currentPancakeswapArbitrumDefaultList, "pancakeswap-polygon-zkevm-default": currentPancakeswapPolygonZkevmDefaultList, "pancakeswap-extended": currentPancakeswapExtendedtList, @@ -92,6 +95,7 @@ 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 pathToLineaImages = path.join(path.resolve(), "lists", "images", "linea"); const logoFiles = fs .readdirSync(pathToImages, { withFileTypes: true }) @@ -118,12 +122,18 @@ const pathToARbImagesLogoFiles = fs .filter((f) => f.isFile()) .filter((f) => !/(^|\/)\.[^\/\.]/g.test(f.name)); +const pathToLineaImagesLogoFiles = fs + .readdirSync(pathToLineaImages, { withFileTypes: true }) + .filter((f) => f.isFile()) + .filter((f) => !/(^|\/)\.[^\/\.]/g.test(f.name)); + const multiChainLogoPath = { [56]: "", [1]: "/eth", [1101]: "/polygon-zkevm", [324]: "/zksync", [42161]: "/arbitrum", + [59144]: "/linea", }; const multiChainLogoFiles = { @@ -132,6 +142,7 @@ const multiChainLogoFiles = { [1101]: polygonZkevmLogoFiles, [324]: polygonZksyncFiles, [42161]: pathToARbImagesLogoFiles, + [59144]: pathToLineaImagesLogoFiles, }; // Modified https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_get