From 14a8061a1f3fd3c53862e7f2489307669b9dc522 Mon Sep 17 00:00:00 2001 From: Hyungsuk Kang Date: Thu, 19 Dec 2024 10:47:35 +0900 Subject: [PATCH] pass tests --- src/buildList.js | 341 +---------------------------------------------- 1 file changed, 6 insertions(+), 335 deletions(-) diff --git a/src/buildList.js b/src/buildList.js index 98d6f91a..d36c2283 100644 --- a/src/buildList.js +++ b/src/buildList.js @@ -26,6 +26,9 @@ const storyIliadPairs = require("./pairs/story_iliad.json"); const storyOdysseyPairs = require("./pairs/story_odyssey.json"); const morphPairs = require("./pairs/morph.json"); +// groups +const storyOdysseyGroups = require("./groups/story_odyssey.json"); + const bridgeUtils = require("@uniswap/token-list-bridge-utils"); module.exports = function buildList() { @@ -38,341 +41,9 @@ module.exports = function buildList() { minor: +parsed[1], patch: +parsed[2], }, - nativeToken: { - Base: { - chainId: 8453, - name: "Ether", - symbol: "ETH", - decimals: 18, - address: "0x4200000000000000000000000000000000000006", - logoURI: - "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1696501628", - }, - Kroma: { - name: "Wrapped Ether", - symbol: "ETH", - decimals: 18, - address: "0x4200000000000000000000000000000000000001", - logoURI: - "https://coin-images.coingecko.com/coins/images/279/large/ethereum.png?1696501628", - }, - "Morph Holesky": { - name: "Ether", - symbol: "ETH", - decimals: 18, - address: "0x5300000000000000000000000000000000000011", - logoURI: - "https://raw.githubusercontent.com/morph-l2/morph-list/main/tokenIcons/ETH.svg", - }, - Mode: { - chainId: 8453, - name: "Ether", - symbol: "ETH", - decimals: 18, - address: "0x4200000000000000000000000000000000000006", - logoURI: - "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1696501628", - }, - Fraxtal: { - chainId: 252, - address: "0x4200000000000000000000000000000000000006", - name: "Ether", - symbol: "ETH", - decimals: 18, - logoURI: - "https://assets.coingecko.com/coins/images/28284/standard/frxETH_icon.png?1696527284", - }, - Metal: { - chainId: 1750, - address: "0x4200000000000000000000000000000000000006", - name: "Ether", - symbol: "ETH", - decimals: 18, - logoURI: - "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1595348880", - }, - Scroll: { - chainId: 534352, - address: "0x5300000000000000000000000000000000000004", - name: "Ether", - symbol: "ETH", - decimals: 18, - logoURI: - "https://coin-images.coingecko.com/coins/images/279/large/ethereum.png?1696501628", - extensions: { - scrollListId: "default", - scrollTokenId: "WETH", - }, - }, - "Neon EVM MainNet": { - chainId: 245022934, - address: "0x202C35e517Fa803B537565c40F0a6965D7204609", - decimals: 18, - name: "Neon", - symbol: "NEON", - logoURI: - "https://raw.githubusercontent.com/neonlabsorg/token-list/master/assets/wrapped-neon-logo.svg", - }, - "Taiko Mainnet": { - name: "Ether", - address: "0xA51894664A773981C6C112C43ce576f315d5b1B6", - symbol: "ETH", - decimals: 18, - chainId: 167000, - logoURI: - "https://assets.coingecko.com/coins/images/279/standard/ethereum.png?1696501628", - }, - "Story Public Testnet": { - chainId: 1513, - address: "0x6e990040Fd9b06F98eFb62A147201696941680b5", - name: "IP", - symbol: "IP", - decimals: 18, - logoURI: "https://app.piperx.xyz/assets/icon_Story-0eb3cd42.png", - }, - "Story Odyssey Testnet": { - chainId: 1516, - address: "0xe8CabF9d1FFB6CE23cF0a86641849543ec7BD7d5", - name: "IP", - symbol: "IP", - decimals: 18, - logoURI: "https://app.piperx.xyz/assets/icon_Story-0eb3cd42.png", - }, - Morph: { - "chainId": 2818, - "address": "0x5300000000000000000000000000000000000011", - "name": "Ether", - "symbol": "ETH", - "decimals": 18, - "cgId": "ethereum", - "logoURI": "https://s2.coinmarketcap.com/static/img/coins/128x128/1027.png" - }, - }, - // List stablecoins with top market cap on each chain - stablecoins: { - Base: [ - { - chainId: 8453, - address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", - name: "USD Coin", - symbol: "USDC", - decimals: 6, - logoURI: "https://ethereum-optimism.github.io/data/USDC/logo.png", - }, - { - chainId: 8453, - address: "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA", - name: "USD Base Coin", - symbol: "USDbC", - decimals: 6, - logoURI: "https://ethereum-optimism.github.io/data/USDC/logo.png", - }, - ], - Kroma: [ - { - chainId: 255, - name: "USD Coin", - symbol: "USDC", - address: "0x0257e4d92C00C9EfcCa1d641b224d7d09cfa4522", - logoURI: "https://ethereum-optimism.github.io/data/USDC/logo.png", - decimals: 6, - }, - { - chainId: 255, - name: "Tether", - symbol: "USDT", - address: "0x0Cf7c2A584988871b654Bd79f96899e4cd6C41C0", - logoURI: "https://ethereum-optimism.github.io/data/USDT/logo.png", - decimals: 6, - }, - ], - "Morph Holesky": [ - { - chainId: 2810, - address: "0x9E12AD42c4E4d2acFBADE01a96446e48e6764B98", - symbol: "USDT", - name: "Tether", - decimals: 18, - logoURI: - "https://raw.githubusercontent.com/morph-l2/morph-list/main/tokenIcons/USDT.svg", - }, - ], - Mode: [ - { - chainId: 34443, - address: "0xd988097fb8612cc24eeC14542bC03424c656005f", - name: "USD Coin", - symbol: "USDC", - decimals: 6, - logoURI: "https://ethereum-optimism.github.io/data/USDC/logo.png", - }, - { - chainId: 34443, - address: "0xf0F161fDA2712DB8b566946122a5af183995e2eD", - name: "Tether", - symbol: "USDT", - decimals: 6, - logoURI: "https://ethereum-optimism.github.io/data/USDT/logo.png", - }, - ], - Fraxtal: [ - { - chainId: 252, - address: "0xDcc0F2D8F90FDe85b10aC1c8Ab57dc0AE946A543", - name: "USD Coin", - symbol: "USDC", - decimals: 6, - logoURI: - "https://assets.coingecko.com/coins/images/6319/small/USD_Coin_icon.png?1547042389", - }, - ], - Metal: [ - { - chainId: 1750, - address: "0xb91CFCcA485C6E40E3bC622f9BFA02a8ACdEeBab", - name: "USD Coin", - symbol: "USDC", - decimals: 6, - logoURI: - "https://assets.coingecko.com/coins/images/6319/large/USD_Coin_icon.png?1547042389", - }, - ], - Scroll: [ - { - chainId: 534352, - address: "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4", - name: "USD Coin", - symbol: "USDC", - decimals: 6, - logoURI: - "https://scroll-tech.github.io/token-list/data/USDC/logo.svg", - extensions: { - scrollListId: "default", - scrollTokenId: "USDC", - }, - }, - { - chainId: 534352, - address: "0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df", - name: "Tether", - symbol: "USDT", - decimals: 6, - logoURI: - "https://scroll-tech.github.io/token-list/data/USDT/logo.svg", - extensions: { - scrollListId: "default", - scrollTokenId: "USDT", - }, - }, - ], - "Neon EVM MainNet": [ - { - chainId: 245022934, - address_spl: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", - address: "0x5f0155d08eF4aaE2B500AefB64A3419dA8bB611a", - decimals: 6, - name: "USDT", - symbol: "USDT", - logoURI: - "https://raw.githubusercontent.com/neonlabsorg/token-list/master/assets/tether-usdt-logo.svg", - }, - { - chainId: 245022934, - address_spl: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", - address: "0xEA6B04272f9f62F997F666F07D3a974134f7FFb9", - decimals: 6, - name: "USDC", - symbol: "USDC", - logoURI: - "https://raw.githubusercontent.com/neonlabsorg/token-list/master/assets/usd-coin-usdc-logo.svg", - }, - ], - "Taiko Mainnet": [ - { - name: "Bridged USDC (Stargate)", - address: "0x19e26B0638bf63aa9fa4d14c6baF8D52eBE86C5C", - symbol: "USDC.e", - decimals: 6, - chainId: 167000, - logoURI: - "https://assets.coingecko.com/coins/images/14425/small/USDC.png?1629456341", - }, - { - name: "USD Coin", - address: "0x07d83526730c7438048D55A4fc0b850e2aaB6f0b", - symbol: "USDC", - decimals: 6, - chainId: 167000, - logoURI: - "https://assets.coingecko.com/coins/images/6319/small/USD_Coin_icon.png?1547042389", - }, - { - name: "Tether USD", - address: "0x9c2dc7377717603eB92b2655c5f2E7997a4945BD", - symbol: "USDT", - decimals: 6, - chainId: 167000, - logoURI: - "https://assets.coingecko.com/coins/images/325/small/Tether.png?1668148663", - }, - ], - "Story Public Testnet": [ - { - chainId: 1513, - address: "0x700722D24f9256Be288f56449E8AB1D27C4a70ca", - name: "USD Coin", - symbol: "USDC", - decimals: 6, - logoURI: "https://ethereum-optimism.github.io/data/USDC/logo.png", - }, - { - chainId: 1513, - address: "0x8812d810EA7CC4e1c3FB45cef19D6a7ECBf2D85D", - name: "Tether USD", - symbol: "USDT", - decimals: 6, - logoURI: "https://ethereum-optimism.github.io/data/USDT/logo.png", - }, - ], - "Story Odyssey Testnet": [ - { - chainId: 1516, - address: "0x40fCa9cB1AB15eD9B5bDA19A52ac00A78AE08e1D", - name: "USD Coin", - symbol: "USDC", - decimals: 6, - logoURI: "https://ethereum-optimism.github.io/data/USDC/logo.png", - }, - ], - Morph: [ - { - "chainId": 2818, - "address": "0xc7D67A9cBB121b3b0b9c053DD9f469523243379A", - "name": "Tether USD", - "symbol": "USDT", - "decimals": 18, - "cgId": "tether", - "logoURI": "https://raw.githubusercontent.com/morph-l2/morph-list/main/tokenIcons/USDT.svg" - }, - { - "chainId": 2818, - "address": "0xe34c91815d7fc18A9e2148bcD4241d0a5848b693", - "name": "USD Coin", - "symbol": "USDC", - "decimals": 6, - "cgId": "usd-coin", - "logoURI": "https://raw.githubusercontent.com/morph-l2/morph-list/main/tokenIcons/USDC.svg" - }, - { - "chainId": 2818, - "address": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063", - "name": "Dai", - "symbol": "DAI", - "decimals": 18, - "cgId": "dai", - "logoURI": "https://raw.githubusercontent.com/morph-l2/morph-list/main/tokenIcons/DAI.svg" - } - ] + // groups are used to organize tokens in the app UI for Tradingview, each token is identified by its tag property + groups:{ + "Story Odyssey Testnet": storyOdysseyGroups, }, defaultPair: { Base: {