diff --git a/.github/workflows/generate-token-lists.yml b/.github/workflows/generate-token-lists.yml index f85c771d..2eebb8b4 100644 --- a/.github/workflows/generate-token-lists.yml +++ b/.github/workflows/generate-token-lists.yml @@ -138,30 +138,55 @@ jobs: - ArbTokenLists/660279_arbed_uniswap_labs.json version: true command: yarn arbify --l2NetworkID 660279 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/660279_arbed_uniswap_labs.json --tokenList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_uniswap_labs.json --newArbifiedList ./src/ArbTokenLists/660279_arbed_uniswap_labs.json + - name: Xai Arbify L2 native list + paths: + - ArbTokenLists/660279_arbed_native_list.json + version: true + command: yarn arbify --l2NetworkID 660279 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/660279_arbed_native_list.json --tokenList ./src/Assets/42161_arbitrum_native_token_list.json --newArbifiedList ./src/ArbTokenLists/660279_arbed_native_list.json - name: Rari Arbify Uniswap paths: - ArbTokenLists/1380012617_arbed_uniswap_labs.json version: true command: yarn arbify --l2NetworkID 1380012617 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/1380012617_arbed_uniswap_labs.json --tokenList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_uniswap_labs.json --newArbifiedList ./src/ArbTokenLists/1380012617_arbed_uniswap_labs.json + - name: Rari Arbify L2 native list + paths: + - ArbTokenLists/1380012617_arbed_native_list.json + version: true + command: yarn arbify --l2NetworkID 1380012617 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/1380012617_arbed_native_list.json --tokenList ./src/Assets/42161_arbitrum_native_token_list.json --newArbifiedList ./src/ArbTokenLists/1380012617_arbed_native_list.json - name: Muster Arbify Uniswap paths: - ArbTokenLists/4078_arbed_uniswap_labs.json version: true command: yarn arbify --l2NetworkID 4078 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/4078_arbed_uniswap_labs.json --tokenList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_uniswap_labs.json --newArbifiedList ./src/ArbTokenLists/4078_arbed_uniswap_labs.json + - name: Muster Arbify L2 native list + paths: + - ArbTokenLists/4078_arbed_native_list.json + version: true + command: yarn arbify --l2NetworkID 4078 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/4078_arbed_native_list.json --tokenList ./src/Assets/42161_arbitrum_native_token_list.json --newArbifiedList ./src/ArbTokenLists/4078_arbed_native_list.json - name: Proof of Play Apex Arbify Uniswap paths: - ArbTokenLists/70700_arbed_uniswap_labs.json version: true command: yarn arbify --l2NetworkID 70700 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/70700_arbed_uniswap_labs.json --tokenList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_uniswap_labs.json --newArbifiedList ./src/ArbTokenLists/70700_arbed_uniswap_labs.json + - name: Proof of Play Apex Arbify L2 native list + paths: + - ArbTokenLists/70700_arbed_native_list.json + version: true + command: yarn arbify --l2NetworkID 70700 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/70700_arbed_native_list.json --tokenList ./src/Assets/42161_arbitrum_native_token_list.json --newArbifiedList ./src/ArbTokenLists/70700_arbed_native_list.json - name: L3X Arbify Uniswap paths: - ArbTokenLists/12324_arbed_uniswap_labs.json version: true command: yarn arbify --l2NetworkID 12324 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/12324_arbed_uniswap_labs.json --tokenList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_uniswap_labs.json --newArbifiedList ./src/ArbTokenLists/12324_arbed_uniswap_labs.json + - name: L3X Arbify L2 native list + paths: + - ArbTokenLists/12324_arbed_native_list.json + version: true + command: yarn arbify --l2NetworkID 12324 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/12324_arbed_native_list.json --tokenList ./src/Assets/42161_arbitrum_native_token_list.json --newArbifiedList ./src/ArbTokenLists/12324_arbed_native_list.json # Orbit Chains testnet - name: Xai Testnet Arbify Uniswap diff --git a/src/Assets/42161_arbitrum_native_token_list.json b/src/Assets/42161_arbitrum_native_token_list.json new file mode 100644 index 00000000..41ccc33f --- /dev/null +++ b/src/Assets/42161_arbitrum_native_token_list.json @@ -0,0 +1,36 @@ +{ + "name": "Arb1 Tokens by Offchain Labs", + "timestamp": "2024-05-29T09:32:20.831Z", + "version": { + "major": 1, + "minor": 0, + "patch": 0 + }, + "tokens": [ + { + "chainId": 42161, + "address": "0xaf88d065e77c8cc2239327c5edb3a432268e5831", + "name": "USD Coin", + "symbol": "USDC", + "decimals": 6, + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/arbitrum/assets/0xaf88d065e77c8cC2239327C5EDb3A432268e5831/logo.png" + }, + { + "chainId": 42161, + "address": "0x2416092f143378750bb29b79ed961ab195cceea5", + "name": "Renzo Restaked ETH", + "symbol": "ezETH", + "decimals": 18, + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xbf5495Efe5DB9ce00f80364C8B423567e58d2110/logo.png" + }, + { + "chainId": 42161, + "address": "0x4186BFC76E2E237523CBC30FD220FE055156b41F", + "name": "KelpDao Restaked ETH", + "symbol": "rsETH", + "decimals": 18, + "logoURI": "https://assets.coingecko.com/coins/images/33800/large/Icon___Dark.png" + } + ], + "logoURI": "https://avatars.githubusercontent.com/u/43838009" +} diff --git a/src/lib/token_list_gen.ts b/src/lib/token_list_gen.ts index cc72f8a6..43c3d5e7 100644 --- a/src/lib/token_list_gen.ts +++ b/src/lib/token_list_gen.ts @@ -324,7 +324,7 @@ export const generateTokenList = async ( name: options && options.preserveListName ? name - : listNameToArbifiedListName(name), + : listNameToArbifiedListName(name, l2.network.chainID), timestamp: new Date().toISOString(), version, tokens: arbifiedTokenList, diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 18bcd926..b1b9e487 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -49,14 +49,19 @@ for (const address of Object.keys(logoUris)) { logoUris[address.toLowerCase()] = logoUris[address]; } -export const listNameToArbifiedListName = (name: string) => { +export const listNameToArbifiedListName = ( + name: string, + childChainId: number, +) => { const prefix = 'Arbed '; let fileName = sanitizeNameString(name); if (!fileName.startsWith(prefix)) { fileName = prefix + fileName; } - return fileName.split(' ').slice(0, 2).join(' ').slice(0, 20); + + const baseName = fileName.split(' ').slice(0, 3).join(' ').slice(0, 20); + return `${baseName} ${childChainId}`; }; export const getL1TokenAndL2Gateway = async (