From c08e545c0c81cd7d3f9a04287aeeeacaa36a86dc Mon Sep 17 00:00:00 2001 From: ianlapham Date: Thu, 25 Feb 2021 11:42:53 -0500 Subject: [PATCH 01/22] add ba list --- src/components/card.js | 1 - src/token-lists.json | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/card.js b/src/components/card.js index 2452635..cc874f9 100644 --- a/src/components/card.js +++ b/src/components/card.js @@ -5,7 +5,6 @@ import styled from 'styled-components' const StyledCard = styled(Link)` border-radius: 8px; padding: 1.5rem; - height: 264px; max-width: 172px; display: flex; justify-content: space-between; diff --git a/src/token-lists.json b/src/token-lists.json index 6631677..d4967bf 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -11,6 +11,10 @@ "name": "Agora dataFi Tokens", "homepage": "" }, + "https://bafybeifguctcgw3zjxumdecr3f6w3cvzekkkt3n3h7zyxgehvn3yzdbjru.ipfs.dweb.link/": { + "name": "Blockchain Association", + "homepage": "" + }, "defi.cmc.eth": { "name": "CMC DeFi", "homepage": "" From 0e9acae8ca3f9326214e25c338570fe283768d19 Mon Sep 17 00:00:00 2001 From: ianlapham Date: Thu, 25 Feb 2021 11:56:25 -0500 Subject: [PATCH 02/22] fix mobile styles --- src/components/card.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/card.js b/src/components/card.js index cc874f9..11fd9e5 100644 --- a/src/components/card.js +++ b/src/components/card.js @@ -21,7 +21,7 @@ const StyledCard = styled(Link)` max-width: initial; } @media screen and (max-width: 414px) { - width: 100%; + width: 320px; box-sizing: border-box; } :hover { @@ -51,6 +51,10 @@ const TokensListed = styled.span` line-height: 150%; ` +const NameText = styled.h3` + word-wrap: break-word; +` + function getLogoURL(logoURI) { if (logoURI?.startsWith('ipfs://')) { return `https://ipfs.io/ipfs/${logoURI.split('//')[1]}` @@ -76,7 +80,7 @@ export default function Card({ id, list, name }) { }} />
-

{actualName}

+ {actualName} {list?.tokens?.length > 0 ? `${list.tokens.length} tokens` : list === null ? 'Error' : 'Loading...'} From ccf7d995888b8d2d80e252d115d65b4974f30c30 Mon Sep 17 00:00:00 2001 From: ianlapham Date: Thu, 25 Feb 2021 13:51:25 -0500 Subject: [PATCH 03/22] update ba list endpoint --- src/token-lists.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/token-lists.json b/src/token-lists.json index d4967bf..1ec2c4c 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -11,8 +11,8 @@ "name": "Agora dataFi Tokens", "homepage": "" }, - "https://bafybeifguctcgw3zjxumdecr3f6w3cvzekkkt3n3h7zyxgehvn3yzdbjru.ipfs.dweb.link/": { - "name": "Blockchain Association", + "https://raw.githubusercontent.com/The-Blockchain-Association/sec-notice-list/master/ba-sec-list.json": { + "name": "Blockchain Association SEC Non Compliant List", "homepage": "" }, "defi.cmc.eth": { From 62d6c731d6ad8ddeea3cf049de0b2de061b5e08e Mon Sep 17 00:00:00 2001 From: banteg Date: Fri, 23 Apr 2021 21:22:51 +0300 Subject: [PATCH 04/22] feat: add yearn token list --- src/token-lists.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/token-lists.json b/src/token-lists.json index 1ec2c4c..0522299 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -122,5 +122,9 @@ "tokenlist.zerion.eth": { "name": "Zerion Explore", "homepage": "" + }, + "https://yearn.science/static/tokenlist.json": { + "name": "Yearn", + "homepage": "https://yearn.finance/" } } From 27f379c40aca0d51c9be2f1ef5056cd1a8bc6d8a Mon Sep 17 00:00:00 2001 From: Hayden Adams Date: Fri, 23 Apr 2021 15:29:27 -0400 Subject: [PATCH 05/22] alphabetical --- src/token-lists.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/token-lists.json b/src/token-lists.json index 0522299..eb0370a 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -115,6 +115,10 @@ "name": "Wrapped Tokens", "homepage": "" }, + "https://yearn.science/static/tokenlist.json": { + "name": "Yearn", + "homepage": "https://yearn.finance/" + }, "https://zapper.fi/api/token-list": { "name": "Zapper Token List", "homepage": "" @@ -122,9 +126,5 @@ "tokenlist.zerion.eth": { "name": "Zerion Explore", "homepage": "" - }, - "https://yearn.science/static/tokenlist.json": { - "name": "Yearn", - "homepage": "https://yearn.finance/" } } From 067970029f6a8533c1c8855b2776fad143d0d888 Mon Sep 17 00:00:00 2001 From: ianlapham Date: Wed, 21 Jul 2021 15:54:36 -0400 Subject: [PATCH 06/22] add optimism --- src/token-lists.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/token-lists.json b/src/token-lists.json index eb0370a..4499241 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -83,6 +83,10 @@ "name": "Opyn Token List", "homepage": "" }, + "https://static.optimism.io/optimism.tokenlist.json": { + "name": "Optimism", + "homepage": "https://optimism.io/" + }, "https://app.tryroll.com/tokens.json": { "name": "Roll Social Money", "homepage": "" From 1206c977b21af53ced68018f131ca189156a9d6d Mon Sep 17 00:00:00 2001 From: Brian Soule Date: Tue, 7 Dec 2021 16:56:06 -0600 Subject: [PATCH 07/22] feat: add TickerDao token list Closes: https://github.com/Uniswap/tokenlists-org/issues/1239 --- src/token-lists.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/token-lists.json b/src/token-lists.json index 4499241..fb8ceae 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -103,6 +103,10 @@ "name": "Testnet Tokens", "homepage": "" }, + "tokenlist.tkr.eth": { + "name": "TickerDao", + "homepage": "https://tkr.eth.limo" + }, "https://gateway.ipfs.io/ipns/tokens.uniswap.org": { "name": "Uniswap Default List", "homepage": "" From cdbf37256fb8c235ad75ff5e057ff4c186875a5f Mon Sep 17 00:00:00 2001 From: Brian Soule Date: Tue, 29 Mar 2022 14:30:41 -0500 Subject: [PATCH 08/22] Update token-lists.json --- src/token-lists.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/token-lists.json b/src/token-lists.json index fb8ceae..a206e63 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -103,9 +103,9 @@ "name": "Testnet Tokens", "homepage": "" }, - "tokenlist.tkr.eth": { - "name": "TickerDao", - "homepage": "https://tkr.eth.limo" + "list.tkn.eth": { + "name": "TokenDao", + "homepage": "https://tkn.eth.limo" }, "https://gateway.ipfs.io/ipns/tokens.uniswap.org": { "name": "Uniswap Default List", From df2d45f3f37da86ce1db437557e519bb2aa70db0 Mon Sep 17 00:00:00 2001 From: "Alex.Karys" Date: Fri, 3 Jun 2022 18:24:49 -0400 Subject: [PATCH 09/22] Adding some multi-chain support for list view --- src/components/list-tokens.js | 28 +++++++++++++++++++----- src/pages/list.js | 1 + src/utils/chain_list.json | 1 + src/utils/getChainId.js | 40 +++++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 src/utils/chain_list.json create mode 100644 src/utils/getChainId.js diff --git a/src/components/list-tokens.js b/src/components/list-tokens.js index f669a8f..b8a34d6 100644 --- a/src/components/list-tokens.js +++ b/src/components/list-tokens.js @@ -2,6 +2,7 @@ import React, { useState, memo } from 'react' import styled from 'styled-components' import Search from './search' import CopyHelper from './copy' +import { lookUpchain, lookupScanner } from '../utils/getChainId' import { toChecksumAddress } from 'ethereumjs-util' import FilterResults from 'react-filter-search' @@ -10,7 +11,7 @@ const TokenItem = styled.section` display: grid; max-width: 960px; grid-gap: 1rem; - grid-template-columns: 1fr 128px 96px 148px; + grid-template-columns: 1fr 100px 120px 96px 148px; margin-bottom: 1rem; a { color: #131313; @@ -73,7 +74,19 @@ const TokenAddress = styled.span` align-items: center; ` +const Chain = styled.span` + display: grid; + grid-template-columns: auto 16px; + grid-gap: 0.5rem; + height: fit-content; + align-items: center; + @media screen and (max-width: 960px) { + display: none; + } +` + export const ListItem = memo(function ListItem({ token }) { + const scannerUrl = lookupScanner(token.chainId) == "" ? "" : lookupScanner(token.chainId) + `${toChecksumAddress(token.address)}`; return ( @@ -110,8 +123,9 @@ export const ListItem = memo(function ListItem({ token }) { )} + {lookUpchain(token.chainId)} - + {`${toChecksumAddress(token.address)?.slice(0, 6)}...${toChecksumAddress(token.address)?.slice(38, 42)}`} @@ -148,7 +162,7 @@ const ListTitle = styled.div` display: grid; max-width: 960px; grid-gap: 1rem; - grid-template-columns: 1fr 128px 96px 148px; + grid-template-columns: 1fr 100px 120px 96px 148px; margin-bottom: 1rem; @media screen and (max-width: 414px) { display: none; @@ -166,6 +180,10 @@ const ListHeader = styled.div` export default function Tokens({ tokens }) { const [value, setValue] = useState('') + const sortedTokens = tokens.sort((a,b) =>{ + return a.symbol > b.symbol ? 1 : + a.symbol < b.symbol ? -1 : 0; + }) function handleChange(e) { const { value } = e.target @@ -184,7 +202,7 @@ export default function Tokens({ tokens }) {

Name

Symbol

Tags

- +

Chain ID

Address

@@ -192,7 +210,7 @@ export default function Tokens({ tokens }) { results.length === 0 ? 'None found!' : results.map((data, i) => ) } diff --git a/src/pages/list.js b/src/pages/list.js index a22078e..d05cd62 100644 --- a/src/pages/list.js +++ b/src/pages/list.js @@ -52,6 +52,7 @@ function List() { const listIDs = useMemo(() => [listID], [listID]) const { list, loading, error } = useMultiFetch(listIDs)[listID] + return (
diff --git a/src/utils/chain_list.json b/src/utils/chain_list.json new file mode 100644 index 0000000..e69d203 --- /dev/null +++ b/src/utils/chain_list.json @@ -0,0 +1 @@ +{"1":"Ethereum Mainnet","2":"Expanse Network","3":"Ropsten","4":"Rinkeby","5":"Görli","6":"Ethereum Classic Testnet Kotti","7":"ThaiChain","8":"Ubiq","9":"Ubiq Network Testnet","10":"Optimism","11":"Metadium Mainnet","12":"Metadium Testnet","13":"Diode Testnet Staging","14":"Flare Mainnet","15":"Diode Prenet","16":"Flare Testnet Coston","17":"ThaiChain 2.0 ThaiFi","18":"ThunderCore Testnet","19":"Songbird Canary-Network","20":"Elastos Smart Chain","21":"ELA-ETH-Sidechain Testnet","22":"ELA-DID-Sidechain Mainnet","23":"ELA-DID-Sidechain Testnet","24":"Dithereum Mainnet","25":"Cronos Mainnet Beta","26":"Genesis L1 testnet","27":"ShibaChain","28":"Boba Network Rinkeby Testnet","29":"Genesis L1","30":"RSK Mainnet","31":"RSK Testnet","32":"GoodData Testnet","33":"GoodData Mainnet","34":"Dithereum Testnet","35":"TBWG Chain","38":"Valorbit","40":"Telos EVM Mainnet","41":"Telos EVM Testnet","42":"Kovan","43":"Darwinia Pangolin Testnet","44":"Darwinia Crab Network","45":"Darwinia Pangoro Testnet","50":"XinFin Network Mainnet","51":"XinFin Apothem Testnet","52":"CoinEx Smart Chain Mainnet","53":"CoinEx Smart Chain Testnet","54":"Openpiece Mainnet","55":"Zyx Mainnet","56":"Binance Smart Chain Mainnet","57":"Syscoin Mainnet","58":"Ontology Mainnet","59":"EOS Mainnet","60":"GoChain","61":"Ethereum Classic Mainnet","62":"Ethereum Classic Testnet Morden","63":"Ethereum Classic Testnet Mordor","64":"Ellaism","65":"OKExChain Testnet","66":"OKXChain Mainnet","67":"DBChain Testnet","68":"SoterOne Mainnet","69":"Optimism Kovan","70":"Hoo Smart Chain","71":"Conflux eSpace (Testnet)","74":"IDChain Mainnet","76":"Mix","77":"POA Network Sokol","78":"PrimusChain mainnet","79":"Zenith Mainnet","80":"GeneChain","81":"Zenith Testnet (Vilnius)","82":"Meter Mainnet","83":"Meter Testnet","85":"GateChain Testnet","86":"GateChain Mainnet","87":"Nova Network","88":"TomoChain","89":"TomoChain Testnet","90":"Garizon Stage0","91":"Garizon Stage1","92":"Garizon Stage2","93":"Garizon Stage3","95":"CryptoKylin Testnet","96":"NEXT Smart Chain","97":"Binance Smart Chain Testnet","99":"POA Network Core","100":"Gnosis","101":"EtherInc","102":"Web3Games Testnet","105":"Web3Games Devnet","106":"Velas EVM Mainnet","107":"Nebula Testnet","108":"ThunderCore Mainnet","110":"Proton Testnet","111":"EtherLite Chain","122":"Fuse Mainnet","123":"Fuse Sparknet","124":"Decentralized Web Mainnet","125":"OYchain Testnet","126":"OYchain Mainnet","127":"Factory 127 Mainnet","128":"Huobi ECO Chain Mainnet","137":"Polygon Mainnet","141":"Openpiece Testnet","142":"DAX CHAIN","162":"Lightstreams Testnet","163":"Lightstreams Mainnet","168":"AIOZ Network","170":"HOO Smart Chain Testnet","172":"Latam-Blockchain Resil Testnet","186":"Seele Mainnet","188":"BMC Mainnet","189":"BMC Testnet","199":"BitTorrent Chain Mainnet","200":"Arbitrum on xDai","211":"Freight Trust Network","218":"SoterOne Mainnet old","222":"Permission","225":"LACHAIN Mainnet","226":"LACHAIN Testnet","239":"Aitd Testnet","246":"Energy Web Chain","250":"Fantom Opera","256":"Huobi ECO Chain Testnet","258":"Setheum","262":"SUR Blockchain Network","269":"High Performance Blockchain","288":"Boba Network","300":"Optimism on Gnosis Chain","321":"KCC Mainnet","322":"KCC Testnet","333":"Web3Q Mainnet","335":"DFK Chain Test","336":"Shiden","338":"Cronos Testnet","361":"Theta Mainnet","363":"Theta Sapphire Testnet","364":"Theta Amber Testnet","365":"Theta Testnet","369":"PulseChain Mainnet","385":"Lisinski","420":"Optimistic Ethereum Testnet Goerli","499":"Rupaya","512":"Double-A Chain Mainnet","513":"Double-A Chain Testnet","534":"Candle Mainnet","555":"Vela1 Chain Mainnet","558":"Tao Network","588":"Metis Stardust Testnet","592":"Astar","595":"Acala Mandala Testnet","596":"Karura Network Testnet","597":"Acala Network Testnet","600":"Meshnyan testnet","666":"Pixie Chain Testnet","686":"Karura Network","700":"Star Social Testnet","707":"BlockChain Station Mainnet","708":"BlockChain Station Testnet","721":"Factory 127 Testnet","776":"OpenChain Testnet","777":"cheapETH","787":"Acala Network","788":"Aerochain Testnet","803":"Haic","820":"Callisto Mainnet","821":"Callisto Testnet","880":"Ambros Chain Mainnet","888":"Wanchain","900":"Garizon Testnet Stage0","901":"Garizon Testnet Stage1","902":"Garizon Testnet Stage2","903":"Garizon Testnet Stage3","940":"PulseChain Testnet","941":"PulseChain Testnet v2b","942":"PulseChain Testnet v3","977":"Nepal Blockchain Network","998":"Lucky Network","999":"Wanchain Testnet","1001":"Klaytn Testnet Baobab","1007":"Newton Testnet","1008":"Eurus Mainnet","1010":"Evrice Network","1012":"Newton","1022":"Sakura","1023":"Clover Testnet","1024":"CLV Parachain","1028":"BitTorrent Chain Testnet","1030":"Conflux eSpace","1088":"Metis Andromeda Mainnet","1139":"MathChain","1140":"MathChain Testnet","1197":"Iora Chain","1201":"Evanesco Testnet","1202":"World Trade Technical Chain Mainnet","1213":"Popcateum Mainnet","1214":"EnterChain Mainnet","1280":"HALO Mainnet","1284":"Moonbeam","1285":"Moonriver","1286":"Moonrock old","1287":"Moonbase Alpha","1288":"Moonrock","1337":"CENNZnet old","1506":"Sherpax Mainnet","1507":"Sherpax Testnet","1618":"Catecoin Chain Mainnet","1620":"Atheios","1657":"Btachain","1688":"LUDAN Mainnet","1819":"Cube Chain Testnet","1856":"Teslafunds","1898":"BON Network","1984":"Eurus Testnet","1987":"EtherGem","2001":"Milkomeda C1 Mainnet","2008":"CloudWalk Testnet","2009":"CloudWalk Mainnet","2020":"420coin","2021":"Edgeware Mainnet","2022":"Beresheet Testnet","2023":"Taycan Testnet","2025":"Rangers Protocol Mainnet","2100":"Ecoball Mainnet","2101":"Ecoball Testnet Espuma","2152":"Findora Mainnet","2153":"Findora Testnet","2213":"Evanesco Mainnet","2221":"Kava EVM Testnet","2223":"VChain Mainnet","2559":"Kortho Mainnet","2569":"TechPay Mainnet","2612":"EZChain C-Chain Mainnet","2613":"EZChain C-Chain Testnet","3000":"Echelon","3001":"CENNZnet Nikau","3331":"ZCore Testnet","3333":"Web3Q Testnet","3334":"Web3Q Galileo","3400":"Paribu Net Mainnet","3500":"Paribu Net Testnet","3690":"Bittex Mainnet","3966":"DYNO Mainnet","3967":"DYNO Testnet","4002":"Fantom Testnet","4102":"AIOZ Network Testnet","4181":"PHI Network","4689":"IoTeX Network Mainnet","4690":"IoTeX Network Testnet","4918":"Venidium Testnet","5197":"EraSwap Mainnet","5315":"Uzmi Network Mainnet","5551":"Nahmii Mainnet","5553":"Nahmii Testnet","5700":"Syscoin Tanenbaum Testnet","5777":"Digest Swarm Chain","5851":"Ontology Testnet","5869":"Wegochain Rubidium Mainnet","6626":"Pixie Chain Mainnet","7341":"Shyft Mainnet","7878":"Hazlor Testnet","8000":"Teleport","8001":"Teleport Testnet","8029":"MDGL Testnet","8080":"GeneChain Adenine Testnet","8217":"Klaytn Mainnet Cypress","8285":"KorthoTest","8723":"TOOL Global Mainnet","8724":"TOOL Global Testnet","8888":"Ambros Chain Testnet","8898":"Mammoth Mainnet","8995":"bloxberg","9000":"Evmos Testnet","9001":"Evmos","9100":"Genesis Coin","9527":"Rangers Protocol Testnet Robin","9999":"myOwn Testnet","10000":"Smart Bitcoin Cash","10001":"Smart Bitcoin Cash Testnet","10101":"Blockchain Genesis Mainnet","10823":"CryptoCoinPay","10946":"Quadrans Blockchain","10947":"Quadrans Blockchain Testnet","11111":"WAGMI","11437":"Shyft Testnet","12051":"Singularity ZERO Testnet","12052":"Singularity ZERO Mainnet","13381":"Phoenix Mainnet","16000":"MetaDot Mainnet","16001":"MetaDot Testnet","19845":"BTCIX Network","21337":"CENNZnet Azalea","21816":"omChain Mainnet","22023":"Taycan","24484":"Webchain","24734":"MintMe.com Coin","26863":"OasisChain Mainnet","30067":"Piece testnet","31102":"Ethersocial Network","31337":"GoChain Testnet","32520":"Bitgert Mainnet","32659":"Fusion Mainnet","39797":"Energi Mainnet","42069":"pegglecoin","42161":"Arbitrum One","42220":"Celo Mainnet","42261":"Emerald Paratime Testnet","42262":"Emerald Paratime Mainnet","43110":"Athereum","43113":"Avalanche Fuji Testnet","43114":"Avalanche C-Chain","44787":"Celo Alfajores Testnet","45000":"Autobahn Network","47805":"REI Network","49797":"Energi Testnet","53935":"DFK Chain","55555":"REI Chain Mainnet","55556":"REI Chain Testnet","60000":"Thinkium Testnet Chain 0","60001":"Thinkium Testnet Chain 1","60002":"Thinkium Testnet Chain 2","60103":"Thinkium Testnet Chain 103","62320":"Celo Baklava Testnet","62621":"MultiVAC Mainnet","63000":"eCredits Mainnet","63001":"eCredits Testnet","69420":"Condrieu","70000":"Thinkium Mainnet Chain 0","70001":"Thinkium Mainnet Chain 1","70002":"Thinkium Mainnet Chain 2","70103":"Thinkium Mainnet Chain 103","71393":"Polyjuice Testnet","71401":"Godwoken Testnet (V1.1)","71402":"Godwoken Mainnet","73799":"Energy Web Volta Testnet","78110":"Firenze test network","80001":"Mumbai","99998":"UB Smart Chain(testnet)","99999":"UB Smart Chain","100000":"QuarkChain Mainnet Root","100001":"QuarkChain Mainnet Shard 0","100002":"QuarkChain Mainnet Shard 1","100003":"QuarkChain Mainnet Shard 2","100004":"QuarkChain Mainnet Shard 3","100005":"QuarkChain Mainnet Shard 4","100006":"QuarkChain Mainnet Shard 5","100007":"QuarkChain Mainnet Shard 6","100008":"QuarkChain Mainnet Shard 7","108801":"BROChain Mainnet","110000":"QuarkChain Devnet Root","110001":"QuarkChain Devnet Shard 0","110002":"QuarkChain Devnet Shard 1","110003":"QuarkChain Devnet Shard 2","110004":"QuarkChain Devnet Shard 3","110005":"QuarkChain Devnet Shard 4","110006":"QuarkChain Devnet Shard 5","110007":"QuarkChain Devnet Shard 6","110008":"QuarkChain Devnet Shard 7","200101":"Milkomeda C1 Testnet","200625":"Akroma","201018":"Alaya Mainnet","201030":"Alaya Dev Testnet","210425":"PlatON Mainnet","234666":"Haymo Testnet","246529":"ARTIS sigma1","246785":"ARTIS Testnet tau1","281121":"Social Smart Chain Mainnet","333888":"Polis Testnet","333999":"Polis Mainnet","421611":"Arbitrum Rinkeby","432201":"Dexalot Testnet","444900":"Weelink Testnet","474142":"OpenChain Mainnet","512512":"CMP-Testnet","666666":"Vision - Vpioneer Test Chain","888888":"Vision - Mainnet","955305":"Eluvio Content Fabric","1313114":"Etho Protocol","1313500":"Xerom","1337702":"Kintsugi","1337802":"Kiln","2203181":"PlatON Dev Testnet","7762959":"Musicoin","11155111":"Sepolia","13371337":"PepChain Churchill","18289463":"IOLite","20180430":"SmartMesh Mainnet","20181205":"quarkblockchain","28945486":"Auxilium Network Mainnet","35855456":"Joys Digital Mainnet","61717561":"Aquachain","99415706":"Joys Digital TestNet","192837465":"Gather Mainnet Network","245022926":"Neon EVM DevNet","245022934":"Neon EVM MainNet","245022940":"Neon EVM TestNet","311752642":"OneLedger Mainnet","356256156":"Gather Testnet Network","486217935":"Gather Devnet Network","1122334455":"IPOS Network","1313161554":"Aurora Mainnet","1313161555":"Aurora Testnet","1313161556":"Aurora Betanet","1666600000":"Harmony Mainnet Shard 0","1666600001":"Harmony Mainnet Shard 1","1666600002":"Harmony Mainnet Shard 2","1666600003":"Harmony Mainnet Shard 3","1666700000":"Harmony Testnet Shard 0","1666700001":"Harmony Testnet Shard 1","1666700002":"Harmony Testnet Shard 2","1666700003":"Harmony Testnet Shard 3","2021121117":"DataHopper","3125659152":"Pirl","4216137055":"OneLedger Testnet Frankenstein","11297108099":"Palm Testnet","11297108109":"Palm","197710212030":"Ntity Mainnet","197710212031":"Haradev Testnet","6022140761023":"Molereum Network","868455272153094":"Godwoken Testnet (V1)"} \ No newline at end of file diff --git a/src/utils/getChainId.js b/src/utils/getChainId.js new file mode 100644 index 0000000..69964f8 --- /dev/null +++ b/src/utils/getChainId.js @@ -0,0 +1,40 @@ +//TODO: Should probably make this dynamic +const list = require("./chain_list.json"); + +export function lookUpchain(chainId) { + return list[chainId] || chainId; +} + +export function lookupScanner(chainId) { + switch(chainId) { + // Mainnet + case 1: + return "https://etherscan.io/address/"; + // Polygon + case 137: + return "https://polygonscan.com/address/"; + // Rinkeby + case 4: + return "https://rinkeby.etherscan.io/address/"; + // Kovan + case 42: + return "https://kovan.etherscan.io/address/"; + // goerli + case 420: + return "https://goerli.etherscan.io/address/"; + // ropsten + case 3: + return "https://ropsten.etherscan.io/address/"; + // arbitrum + case 42161: + return "https://arbiscan.io/address/"; + // Optimism + case 10: + return "https://optimistic.etherscan.io/address/"; + // Optimistic Kovan + case 69: + return "https://kovan-optimistic.etherscan.io/address/" + default: + return "" ; + } +} \ No newline at end of file From 68aae0a80de216cb4c08a08be8315aba2e1057c4 Mon Sep 17 00:00:00 2001 From: "Alex.Karys" Date: Thu, 9 Jun 2022 11:52:04 -0400 Subject: [PATCH 10/22] Adding link to multi-chain convert tool --- src/components/hero.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/hero.js b/src/components/hero.js index 0e1bf80..99f87fd 100644 --- a/src/components/hero.js +++ b/src/components/hero.js @@ -93,6 +93,9 @@ export default function Header() { > {'->'} Make your own + + {'->'} Convert to multi-chain list + {'->'} Community From 0d458fcfb6af02283d6bca18eb0359181a49eefc Mon Sep 17 00:00:00 2001 From: "Alex.Karys" Date: Thu, 9 Jun 2022 13:13:06 -0400 Subject: [PATCH 11/22] Changing column ordering on table --- src/components/list-tokens.js | 6 +++--- src/utils/chain_list.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/list-tokens.js b/src/components/list-tokens.js index b8a34d6..60c1467 100644 --- a/src/components/list-tokens.js +++ b/src/components/list-tokens.js @@ -114,6 +114,7 @@ export const ListItem = memo(function ListItem({ token }) { + {lookUpchain(token.chainId)} {token.symbol} {token?.tags?.length > 0 && ( @@ -123,7 +124,6 @@ export const ListItem = memo(function ListItem({ token }) { )} - {lookUpchain(token.chainId)} {`${toChecksumAddress(token.address)?.slice(0, 6)}...${toChecksumAddress(token.address)?.slice(38, 42)}`} @@ -200,9 +200,9 @@ export default function Tokens({ tokens }) {

Name

-

Symbol

+

Chain

+

Tags

-

Chain ID

Address

diff --git a/src/utils/chain_list.json b/src/utils/chain_list.json index e69d203..a1daf2c 100644 --- a/src/utils/chain_list.json +++ b/src/utils/chain_list.json @@ -1 +1 @@ -{"1":"Ethereum Mainnet","2":"Expanse Network","3":"Ropsten","4":"Rinkeby","5":"Görli","6":"Ethereum Classic Testnet Kotti","7":"ThaiChain","8":"Ubiq","9":"Ubiq Network Testnet","10":"Optimism","11":"Metadium Mainnet","12":"Metadium Testnet","13":"Diode Testnet Staging","14":"Flare Mainnet","15":"Diode Prenet","16":"Flare Testnet Coston","17":"ThaiChain 2.0 ThaiFi","18":"ThunderCore Testnet","19":"Songbird Canary-Network","20":"Elastos Smart Chain","21":"ELA-ETH-Sidechain Testnet","22":"ELA-DID-Sidechain Mainnet","23":"ELA-DID-Sidechain Testnet","24":"Dithereum Mainnet","25":"Cronos Mainnet Beta","26":"Genesis L1 testnet","27":"ShibaChain","28":"Boba Network Rinkeby Testnet","29":"Genesis L1","30":"RSK Mainnet","31":"RSK Testnet","32":"GoodData Testnet","33":"GoodData Mainnet","34":"Dithereum Testnet","35":"TBWG Chain","38":"Valorbit","40":"Telos EVM Mainnet","41":"Telos EVM Testnet","42":"Kovan","43":"Darwinia Pangolin Testnet","44":"Darwinia Crab Network","45":"Darwinia Pangoro Testnet","50":"XinFin Network Mainnet","51":"XinFin Apothem Testnet","52":"CoinEx Smart Chain Mainnet","53":"CoinEx Smart Chain Testnet","54":"Openpiece Mainnet","55":"Zyx Mainnet","56":"Binance Smart Chain Mainnet","57":"Syscoin Mainnet","58":"Ontology Mainnet","59":"EOS Mainnet","60":"GoChain","61":"Ethereum Classic Mainnet","62":"Ethereum Classic Testnet Morden","63":"Ethereum Classic Testnet Mordor","64":"Ellaism","65":"OKExChain Testnet","66":"OKXChain Mainnet","67":"DBChain Testnet","68":"SoterOne Mainnet","69":"Optimism Kovan","70":"Hoo Smart Chain","71":"Conflux eSpace (Testnet)","74":"IDChain Mainnet","76":"Mix","77":"POA Network Sokol","78":"PrimusChain mainnet","79":"Zenith Mainnet","80":"GeneChain","81":"Zenith Testnet (Vilnius)","82":"Meter Mainnet","83":"Meter Testnet","85":"GateChain Testnet","86":"GateChain Mainnet","87":"Nova Network","88":"TomoChain","89":"TomoChain Testnet","90":"Garizon Stage0","91":"Garizon Stage1","92":"Garizon Stage2","93":"Garizon Stage3","95":"CryptoKylin Testnet","96":"NEXT Smart Chain","97":"Binance Smart Chain Testnet","99":"POA Network Core","100":"Gnosis","101":"EtherInc","102":"Web3Games Testnet","105":"Web3Games Devnet","106":"Velas EVM Mainnet","107":"Nebula Testnet","108":"ThunderCore Mainnet","110":"Proton Testnet","111":"EtherLite Chain","122":"Fuse Mainnet","123":"Fuse Sparknet","124":"Decentralized Web Mainnet","125":"OYchain Testnet","126":"OYchain Mainnet","127":"Factory 127 Mainnet","128":"Huobi ECO Chain Mainnet","137":"Polygon Mainnet","141":"Openpiece Testnet","142":"DAX CHAIN","162":"Lightstreams Testnet","163":"Lightstreams Mainnet","168":"AIOZ Network","170":"HOO Smart Chain Testnet","172":"Latam-Blockchain Resil Testnet","186":"Seele Mainnet","188":"BMC Mainnet","189":"BMC Testnet","199":"BitTorrent Chain Mainnet","200":"Arbitrum on xDai","211":"Freight Trust Network","218":"SoterOne Mainnet old","222":"Permission","225":"LACHAIN Mainnet","226":"LACHAIN Testnet","239":"Aitd Testnet","246":"Energy Web Chain","250":"Fantom Opera","256":"Huobi ECO Chain Testnet","258":"Setheum","262":"SUR Blockchain Network","269":"High Performance Blockchain","288":"Boba Network","300":"Optimism on Gnosis Chain","321":"KCC Mainnet","322":"KCC Testnet","333":"Web3Q Mainnet","335":"DFK Chain Test","336":"Shiden","338":"Cronos Testnet","361":"Theta Mainnet","363":"Theta Sapphire Testnet","364":"Theta Amber Testnet","365":"Theta Testnet","369":"PulseChain Mainnet","385":"Lisinski","420":"Optimistic Ethereum Testnet Goerli","499":"Rupaya","512":"Double-A Chain Mainnet","513":"Double-A Chain Testnet","534":"Candle Mainnet","555":"Vela1 Chain Mainnet","558":"Tao Network","588":"Metis Stardust Testnet","592":"Astar","595":"Acala Mandala Testnet","596":"Karura Network Testnet","597":"Acala Network Testnet","600":"Meshnyan testnet","666":"Pixie Chain Testnet","686":"Karura Network","700":"Star Social Testnet","707":"BlockChain Station Mainnet","708":"BlockChain Station Testnet","721":"Factory 127 Testnet","776":"OpenChain Testnet","777":"cheapETH","787":"Acala Network","788":"Aerochain Testnet","803":"Haic","820":"Callisto Mainnet","821":"Callisto Testnet","880":"Ambros Chain Mainnet","888":"Wanchain","900":"Garizon Testnet Stage0","901":"Garizon Testnet Stage1","902":"Garizon Testnet Stage2","903":"Garizon Testnet Stage3","940":"PulseChain Testnet","941":"PulseChain Testnet v2b","942":"PulseChain Testnet v3","977":"Nepal Blockchain Network","998":"Lucky Network","999":"Wanchain Testnet","1001":"Klaytn Testnet Baobab","1007":"Newton Testnet","1008":"Eurus Mainnet","1010":"Evrice Network","1012":"Newton","1022":"Sakura","1023":"Clover Testnet","1024":"CLV Parachain","1028":"BitTorrent Chain Testnet","1030":"Conflux eSpace","1088":"Metis Andromeda Mainnet","1139":"MathChain","1140":"MathChain Testnet","1197":"Iora Chain","1201":"Evanesco Testnet","1202":"World Trade Technical Chain Mainnet","1213":"Popcateum Mainnet","1214":"EnterChain Mainnet","1280":"HALO Mainnet","1284":"Moonbeam","1285":"Moonriver","1286":"Moonrock old","1287":"Moonbase Alpha","1288":"Moonrock","1337":"CENNZnet old","1506":"Sherpax Mainnet","1507":"Sherpax Testnet","1618":"Catecoin Chain Mainnet","1620":"Atheios","1657":"Btachain","1688":"LUDAN Mainnet","1819":"Cube Chain Testnet","1856":"Teslafunds","1898":"BON Network","1984":"Eurus Testnet","1987":"EtherGem","2001":"Milkomeda C1 Mainnet","2008":"CloudWalk Testnet","2009":"CloudWalk Mainnet","2020":"420coin","2021":"Edgeware Mainnet","2022":"Beresheet Testnet","2023":"Taycan Testnet","2025":"Rangers Protocol Mainnet","2100":"Ecoball Mainnet","2101":"Ecoball Testnet Espuma","2152":"Findora Mainnet","2153":"Findora Testnet","2213":"Evanesco Mainnet","2221":"Kava EVM Testnet","2223":"VChain Mainnet","2559":"Kortho Mainnet","2569":"TechPay Mainnet","2612":"EZChain C-Chain Mainnet","2613":"EZChain C-Chain Testnet","3000":"Echelon","3001":"CENNZnet Nikau","3331":"ZCore Testnet","3333":"Web3Q Testnet","3334":"Web3Q Galileo","3400":"Paribu Net Mainnet","3500":"Paribu Net Testnet","3690":"Bittex Mainnet","3966":"DYNO Mainnet","3967":"DYNO Testnet","4002":"Fantom Testnet","4102":"AIOZ Network Testnet","4181":"PHI Network","4689":"IoTeX Network Mainnet","4690":"IoTeX Network Testnet","4918":"Venidium Testnet","5197":"EraSwap Mainnet","5315":"Uzmi Network Mainnet","5551":"Nahmii Mainnet","5553":"Nahmii Testnet","5700":"Syscoin Tanenbaum Testnet","5777":"Digest Swarm Chain","5851":"Ontology Testnet","5869":"Wegochain Rubidium Mainnet","6626":"Pixie Chain Mainnet","7341":"Shyft Mainnet","7878":"Hazlor Testnet","8000":"Teleport","8001":"Teleport Testnet","8029":"MDGL Testnet","8080":"GeneChain Adenine Testnet","8217":"Klaytn Mainnet Cypress","8285":"KorthoTest","8723":"TOOL Global Mainnet","8724":"TOOL Global Testnet","8888":"Ambros Chain Testnet","8898":"Mammoth Mainnet","8995":"bloxberg","9000":"Evmos Testnet","9001":"Evmos","9100":"Genesis Coin","9527":"Rangers Protocol Testnet Robin","9999":"myOwn Testnet","10000":"Smart Bitcoin Cash","10001":"Smart Bitcoin Cash Testnet","10101":"Blockchain Genesis Mainnet","10823":"CryptoCoinPay","10946":"Quadrans Blockchain","10947":"Quadrans Blockchain Testnet","11111":"WAGMI","11437":"Shyft Testnet","12051":"Singularity ZERO Testnet","12052":"Singularity ZERO Mainnet","13381":"Phoenix Mainnet","16000":"MetaDot Mainnet","16001":"MetaDot Testnet","19845":"BTCIX Network","21337":"CENNZnet Azalea","21816":"omChain Mainnet","22023":"Taycan","24484":"Webchain","24734":"MintMe.com Coin","26863":"OasisChain Mainnet","30067":"Piece testnet","31102":"Ethersocial Network","31337":"GoChain Testnet","32520":"Bitgert Mainnet","32659":"Fusion Mainnet","39797":"Energi Mainnet","42069":"pegglecoin","42161":"Arbitrum One","42220":"Celo Mainnet","42261":"Emerald Paratime Testnet","42262":"Emerald Paratime Mainnet","43110":"Athereum","43113":"Avalanche Fuji Testnet","43114":"Avalanche C-Chain","44787":"Celo Alfajores Testnet","45000":"Autobahn Network","47805":"REI Network","49797":"Energi Testnet","53935":"DFK Chain","55555":"REI Chain Mainnet","55556":"REI Chain Testnet","60000":"Thinkium Testnet Chain 0","60001":"Thinkium Testnet Chain 1","60002":"Thinkium Testnet Chain 2","60103":"Thinkium Testnet Chain 103","62320":"Celo Baklava Testnet","62621":"MultiVAC Mainnet","63000":"eCredits Mainnet","63001":"eCredits Testnet","69420":"Condrieu","70000":"Thinkium Mainnet Chain 0","70001":"Thinkium Mainnet Chain 1","70002":"Thinkium Mainnet Chain 2","70103":"Thinkium Mainnet Chain 103","71393":"Polyjuice Testnet","71401":"Godwoken Testnet (V1.1)","71402":"Godwoken Mainnet","73799":"Energy Web Volta Testnet","78110":"Firenze test network","80001":"Mumbai","99998":"UB Smart Chain(testnet)","99999":"UB Smart Chain","100000":"QuarkChain Mainnet Root","100001":"QuarkChain Mainnet Shard 0","100002":"QuarkChain Mainnet Shard 1","100003":"QuarkChain Mainnet Shard 2","100004":"QuarkChain Mainnet Shard 3","100005":"QuarkChain Mainnet Shard 4","100006":"QuarkChain Mainnet Shard 5","100007":"QuarkChain Mainnet Shard 6","100008":"QuarkChain Mainnet Shard 7","108801":"BROChain Mainnet","110000":"QuarkChain Devnet Root","110001":"QuarkChain Devnet Shard 0","110002":"QuarkChain Devnet Shard 1","110003":"QuarkChain Devnet Shard 2","110004":"QuarkChain Devnet Shard 3","110005":"QuarkChain Devnet Shard 4","110006":"QuarkChain Devnet Shard 5","110007":"QuarkChain Devnet Shard 6","110008":"QuarkChain Devnet Shard 7","200101":"Milkomeda C1 Testnet","200625":"Akroma","201018":"Alaya Mainnet","201030":"Alaya Dev Testnet","210425":"PlatON Mainnet","234666":"Haymo Testnet","246529":"ARTIS sigma1","246785":"ARTIS Testnet tau1","281121":"Social Smart Chain Mainnet","333888":"Polis Testnet","333999":"Polis Mainnet","421611":"Arbitrum Rinkeby","432201":"Dexalot Testnet","444900":"Weelink Testnet","474142":"OpenChain Mainnet","512512":"CMP-Testnet","666666":"Vision - Vpioneer Test Chain","888888":"Vision - Mainnet","955305":"Eluvio Content Fabric","1313114":"Etho Protocol","1313500":"Xerom","1337702":"Kintsugi","1337802":"Kiln","2203181":"PlatON Dev Testnet","7762959":"Musicoin","11155111":"Sepolia","13371337":"PepChain Churchill","18289463":"IOLite","20180430":"SmartMesh Mainnet","20181205":"quarkblockchain","28945486":"Auxilium Network Mainnet","35855456":"Joys Digital Mainnet","61717561":"Aquachain","99415706":"Joys Digital TestNet","192837465":"Gather Mainnet Network","245022926":"Neon EVM DevNet","245022934":"Neon EVM MainNet","245022940":"Neon EVM TestNet","311752642":"OneLedger Mainnet","356256156":"Gather Testnet Network","486217935":"Gather Devnet Network","1122334455":"IPOS Network","1313161554":"Aurora Mainnet","1313161555":"Aurora Testnet","1313161556":"Aurora Betanet","1666600000":"Harmony Mainnet Shard 0","1666600001":"Harmony Mainnet Shard 1","1666600002":"Harmony Mainnet Shard 2","1666600003":"Harmony Mainnet Shard 3","1666700000":"Harmony Testnet Shard 0","1666700001":"Harmony Testnet Shard 1","1666700002":"Harmony Testnet Shard 2","1666700003":"Harmony Testnet Shard 3","2021121117":"DataHopper","3125659152":"Pirl","4216137055":"OneLedger Testnet Frankenstein","11297108099":"Palm Testnet","11297108109":"Palm","197710212030":"Ntity Mainnet","197710212031":"Haradev Testnet","6022140761023":"Molereum Network","868455272153094":"Godwoken Testnet (V1)"} \ No newline at end of file +{"1":"Ethereum","2":"Expanse Network","3":"Ropsten","4":"Rinkeby","5":"Görli","6":"Ethereum Classic Testnet Kotti","7":"ThaiChain","8":"Ubiq","9":"Ubiq Network Testnet","10":"Optimism","11":"Metadium Mainnet","12":"Metadium Testnet","13":"Diode Testnet Staging","14":"Flare Mainnet","15":"Diode Prenet","16":"Flare Testnet Coston","17":"ThaiChain 2.0 ThaiFi","18":"ThunderCore Testnet","19":"Songbird Canary-Network","20":"Elastos Smart Chain","21":"ELA-ETH-Sidechain Testnet","22":"ELA-DID-Sidechain Mainnet","23":"ELA-DID-Sidechain Testnet","24":"Dithereum Mainnet","25":"Cronos Mainnet Beta","26":"Genesis L1 testnet","27":"ShibaChain","28":"Boba Network Rinkeby Testnet","29":"Genesis L1","30":"RSK Mainnet","31":"RSK Testnet","32":"GoodData Testnet","33":"GoodData Mainnet","34":"Dithereum Testnet","35":"TBWG Chain","38":"Valorbit","40":"Telos EVM Mainnet","41":"Telos EVM Testnet","42":"Kovan","43":"Darwinia Pangolin Testnet","44":"Darwinia Crab Network","45":"Darwinia Pangoro Testnet","50":"XinFin Network Mainnet","51":"XinFin Apothem Testnet","52":"CoinEx Smart Chain Mainnet","53":"CoinEx Smart Chain Testnet","54":"Openpiece Mainnet","55":"Zyx Mainnet","56":"Binance Smart Chain Mainnet","57":"Syscoin Mainnet","58":"Ontology Mainnet","59":"EOS Mainnet","60":"GoChain","61":"Ethereum Classic Mainnet","62":"Ethereum Classic Testnet Morden","63":"Ethereum Classic Testnet Mordor","64":"Ellaism","65":"OKExChain Testnet","66":"OKXChain Mainnet","67":"DBChain Testnet","68":"SoterOne Mainnet","69":"Optimism Kovan","70":"Hoo Smart Chain","71":"Conflux eSpace (Testnet)","74":"IDChain Mainnet","76":"Mix","77":"POA Network Sokol","78":"PrimusChain mainnet","79":"Zenith Mainnet","80":"GeneChain","81":"Zenith Testnet (Vilnius)","82":"Meter Mainnet","83":"Meter Testnet","85":"GateChain Testnet","86":"GateChain Mainnet","87":"Nova Network","88":"TomoChain","89":"TomoChain Testnet","90":"Garizon Stage0","91":"Garizon Stage1","92":"Garizon Stage2","93":"Garizon Stage3","95":"CryptoKylin Testnet","96":"NEXT Smart Chain","97":"Binance Smart Chain Testnet","99":"POA Network Core","100":"Gnosis","101":"EtherInc","102":"Web3Games Testnet","105":"Web3Games Devnet","106":"Velas EVM Mainnet","107":"Nebula Testnet","108":"ThunderCore Mainnet","110":"Proton Testnet","111":"EtherLite Chain","122":"Fuse Mainnet","123":"Fuse Sparknet","124":"Decentralized Web Mainnet","125":"OYchain Testnet","126":"OYchain Mainnet","127":"Factory 127 Mainnet","128":"Huobi ECO Chain Mainnet","137":"Polygon Mainnet","141":"Openpiece Testnet","142":"DAX CHAIN","162":"Lightstreams Testnet","163":"Lightstreams Mainnet","168":"AIOZ Network","170":"HOO Smart Chain Testnet","172":"Latam-Blockchain Resil Testnet","186":"Seele Mainnet","188":"BMC Mainnet","189":"BMC Testnet","199":"BitTorrent Chain Mainnet","200":"Arbitrum on xDai","211":"Freight Trust Network","218":"SoterOne Mainnet old","222":"Permission","225":"LACHAIN Mainnet","226":"LACHAIN Testnet","239":"Aitd Testnet","246":"Energy Web Chain","250":"Fantom Opera","256":"Huobi ECO Chain Testnet","258":"Setheum","262":"SUR Blockchain Network","269":"High Performance Blockchain","288":"Boba Network","300":"Optimism on Gnosis Chain","321":"KCC Mainnet","322":"KCC Testnet","333":"Web3Q Mainnet","335":"DFK Chain Test","336":"Shiden","338":"Cronos Testnet","361":"Theta Mainnet","363":"Theta Sapphire Testnet","364":"Theta Amber Testnet","365":"Theta Testnet","369":"PulseChain Mainnet","385":"Lisinski","420":"Optimistic Ethereum Testnet Goerli","499":"Rupaya","512":"Double-A Chain Mainnet","513":"Double-A Chain Testnet","534":"Candle Mainnet","555":"Vela1 Chain Mainnet","558":"Tao Network","588":"Metis Stardust Testnet","592":"Astar","595":"Acala Mandala Testnet","596":"Karura Network Testnet","597":"Acala Network Testnet","600":"Meshnyan testnet","666":"Pixie Chain Testnet","686":"Karura Network","700":"Star Social Testnet","707":"BlockChain Station Mainnet","708":"BlockChain Station Testnet","721":"Factory 127 Testnet","776":"OpenChain Testnet","777":"cheapETH","787":"Acala Network","788":"Aerochain Testnet","803":"Haic","820":"Callisto Mainnet","821":"Callisto Testnet","880":"Ambros Chain Mainnet","888":"Wanchain","900":"Garizon Testnet Stage0","901":"Garizon Testnet Stage1","902":"Garizon Testnet Stage2","903":"Garizon Testnet Stage3","940":"PulseChain Testnet","941":"PulseChain Testnet v2b","942":"PulseChain Testnet v3","977":"Nepal Blockchain Network","998":"Lucky Network","999":"Wanchain Testnet","1001":"Klaytn Testnet Baobab","1007":"Newton Testnet","1008":"Eurus Mainnet","1010":"Evrice Network","1012":"Newton","1022":"Sakura","1023":"Clover Testnet","1024":"CLV Parachain","1028":"BitTorrent Chain Testnet","1030":"Conflux eSpace","1088":"Metis Andromeda Mainnet","1139":"MathChain","1140":"MathChain Testnet","1197":"Iora Chain","1201":"Evanesco Testnet","1202":"World Trade Technical Chain Mainnet","1213":"Popcateum Mainnet","1214":"EnterChain Mainnet","1280":"HALO Mainnet","1284":"Moonbeam","1285":"Moonriver","1286":"Moonrock old","1287":"Moonbase Alpha","1288":"Moonrock","1337":"CENNZnet old","1506":"Sherpax Mainnet","1507":"Sherpax Testnet","1618":"Catecoin Chain Mainnet","1620":"Atheios","1657":"Btachain","1688":"LUDAN Mainnet","1819":"Cube Chain Testnet","1856":"Teslafunds","1898":"BON Network","1984":"Eurus Testnet","1987":"EtherGem","2001":"Milkomeda C1 Mainnet","2008":"CloudWalk Testnet","2009":"CloudWalk Mainnet","2020":"420coin","2021":"Edgeware Mainnet","2022":"Beresheet Testnet","2023":"Taycan Testnet","2025":"Rangers Protocol Mainnet","2100":"Ecoball Mainnet","2101":"Ecoball Testnet Espuma","2152":"Findora Mainnet","2153":"Findora Testnet","2213":"Evanesco Mainnet","2221":"Kava EVM Testnet","2223":"VChain Mainnet","2559":"Kortho Mainnet","2569":"TechPay Mainnet","2612":"EZChain C-Chain Mainnet","2613":"EZChain C-Chain Testnet","3000":"Echelon","3001":"CENNZnet Nikau","3331":"ZCore Testnet","3333":"Web3Q Testnet","3334":"Web3Q Galileo","3400":"Paribu Net Mainnet","3500":"Paribu Net Testnet","3690":"Bittex Mainnet","3966":"DYNO Mainnet","3967":"DYNO Testnet","4002":"Fantom Testnet","4102":"AIOZ Network Testnet","4181":"PHI Network","4689":"IoTeX Network Mainnet","4690":"IoTeX Network Testnet","4918":"Venidium Testnet","5197":"EraSwap Mainnet","5315":"Uzmi Network Mainnet","5551":"Nahmii Mainnet","5553":"Nahmii Testnet","5700":"Syscoin Tanenbaum Testnet","5777":"Digest Swarm Chain","5851":"Ontology Testnet","5869":"Wegochain Rubidium Mainnet","6626":"Pixie Chain Mainnet","7341":"Shyft Mainnet","7878":"Hazlor Testnet","8000":"Teleport","8001":"Teleport Testnet","8029":"MDGL Testnet","8080":"GeneChain Adenine Testnet","8217":"Klaytn Mainnet Cypress","8285":"KorthoTest","8723":"TOOL Global Mainnet","8724":"TOOL Global Testnet","8888":"Ambros Chain Testnet","8898":"Mammoth Mainnet","8995":"bloxberg","9000":"Evmos Testnet","9001":"Evmos","9100":"Genesis Coin","9527":"Rangers Protocol Testnet Robin","9999":"myOwn Testnet","10000":"Smart Bitcoin Cash","10001":"Smart Bitcoin Cash Testnet","10101":"Blockchain Genesis Mainnet","10823":"CryptoCoinPay","10946":"Quadrans Blockchain","10947":"Quadrans Blockchain Testnet","11111":"WAGMI","11437":"Shyft Testnet","12051":"Singularity ZERO Testnet","12052":"Singularity ZERO Mainnet","13381":"Phoenix Mainnet","16000":"MetaDot Mainnet","16001":"MetaDot Testnet","19845":"BTCIX Network","21337":"CENNZnet Azalea","21816":"omChain Mainnet","22023":"Taycan","24484":"Webchain","24734":"MintMe.com Coin","26863":"OasisChain Mainnet","30067":"Piece testnet","31102":"Ethersocial Network","31337":"GoChain Testnet","32520":"Bitgert Mainnet","32659":"Fusion Mainnet","39797":"Energi Mainnet","42069":"pegglecoin","42161":"Arbitrum One","42220":"Celo Mainnet","42261":"Emerald Paratime Testnet","42262":"Emerald Paratime Mainnet","43110":"Athereum","43113":"Avalanche Fuji Testnet","43114":"Avalanche C-Chain","44787":"Celo Alfajores Testnet","45000":"Autobahn Network","47805":"REI Network","49797":"Energi Testnet","53935":"DFK Chain","55555":"REI Chain Mainnet","55556":"REI Chain Testnet","60000":"Thinkium Testnet Chain 0","60001":"Thinkium Testnet Chain 1","60002":"Thinkium Testnet Chain 2","60103":"Thinkium Testnet Chain 103","62320":"Celo Baklava Testnet","62621":"MultiVAC Mainnet","63000":"eCredits Mainnet","63001":"eCredits Testnet","69420":"Condrieu","70000":"Thinkium Mainnet Chain 0","70001":"Thinkium Mainnet Chain 1","70002":"Thinkium Mainnet Chain 2","70103":"Thinkium Mainnet Chain 103","71393":"Polyjuice Testnet","71401":"Godwoken Testnet (V1.1)","71402":"Godwoken Mainnet","73799":"Energy Web Volta Testnet","78110":"Firenze test network","80001":"Mumbai","99998":"UB Smart Chain(testnet)","99999":"UB Smart Chain","100000":"QuarkChain Mainnet Root","100001":"QuarkChain Mainnet Shard 0","100002":"QuarkChain Mainnet Shard 1","100003":"QuarkChain Mainnet Shard 2","100004":"QuarkChain Mainnet Shard 3","100005":"QuarkChain Mainnet Shard 4","100006":"QuarkChain Mainnet Shard 5","100007":"QuarkChain Mainnet Shard 6","100008":"QuarkChain Mainnet Shard 7","108801":"BROChain Mainnet","110000":"QuarkChain Devnet Root","110001":"QuarkChain Devnet Shard 0","110002":"QuarkChain Devnet Shard 1","110003":"QuarkChain Devnet Shard 2","110004":"QuarkChain Devnet Shard 3","110005":"QuarkChain Devnet Shard 4","110006":"QuarkChain Devnet Shard 5","110007":"QuarkChain Devnet Shard 6","110008":"QuarkChain Devnet Shard 7","200101":"Milkomeda C1 Testnet","200625":"Akroma","201018":"Alaya Mainnet","201030":"Alaya Dev Testnet","210425":"PlatON Mainnet","234666":"Haymo Testnet","246529":"ARTIS sigma1","246785":"ARTIS Testnet tau1","281121":"Social Smart Chain Mainnet","333888":"Polis Testnet","333999":"Polis Mainnet","421611":"Arbitrum Rinkeby","432201":"Dexalot Testnet","444900":"Weelink Testnet","474142":"OpenChain Mainnet","512512":"CMP-Testnet","666666":"Vision - Vpioneer Test Chain","888888":"Vision - Mainnet","955305":"Eluvio Content Fabric","1313114":"Etho Protocol","1313500":"Xerom","1337702":"Kintsugi","1337802":"Kiln","2203181":"PlatON Dev Testnet","7762959":"Musicoin","11155111":"Sepolia","13371337":"PepChain Churchill","18289463":"IOLite","20180430":"SmartMesh Mainnet","20181205":"quarkblockchain","28945486":"Auxilium Network Mainnet","35855456":"Joys Digital Mainnet","61717561":"Aquachain","99415706":"Joys Digital TestNet","192837465":"Gather Mainnet Network","245022926":"Neon EVM DevNet","245022934":"Neon EVM MainNet","245022940":"Neon EVM TestNet","311752642":"OneLedger Mainnet","356256156":"Gather Testnet Network","486217935":"Gather Devnet Network","1122334455":"IPOS Network","1313161554":"Aurora Mainnet","1313161555":"Aurora Testnet","1313161556":"Aurora Betanet","1666600000":"Harmony Mainnet Shard 0","1666600001":"Harmony Mainnet Shard 1","1666600002":"Harmony Mainnet Shard 2","1666600003":"Harmony Mainnet Shard 3","1666700000":"Harmony Testnet Shard 0","1666700001":"Harmony Testnet Shard 1","1666700002":"Harmony Testnet Shard 2","1666700003":"Harmony Testnet Shard 3","2021121117":"DataHopper","3125659152":"Pirl","4216137055":"OneLedger Testnet Frankenstein","11297108099":"Palm Testnet","11297108109":"Palm","197710212030":"Ntity Mainnet","197710212031":"Haradev Testnet","6022140761023":"Molereum Network","868455272153094":"Godwoken Testnet (V1)"} \ No newline at end of file From 0e6ec1fca7e15dfc1e59e87ffd1b42201c419493 Mon Sep 17 00:00:00 2001 From: "Alex.Karys" Date: Thu, 9 Jun 2022 13:29:34 -0400 Subject: [PATCH 12/22] Remove extra space --- src/components/list-tokens.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/list-tokens.js b/src/components/list-tokens.js index 60c1467..b5e445b 100644 --- a/src/components/list-tokens.js +++ b/src/components/list-tokens.js @@ -201,7 +201,7 @@ export default function Tokens({ tokens }) {

Name

Chain

-

+

Symbol

Tags

Address From e540a980848df78f7138b02594672e8cd4da215e Mon Sep 17 00:00:00 2001 From: akarys92 Date: Thu, 9 Jun 2022 13:30:20 -0400 Subject: [PATCH 13/22] Update list.js --- src/pages/list.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/list.js b/src/pages/list.js index d05cd62..a22078e 100644 --- a/src/pages/list.js +++ b/src/pages/list.js @@ -52,7 +52,6 @@ function List() { const listIDs = useMemo(() => [listID], [listID]) const { list, loading, error } = useMultiFetch(listIDs)[listID] - return (

From 1a8cd95acd1409bdbc8fb185a90d9f4b706dcbe1 Mon Sep 17 00:00:00 2001 From: "Alex.Karys" Date: Thu, 16 Jun 2022 18:09:32 -0400 Subject: [PATCH 14/22] Making some adjustments from feedback on PR 1439 --- src/components/list-tokens.js | 3 ++- src/utils/{getChainId.js => getChainId.ts} | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) rename src/utils/{getChainId.js => getChainId.ts} (79%) diff --git a/src/components/list-tokens.js b/src/components/list-tokens.js index b5e445b..c64e058 100644 --- a/src/components/list-tokens.js +++ b/src/components/list-tokens.js @@ -86,7 +86,8 @@ const Chain = styled.span` ` export const ListItem = memo(function ListItem({ token }) { - const scannerUrl = lookupScanner(token.chainId) == "" ? "" : lookupScanner(token.chainId) + `${toChecksumAddress(token.address)}`; + const scanner = lookupScanner(token.chainId); + const scannerUrl = scanner == "" ? "" : scanner + `${toChecksumAddress(token.address)}`; return ( diff --git a/src/utils/getChainId.js b/src/utils/getChainId.ts similarity index 79% rename from src/utils/getChainId.js rename to src/utils/getChainId.ts index 69964f8..e56575e 100644 --- a/src/utils/getChainId.js +++ b/src/utils/getChainId.ts @@ -1,11 +1,13 @@ //TODO: Should probably make this dynamic -const list = require("./chain_list.json"); +// const list = require("./chain_list.json"); +import list from "./chain_list.json"; +const typedList : any = list; -export function lookUpchain(chainId) { - return list[chainId] || chainId; +export function lookUpchain(chainId: string) { + return typedList[chainId] || chainId; } -export function lookupScanner(chainId) { +export function lookupScanner(chainId: number) { switch(chainId) { // Mainnet case 1: From 09074fe30405fa149267c09049bcf44e9db9fa1d Mon Sep 17 00:00:00 2001 From: "Alex.Karys" Date: Fri, 17 Jun 2022 14:45:14 -0400 Subject: [PATCH 15/22] Reducing toCheckSum calls --- src/components/list-tokens.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/list-tokens.js b/src/components/list-tokens.js index c64e058..0072241 100644 --- a/src/components/list-tokens.js +++ b/src/components/list-tokens.js @@ -87,7 +87,8 @@ const Chain = styled.span` export const ListItem = memo(function ListItem({ token }) { const scanner = lookupScanner(token.chainId); - const scannerUrl = scanner == "" ? "" : scanner + `${toChecksumAddress(token.address)}`; + const tokenAddress = toChecksumAddress(token.address); + const scannerUrl = scanner == "" ? "" : scanner + tokenAddress; return ( @@ -110,7 +111,7 @@ export const ListItem = memo(function ListItem({ token }) { /> - + {token.name} @@ -127,7 +128,7 @@ export const ListItem = memo(function ListItem({ token }) { - {`${toChecksumAddress(token.address)?.slice(0, 6)}...${toChecksumAddress(token.address)?.slice(38, 42)}`} + {`${tokenAddress?.slice(0, 6)}...${tokenAddress?.slice(38, 42)}`} From 0d5290f76dccff1579e07ce10e766dd2f5f55403 Mon Sep 17 00:00:00 2001 From: cartcrom Date: Wed, 25 Jan 2023 14:42:37 -0500 Subject: [PATCH 16/22] feat: replaced all lists w/ uni lists --- src/token-lists.json | 134 ++----------------------------------------- 1 file changed, 5 insertions(+), 129 deletions(-) diff --git a/src/token-lists.json b/src/token-lists.json index a206e63..46ed251 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -1,138 +1,14 @@ { - "tokens.1inch.eth": { - "name": "1inch", - "homepage": "" - }, - "tokenlist.aave.eth": { - "name": "Aave Token List", - "homepage": "" - }, - "datafi.theagora.eth": { - "name": "Agora dataFi Tokens", - "homepage": "" - }, - "https://raw.githubusercontent.com/The-Blockchain-Association/sec-notice-list/master/ba-sec-list.json": { - "name": "Blockchain Association SEC Non Compliant List", - "homepage": "" - }, - "defi.cmc.eth": { - "name": "CMC DeFi", - "homepage": "" - }, - "stablecoin.cmc.eth": { - "name": "CMC Stablecoin", - "homepage": "" - }, - "erc20.cmc.eth": { - "name": "CMC200 ERC20", - "homepage": "" - }, - "https://compli.fi/complifi.tokenlist.json": { - "name": "CompliFi Originals", - "homepage": "" - }, - "https://tokens.coingecko.com/uniswap/all.json": { - "name": "CoinGecko", - "homepage": "" - }, - "https://www.coingecko.com/tokens_list/uniswap/defi_100/v_0_0_0.json": { - "name": "CoinGecko DeFi 100", - "homepage": "" - }, - "https://raw.githubusercontent.com/compound-finance/token-list/master/compound.tokenlist.json": { - "name": "Compound", - "homepage": "" - }, - "https://defiprime.com/defiprime.tokenlist.json": { - "name": "Defiprime", - "homepage": "" - }, - "https://raw.githubusercontent.com/b-u-i-d-l/bazar-tokens-list/master/dist/decentralizedFlexibleOrganizations.json": { - "name": "DFO Flexible Org", - "homepage": "" - }, - "tokenlist.dharma.eth": { - "name": "Dharma Token List", - "homepage": "" - }, - "https://cdn.furucombo.app/furucombo.tokenlist.json": { - "name": "Furucombo", - "homepage": "" - }, - "https://www.gemini.com/uniswap/manifest.json": { - "name": "Gemini Token List", - "homepage": "https://www.gemini.com/" - }, - "t2crtokens.eth": { - "name": "Kleros T2CR", - "homepage": "" - }, - "https://api.kyber.network/tokenlist": { - "name": "Kyber", - "homepage": "" - }, - "https://messari.io/tokenlist/messari-verified": { - "name": "Messari Verified", - "homepage": "" - }, - "https://uniswap.mycryptoapi.com/": { - "name": "MyCrypto", - "homepage": "" - }, - "https://raw.githubusercontent.com/opynfinance/opyn-tokenlist/master/opyn-v1.tokenlist.json": { - "name": "Opyn Token List", - "homepage": "" - }, - "https://static.optimism.io/optimism.tokenlist.json": { - "name": "Optimism", - "homepage": "https://optimism.io/" - }, - "https://app.tryroll.com/tokens.json": { - "name": "Roll Social Money", - "homepage": "" - }, - "https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/main/set.tokenlist.json": { - "name": "Set Protocol", - "homepage": "" - }, - "synths.snx.eth": { - "name": "Synthetix", - "homepage": "" - }, - "testnet.tokenlist.eth": { - "name": "Testnet Tokens", - "homepage": "" - }, - "list.tkn.eth": { - "name": "TokenDao", - "homepage": "https://tkn.eth.limo" - }, - "https://gateway.ipfs.io/ipns/tokens.uniswap.org": { + "https://tokens.uniswap.org": { "name": "Uniswap Default List", "homepage": "" }, - "https://raw.githubusercontent.com/jab416171/uniswap-pairtokens/master/uniswap_pair_tokens.json": { - "name": "Uniswap Token Pairs", - "homepage": "" - }, - "https://umaproject.org/uma.tokenlist.json": { - "name": "UMA", - "homepage": "" - }, - "wrapped.tokensoft.eth": { - "name": "Wrapped Tokens", - "homepage": "" - }, - "https://yearn.science/static/tokenlist.json": { - "name": "Yearn", - "homepage": "https://yearn.finance/" - }, - "https://zapper.fi/api/token-list": { - "name": "Zapper Token List", + "https://extendedtokens.uniswap.org/": { + "name": "Uniswap Extended List", "homepage": "" }, - "tokenlist.zerion.eth": { - "name": "Zerion Explore", + "https://unsupportedtokens.uniswap.org/": { + "name": "Uniswap Blocked List", "homepage": "" } } From 137fc8323844e99358c7020b3aa9ce8151c60578 Mon Sep 17 00:00:00 2001 From: cartcrom <39385577+cartcrom@users.noreply.github.com> Date: Wed, 25 Jan 2023 14:49:03 -0500 Subject: [PATCH 17/22] Revert "feat: replaced all lists w/ uni lists" --- src/token-lists.json | 134 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 129 insertions(+), 5 deletions(-) diff --git a/src/token-lists.json b/src/token-lists.json index 46ed251..a206e63 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -1,14 +1,138 @@ { - "https://tokens.uniswap.org": { + "tokens.1inch.eth": { + "name": "1inch", + "homepage": "" + }, + "tokenlist.aave.eth": { + "name": "Aave Token List", + "homepage": "" + }, + "datafi.theagora.eth": { + "name": "Agora dataFi Tokens", + "homepage": "" + }, + "https://raw.githubusercontent.com/The-Blockchain-Association/sec-notice-list/master/ba-sec-list.json": { + "name": "Blockchain Association SEC Non Compliant List", + "homepage": "" + }, + "defi.cmc.eth": { + "name": "CMC DeFi", + "homepage": "" + }, + "stablecoin.cmc.eth": { + "name": "CMC Stablecoin", + "homepage": "" + }, + "erc20.cmc.eth": { + "name": "CMC200 ERC20", + "homepage": "" + }, + "https://compli.fi/complifi.tokenlist.json": { + "name": "CompliFi Originals", + "homepage": "" + }, + "https://tokens.coingecko.com/uniswap/all.json": { + "name": "CoinGecko", + "homepage": "" + }, + "https://www.coingecko.com/tokens_list/uniswap/defi_100/v_0_0_0.json": { + "name": "CoinGecko DeFi 100", + "homepage": "" + }, + "https://raw.githubusercontent.com/compound-finance/token-list/master/compound.tokenlist.json": { + "name": "Compound", + "homepage": "" + }, + "https://defiprime.com/defiprime.tokenlist.json": { + "name": "Defiprime", + "homepage": "" + }, + "https://raw.githubusercontent.com/b-u-i-d-l/bazar-tokens-list/master/dist/decentralizedFlexibleOrganizations.json": { + "name": "DFO Flexible Org", + "homepage": "" + }, + "tokenlist.dharma.eth": { + "name": "Dharma Token List", + "homepage": "" + }, + "https://cdn.furucombo.app/furucombo.tokenlist.json": { + "name": "Furucombo", + "homepage": "" + }, + "https://www.gemini.com/uniswap/manifest.json": { + "name": "Gemini Token List", + "homepage": "https://www.gemini.com/" + }, + "t2crtokens.eth": { + "name": "Kleros T2CR", + "homepage": "" + }, + "https://api.kyber.network/tokenlist": { + "name": "Kyber", + "homepage": "" + }, + "https://messari.io/tokenlist/messari-verified": { + "name": "Messari Verified", + "homepage": "" + }, + "https://uniswap.mycryptoapi.com/": { + "name": "MyCrypto", + "homepage": "" + }, + "https://raw.githubusercontent.com/opynfinance/opyn-tokenlist/master/opyn-v1.tokenlist.json": { + "name": "Opyn Token List", + "homepage": "" + }, + "https://static.optimism.io/optimism.tokenlist.json": { + "name": "Optimism", + "homepage": "https://optimism.io/" + }, + "https://app.tryroll.com/tokens.json": { + "name": "Roll Social Money", + "homepage": "" + }, + "https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/main/set.tokenlist.json": { + "name": "Set Protocol", + "homepage": "" + }, + "synths.snx.eth": { + "name": "Synthetix", + "homepage": "" + }, + "testnet.tokenlist.eth": { + "name": "Testnet Tokens", + "homepage": "" + }, + "list.tkn.eth": { + "name": "TokenDao", + "homepage": "https://tkn.eth.limo" + }, + "https://gateway.ipfs.io/ipns/tokens.uniswap.org": { "name": "Uniswap Default List", "homepage": "" }, - "https://extendedtokens.uniswap.org/": { - "name": "Uniswap Extended List", + "https://raw.githubusercontent.com/jab416171/uniswap-pairtokens/master/uniswap_pair_tokens.json": { + "name": "Uniswap Token Pairs", + "homepage": "" + }, + "https://umaproject.org/uma.tokenlist.json": { + "name": "UMA", + "homepage": "" + }, + "wrapped.tokensoft.eth": { + "name": "Wrapped Tokens", + "homepage": "" + }, + "https://yearn.science/static/tokenlist.json": { + "name": "Yearn", + "homepage": "https://yearn.finance/" + }, + "https://zapper.fi/api/token-list": { + "name": "Zapper Token List", "homepage": "" }, - "https://unsupportedtokens.uniswap.org/": { - "name": "Uniswap Blocked List", + "tokenlist.zerion.eth": { + "name": "Zerion Explore", "homepage": "" } } From 72cccd740e5a1fbb8402c1823a381c7768694aba Mon Sep 17 00:00:00 2001 From: wanxin Date: Wed, 28 Jun 2023 16:39:23 -0400 Subject: [PATCH 18/22] changing / shortening description --- .github/ISSUE_TEMPLATE/add-list-request.md | 8 ++-- public/index.html | 14 +++--- src/pages/why.js | 55 +++------------------- 3 files changed, 16 insertions(+), 61 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/add-list-request.md b/.github/ISSUE_TEMPLATE/add-list-request.md index 6ce2480..d67368f 100644 --- a/.github/ISSUE_TEMPLATE/add-list-request.md +++ b/.github/ISSUE_TEMPLATE/add-list-request.md @@ -1,18 +1,16 @@ --- -name: Add Token List -about: Add a list to tokenlist.org +name: Add Hook List +about: Add a list to hooklist.org title: 'Request: add {List name}' labels: list-request assignees: '' --- -Before submission delete this line: -**THIS IS NOT A TOKEN LISTING REQUEST FORM. IF YOU DO NOT FOLLOW THE FORMAT OR MAKE A GENERIC TOKEN REQUEST YOUR ISSUE WILL BE DELETED WITHOUT COMMENT** **YOU MUST FOLLOW THE JSON SPECIFICATION** -https://github.com/Uniswap/token-lists +[https://github.com/Uniswap/token-lists] Checklist - [ ] **I understand that this is not the place to request token listing.** diff --git a/public/index.html b/public/index.html index 7690c84..0844072 100644 --- a/public/index.html +++ b/public/index.html @@ -26,30 +26,30 @@ --> - Ethereum token lists - + Uniswap v4 hook lists + - + - + diff --git a/src/pages/why.js b/src/pages/why.js index dc44e1a..7bcdc8e 100644 --- a/src/pages/why.js +++ b/src/pages/why.js @@ -15,61 +15,18 @@ function Home() {
A Uniswap project -

Why tokens lists?

+

Why hook lists?

- Token Lists aim to solve the problem of the Ethereum community creating, discovering and maintaining lists - of reputable tokens in a way that is inclusive, transparent, decentralized and open source. + Hook Lists aim to solve the problem of the Uniswap community creating, discovering and maintaining lists + of reputable hooks in a way that is inclusive, transparent, decentralized and open source.

- As the Ethereum ecosystem continues to evolve and mature, we are continuing to see sustained exponential - growth in the number of ERC-20 tokens being created and used by participants of the network. + As the Uniswap ecosystem continues to evolve and mature, we will see sustained + growth in the number of Uniswap v4 hooks being created and used by pools.

+

- This is an exciting success of permissionless innovation enabled by the open nature of blockchain - networks. Ethereum continues to prove out to be the most attractive platform for innovative projects in - decentralized finance. This is not surprising because it has the best tooling and ecosystem, making it the - best place for developers and entrepreneurs to build, as well as the most attractive place for users - because of the diversity of products and rapidly improving tools. -

-

The tradeoffs of permissionless innovation

-

- The permissionless nature of Ethereum and the ease of creating tokens also comes with tradeoffs. Since - there are no central gatekeepers, it becomes up to the users and projects in the space to establish trust - and reputation, as well as perform actions of moderation. How can users tell credible projects from scams? -

-

- Uniswap is a token marketplace that faces the issues of token reputation directly. Until now, the Uniswap - team took on the responsibility of curating the tokens that show up in the Uniswap Interface. While this - was important to get the project off the ground and protect the users of Uniswap, having the Uniswap team - curate tokens that show up in the interface was never considered a viable long-term strategy. -

-

- The ability to moderate token inclusion carries too much power and responsibility in a single gatekeeper. - That power residing solely in the Uniswap team was against the ethos of the protocol and the broader DeFi - ecosystem. -

-

Enter Token lists

-

- The goal of Token Lists is to enable trust to emerge around reputable tokens in a way that is aligned with - the values of decentralization. -

-

- The Ethereum community is known for solving problems as an ecosystem. Today exist numerous reputable - projects who are responsible for maintaining trustworthy lists of token projects. Until now, there hasn’t - been a standard, interoperable way for those projects to codify those lists and share them with the - broader community. -

-

- Token Lists is a new json schema standard that enables exactly this. Projects can encode lists of - reputable tokens in a machine readable way. Anyone can make a list. These lists can then be imported into - the Uniswap interface. -

-

- We imagine Token Lists being an important building block for the Ethereum ecosystem to self-govern - reputation around tokens and hope to see token lists used in other projects, as well as an ecosystem of - tools, dashboards, and discussion forums to emerge around them. -

From 7e304a40724019c1a3b6f82b3129df02951142a7 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Wed, 28 Jun 2023 16:45:00 -0400 Subject: [PATCH 19/22] hooks json --- src/components/card.js | 2 +- src/components/list-info.js | 7 +- src/components/list-tokens.js | 17 ++--- src/hooks.json | 42 +++++++++++ src/pages/list.js | 2 +- src/token-lists.json | 136 ++++------------------------------ src/utils/useMultiFetch.ts | 44 ++++------- 7 files changed, 86 insertions(+), 164 deletions(-) create mode 100644 src/hooks.json diff --git a/src/components/card.js b/src/components/card.js index 11fd9e5..2e031d4 100644 --- a/src/components/card.js +++ b/src/components/card.js @@ -82,7 +82,7 @@ export default function Card({ id, list, name }) {
{actualName} - {list?.tokens?.length > 0 ? `${list.tokens.length} tokens` : list === null ? 'Error' : 'Loading...'} + {list?.hooks?.length >= 0 ? `${list.hooks.length} Hooks` : list === null ? 'Error' : 'Loading...'}
diff --git a/src/components/list-info.js b/src/components/list-info.js index 931a664..af0f29b 100644 --- a/src/components/list-info.js +++ b/src/components/list-info.js @@ -1,9 +1,9 @@ import React from 'react' +import Moment from 'react-moment' import styled from 'styled-components' +import { getListURLFromListID } from '../utils/useMultiFetch' import Card from './card' -import Moment from 'react-moment' import CopyHelper from './copy' -import { getListURLFromListID } from '../utils/useMultiFetch' const StyledInfo = styled.section` display: grid; @@ -91,8 +91,7 @@ export default function Info({ listID, list }) {

- Version -

{`${list.version.major}.${list.version.minor}.${list.version.patch}`}

+ Version

{`${list.version.major}.${list.version.minor}.${list.version.patch}`}

diff --git a/src/components/list-tokens.js b/src/components/list-tokens.js index 0072241..ff50adb 100644 --- a/src/components/list-tokens.js +++ b/src/components/list-tokens.js @@ -1,8 +1,8 @@ -import React, { useState, memo } from 'react' +import React, { memo, useState } from 'react' import styled from 'styled-components' -import Search from './search' -import CopyHelper from './copy' import { lookUpchain, lookupScanner } from '../utils/getChainId' +import CopyHelper from './copy' +import Search from './search' import { toChecksumAddress } from 'ethereumjs-util' import FilterResults from 'react-filter-search' @@ -86,9 +86,9 @@ const Chain = styled.span` ` export const ListItem = memo(function ListItem({ token }) { - const scanner = lookupScanner(token.chainId); - const tokenAddress = toChecksumAddress(token.address); - const scannerUrl = scanner == "" ? "" : scanner + tokenAddress; + const scanner = lookupScanner(token.chainId) + const tokenAddress = toChecksumAddress(token.address) + const scannerUrl = scanner == '' ? '' : scanner + tokenAddress return ( @@ -182,9 +182,8 @@ const ListHeader = styled.div` export default function Tokens({ tokens }) { const [value, setValue] = useState('') - const sortedTokens = tokens.sort((a,b) =>{ - return a.symbol > b.symbol ? 1 : - a.symbol < b.symbol ? -1 : 0; + const sortedTokens = tokens.sort((a, b) => { + return a.name > b.name ? 1 : a.name < b.name ? -1 : 0 }) function handleChange(e) { diff --git a/src/hooks.json b/src/hooks.json new file mode 100644 index 0000000..16a1783 --- /dev/null +++ b/src/hooks.json @@ -0,0 +1,42 @@ +{ + "arrakis": { + "name": "Arrakis", + "version": { "major": 1, "minor": 0, "patch": 0 }, + "hooks": [] + }, + "blackrock": { + "name": "Blackrock", + "version": { "major": 1, "minor": 0, "patch": 0 }, + "hooks": [] + }, + "euler": { + "name": "Euler", + "version": { "major": 1, "minor": 0, "patch": 0 }, + "hooks": [] + }, + "froggy": { + "name": "Froggy Friends", + "version": { "major": 1, "minor": 0, "patch": 0 }, + "hooks": [] + }, + "infinity": { + "name": "Infinity Pool", + "version": { "major": 1, "minor": 0, "patch": 0 }, + "hooks": [] + }, + "chase": { + "name": "J.P. Morgan Chase", + "version": { "major": 0, "minor": 0, "patch": 420 }, + "hooks": [] + }, + "panoptic": { + "name": "Panoptic", + "version": { "major": 1, "minor": 0, "patch": 0 }, + "hooks": [] + }, + "sushi": { + "name": "Sushiswap", + "version": { "major": 1, "minor": 0, "patch": 0 }, + "hooks": [] + } +} diff --git a/src/pages/list.js b/src/pages/list.js index a22078e..6d5d094 100644 --- a/src/pages/list.js +++ b/src/pages/list.js @@ -69,7 +69,7 @@ function List() { ) : ( - + )}
diff --git a/src/token-lists.json b/src/token-lists.json index a206e63..b0aa241 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -1,138 +1,34 @@ { - "tokens.1inch.eth": { - "name": "1inch", + "arrakis": { + "name": "Arrakis", "homepage": "" }, - "tokenlist.aave.eth": { - "name": "Aave Token List", + "blackrock": { + "name": "Blackrock", "homepage": "" }, - "datafi.theagora.eth": { - "name": "Agora dataFi Tokens", + "euler": { + "name": "Euler", "homepage": "" }, - "https://raw.githubusercontent.com/The-Blockchain-Association/sec-notice-list/master/ba-sec-list.json": { - "name": "Blockchain Association SEC Non Compliant List", + "froggy": { + "name": "Froggy Friends", "homepage": "" }, - "defi.cmc.eth": { - "name": "CMC DeFi", + "infinity": { + "name": "Infinity Pool", "homepage": "" }, - "stablecoin.cmc.eth": { - "name": "CMC Stablecoin", + "chase": { + "name": "J.P. Morgan Chase", "homepage": "" }, - "erc20.cmc.eth": { - "name": "CMC200 ERC20", + "panoptic": { + "name": "Panoptic", "homepage": "" }, - "https://compli.fi/complifi.tokenlist.json": { - "name": "CompliFi Originals", - "homepage": "" - }, - "https://tokens.coingecko.com/uniswap/all.json": { - "name": "CoinGecko", - "homepage": "" - }, - "https://www.coingecko.com/tokens_list/uniswap/defi_100/v_0_0_0.json": { - "name": "CoinGecko DeFi 100", - "homepage": "" - }, - "https://raw.githubusercontent.com/compound-finance/token-list/master/compound.tokenlist.json": { - "name": "Compound", - "homepage": "" - }, - "https://defiprime.com/defiprime.tokenlist.json": { - "name": "Defiprime", - "homepage": "" - }, - "https://raw.githubusercontent.com/b-u-i-d-l/bazar-tokens-list/master/dist/decentralizedFlexibleOrganizations.json": { - "name": "DFO Flexible Org", - "homepage": "" - }, - "tokenlist.dharma.eth": { - "name": "Dharma Token List", - "homepage": "" - }, - "https://cdn.furucombo.app/furucombo.tokenlist.json": { - "name": "Furucombo", - "homepage": "" - }, - "https://www.gemini.com/uniswap/manifest.json": { - "name": "Gemini Token List", - "homepage": "https://www.gemini.com/" - }, - "t2crtokens.eth": { - "name": "Kleros T2CR", - "homepage": "" - }, - "https://api.kyber.network/tokenlist": { - "name": "Kyber", - "homepage": "" - }, - "https://messari.io/tokenlist/messari-verified": { - "name": "Messari Verified", - "homepage": "" - }, - "https://uniswap.mycryptoapi.com/": { - "name": "MyCrypto", - "homepage": "" - }, - "https://raw.githubusercontent.com/opynfinance/opyn-tokenlist/master/opyn-v1.tokenlist.json": { - "name": "Opyn Token List", - "homepage": "" - }, - "https://static.optimism.io/optimism.tokenlist.json": { - "name": "Optimism", - "homepage": "https://optimism.io/" - }, - "https://app.tryroll.com/tokens.json": { - "name": "Roll Social Money", - "homepage": "" - }, - "https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/main/set.tokenlist.json": { - "name": "Set Protocol", - "homepage": "" - }, - "synths.snx.eth": { - "name": "Synthetix", - "homepage": "" - }, - "testnet.tokenlist.eth": { - "name": "Testnet Tokens", - "homepage": "" - }, - "list.tkn.eth": { - "name": "TokenDao", - "homepage": "https://tkn.eth.limo" - }, - "https://gateway.ipfs.io/ipns/tokens.uniswap.org": { - "name": "Uniswap Default List", - "homepage": "" - }, - "https://raw.githubusercontent.com/jab416171/uniswap-pairtokens/master/uniswap_pair_tokens.json": { - "name": "Uniswap Token Pairs", - "homepage": "" - }, - "https://umaproject.org/uma.tokenlist.json": { - "name": "UMA", - "homepage": "" - }, - "wrapped.tokensoft.eth": { - "name": "Wrapped Tokens", - "homepage": "" - }, - "https://yearn.science/static/tokenlist.json": { - "name": "Yearn", - "homepage": "https://yearn.finance/" - }, - "https://zapper.fi/api/token-list": { - "name": "Zapper Token List", - "homepage": "" - }, - "tokenlist.zerion.eth": { - "name": "Zerion Explore", + "sushi": { + "name": "Sushiswap", "homepage": "" } } diff --git a/src/utils/useMultiFetch.ts b/src/utils/useMultiFetch.ts index 875c0c9..479b5e4 100644 --- a/src/utils/useMultiFetch.ts +++ b/src/utils/useMultiFetch.ts @@ -1,4 +1,5 @@ -import { useState, useEffect, useMemo } from 'react' +import { useEffect, useMemo, useState } from 'react' +import hooksLists from '../hooks.json' interface ListReturn { list: any | undefined | null // TODO replace any @@ -7,14 +8,15 @@ interface ListReturn { } export function getListURLFromListID(listID: string): string { - if (listID.startsWith('https://')) { - return listID - } else if (listID?.endsWith('.eth')) { - // proxy http urls through a CF worker - return `https://wispy-bird-88a7.uniswap.workers.dev/?url=${`http://${listID}.link`}` - } else { - throw Error(`Unrecognized listId ${listID}`) - } + // if (listID.startsWith('https://')) { + // return listID + // } else if (listID?.endsWith('.eth')) { + // // proxy http urls through a CF worker + // return `https://wispy-bird-88a7.uniswap.workers.dev/?url=${`http://${listID}.link`}` + // } else { + // throw Error(`Unrecognized listId ${listID}`) + // } + return listID } export function useMultiFetch(listIDs: string[] = []): { [listID: string]: ListReturn } { @@ -24,26 +26,10 @@ export function useMultiFetch(listIDs: string[] = []): { [listID: string]: ListR if (listIDs.length > 0) { let stale = false - listIDs.forEach((listID) => - fetch(getListURLFromListID(listID)) - .then((response) => { - if (!response.ok) { - throw new Error('Network response was not ok') - } - return response.json() - }) - .then((list) => { - if (!stale) { - setLists((lists) => ({ ...lists, [listID]: list })) - } - }) - .catch((error) => { - if (!stale) { - console.error(`Failed to fetch ${listID} at ${getListURLFromListID(listID)}`, error) - setLists((lists) => ({ ...lists, [listID]: null })) - } - }) - ) + listIDs.forEach((listID) => { + const list = (hooksLists as Record)[listID] + setLists((lists) => ({ ...lists, [listID]: list })) + }) return () => { stale = true From e8f3cf0a05770385f89e3300e62ec407f2fd6fba Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Wed, 28 Jun 2023 16:47:03 -0400 Subject: [PATCH 20/22] Revert "changing / shortening description" This reverts commit 72cccd740e5a1fbb8402c1823a381c7768694aba. --- .github/ISSUE_TEMPLATE/add-list-request.md | 8 ++-- public/index.html | 14 +++--- src/pages/why.js | 55 +++++++++++++++++++--- 3 files changed, 61 insertions(+), 16 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/add-list-request.md b/.github/ISSUE_TEMPLATE/add-list-request.md index d67368f..6ce2480 100644 --- a/.github/ISSUE_TEMPLATE/add-list-request.md +++ b/.github/ISSUE_TEMPLATE/add-list-request.md @@ -1,16 +1,18 @@ --- -name: Add Hook List -about: Add a list to hooklist.org +name: Add Token List +about: Add a list to tokenlist.org title: 'Request: add {List name}' labels: list-request assignees: '' --- +Before submission delete this line: +**THIS IS NOT A TOKEN LISTING REQUEST FORM. IF YOU DO NOT FOLLOW THE FORMAT OR MAKE A GENERIC TOKEN REQUEST YOUR ISSUE WILL BE DELETED WITHOUT COMMENT** **YOU MUST FOLLOW THE JSON SPECIFICATION** -[https://github.com/Uniswap/token-lists] +https://github.com/Uniswap/token-lists Checklist - [ ] **I understand that this is not the place to request token listing.** diff --git a/public/index.html b/public/index.html index 0844072..7690c84 100644 --- a/public/index.html +++ b/public/index.html @@ -26,30 +26,30 @@ --> - Uniswap v4 hook lists - + Ethereum token lists + - + - + diff --git a/src/pages/why.js b/src/pages/why.js index 7bcdc8e..dc44e1a 100644 --- a/src/pages/why.js +++ b/src/pages/why.js @@ -15,18 +15,61 @@ function Home() {
A Uniswap project -

Why hook lists?

+

Why tokens lists?

- Hook Lists aim to solve the problem of the Uniswap community creating, discovering and maintaining lists - of reputable hooks in a way that is inclusive, transparent, decentralized and open source. + Token Lists aim to solve the problem of the Ethereum community creating, discovering and maintaining lists + of reputable tokens in a way that is inclusive, transparent, decentralized and open source.

- As the Uniswap ecosystem continues to evolve and mature, we will see sustained - growth in the number of Uniswap v4 hooks being created and used by pools. + As the Ethereum ecosystem continues to evolve and mature, we are continuing to see sustained exponential + growth in the number of ERC-20 tokens being created and used by participants of the network.

-

+ This is an exciting success of permissionless innovation enabled by the open nature of blockchain + networks. Ethereum continues to prove out to be the most attractive platform for innovative projects in + decentralized finance. This is not surprising because it has the best tooling and ecosystem, making it the + best place for developers and entrepreneurs to build, as well as the most attractive place for users + because of the diversity of products and rapidly improving tools. +

+

The tradeoffs of permissionless innovation

+

+ The permissionless nature of Ethereum and the ease of creating tokens also comes with tradeoffs. Since + there are no central gatekeepers, it becomes up to the users and projects in the space to establish trust + and reputation, as well as perform actions of moderation. How can users tell credible projects from scams? +

+

+ Uniswap is a token marketplace that faces the issues of token reputation directly. Until now, the Uniswap + team took on the responsibility of curating the tokens that show up in the Uniswap Interface. While this + was important to get the project off the ground and protect the users of Uniswap, having the Uniswap team + curate tokens that show up in the interface was never considered a viable long-term strategy. +

+

+ The ability to moderate token inclusion carries too much power and responsibility in a single gatekeeper. + That power residing solely in the Uniswap team was against the ethos of the protocol and the broader DeFi + ecosystem. +

+

Enter Token lists

+

+ The goal of Token Lists is to enable trust to emerge around reputable tokens in a way that is aligned with + the values of decentralization. +

+

+ The Ethereum community is known for solving problems as an ecosystem. Today exist numerous reputable + projects who are responsible for maintaining trustworthy lists of token projects. Until now, there hasn’t + been a standard, interoperable way for those projects to codify those lists and share them with the + broader community. +

+

+ Token Lists is a new json schema standard that enables exactly this. Projects can encode lists of + reputable tokens in a machine readable way. Anyone can make a list. These lists can then be imported into + the Uniswap interface. +

+

+ We imagine Token Lists being an important building block for the Ethereum ecosystem to self-govern + reputation around tokens and hope to see token lists used in other projects, as well as an ecosystem of + tools, dashboards, and discussion forums to emerge around them. +

From bb5e24d34455e8d07b3481061536bb271e5fa7b6 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Wed, 28 Jun 2023 16:53:19 -0400 Subject: [PATCH 21/22] Revert "hooks json" This reverts commit 7e304a40724019c1a3b6f82b3129df02951142a7. --- src/components/card.js | 2 +- src/components/list-info.js | 7 +- src/components/list-tokens.js | 17 +++-- src/hooks.json | 42 ----------- src/pages/list.js | 2 +- src/token-lists.json | 136 ++++++++++++++++++++++++++++++---- src/utils/useMultiFetch.ts | 44 +++++++---- 7 files changed, 164 insertions(+), 86 deletions(-) delete mode 100644 src/hooks.json diff --git a/src/components/card.js b/src/components/card.js index 2e031d4..11fd9e5 100644 --- a/src/components/card.js +++ b/src/components/card.js @@ -82,7 +82,7 @@ export default function Card({ id, list, name }) {
{actualName} - {list?.hooks?.length >= 0 ? `${list.hooks.length} Hooks` : list === null ? 'Error' : 'Loading...'} + {list?.tokens?.length > 0 ? `${list.tokens.length} tokens` : list === null ? 'Error' : 'Loading...'}
diff --git a/src/components/list-info.js b/src/components/list-info.js index af0f29b..931a664 100644 --- a/src/components/list-info.js +++ b/src/components/list-info.js @@ -1,9 +1,9 @@ import React from 'react' -import Moment from 'react-moment' import styled from 'styled-components' -import { getListURLFromListID } from '../utils/useMultiFetch' import Card from './card' +import Moment from 'react-moment' import CopyHelper from './copy' +import { getListURLFromListID } from '../utils/useMultiFetch' const StyledInfo = styled.section` display: grid; @@ -91,7 +91,8 @@ export default function Info({ listID, list }) {

- Version

{`${list.version.major}.${list.version.minor}.${list.version.patch}`}

+ Version +

{`${list.version.major}.${list.version.minor}.${list.version.patch}`}

diff --git a/src/components/list-tokens.js b/src/components/list-tokens.js index ff50adb..0072241 100644 --- a/src/components/list-tokens.js +++ b/src/components/list-tokens.js @@ -1,8 +1,8 @@ -import React, { memo, useState } from 'react' +import React, { useState, memo } from 'react' import styled from 'styled-components' -import { lookUpchain, lookupScanner } from '../utils/getChainId' -import CopyHelper from './copy' import Search from './search' +import CopyHelper from './copy' +import { lookUpchain, lookupScanner } from '../utils/getChainId' import { toChecksumAddress } from 'ethereumjs-util' import FilterResults from 'react-filter-search' @@ -86,9 +86,9 @@ const Chain = styled.span` ` export const ListItem = memo(function ListItem({ token }) { - const scanner = lookupScanner(token.chainId) - const tokenAddress = toChecksumAddress(token.address) - const scannerUrl = scanner == '' ? '' : scanner + tokenAddress + const scanner = lookupScanner(token.chainId); + const tokenAddress = toChecksumAddress(token.address); + const scannerUrl = scanner == "" ? "" : scanner + tokenAddress; return ( @@ -182,8 +182,9 @@ const ListHeader = styled.div` export default function Tokens({ tokens }) { const [value, setValue] = useState('') - const sortedTokens = tokens.sort((a, b) => { - return a.name > b.name ? 1 : a.name < b.name ? -1 : 0 + const sortedTokens = tokens.sort((a,b) =>{ + return a.symbol > b.symbol ? 1 : + a.symbol < b.symbol ? -1 : 0; }) function handleChange(e) { diff --git a/src/hooks.json b/src/hooks.json deleted file mode 100644 index 16a1783..0000000 --- a/src/hooks.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "arrakis": { - "name": "Arrakis", - "version": { "major": 1, "minor": 0, "patch": 0 }, - "hooks": [] - }, - "blackrock": { - "name": "Blackrock", - "version": { "major": 1, "minor": 0, "patch": 0 }, - "hooks": [] - }, - "euler": { - "name": "Euler", - "version": { "major": 1, "minor": 0, "patch": 0 }, - "hooks": [] - }, - "froggy": { - "name": "Froggy Friends", - "version": { "major": 1, "minor": 0, "patch": 0 }, - "hooks": [] - }, - "infinity": { - "name": "Infinity Pool", - "version": { "major": 1, "minor": 0, "patch": 0 }, - "hooks": [] - }, - "chase": { - "name": "J.P. Morgan Chase", - "version": { "major": 0, "minor": 0, "patch": 420 }, - "hooks": [] - }, - "panoptic": { - "name": "Panoptic", - "version": { "major": 1, "minor": 0, "patch": 0 }, - "hooks": [] - }, - "sushi": { - "name": "Sushiswap", - "version": { "major": 1, "minor": 0, "patch": 0 }, - "hooks": [] - } -} diff --git a/src/pages/list.js b/src/pages/list.js index 6d5d094..a22078e 100644 --- a/src/pages/list.js +++ b/src/pages/list.js @@ -69,7 +69,7 @@ function List() { ) : ( - + )} diff --git a/src/token-lists.json b/src/token-lists.json index b0aa241..a206e63 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -1,34 +1,138 @@ { - "arrakis": { - "name": "Arrakis", + "tokens.1inch.eth": { + "name": "1inch", "homepage": "" }, - "blackrock": { - "name": "Blackrock", + "tokenlist.aave.eth": { + "name": "Aave Token List", "homepage": "" }, - "euler": { - "name": "Euler", + "datafi.theagora.eth": { + "name": "Agora dataFi Tokens", "homepage": "" }, - "froggy": { - "name": "Froggy Friends", + "https://raw.githubusercontent.com/The-Blockchain-Association/sec-notice-list/master/ba-sec-list.json": { + "name": "Blockchain Association SEC Non Compliant List", "homepage": "" }, - "infinity": { - "name": "Infinity Pool", + "defi.cmc.eth": { + "name": "CMC DeFi", "homepage": "" }, - "chase": { - "name": "J.P. Morgan Chase", + "stablecoin.cmc.eth": { + "name": "CMC Stablecoin", "homepage": "" }, - "panoptic": { - "name": "Panoptic", + "erc20.cmc.eth": { + "name": "CMC200 ERC20", "homepage": "" }, - "sushi": { - "name": "Sushiswap", + "https://compli.fi/complifi.tokenlist.json": { + "name": "CompliFi Originals", + "homepage": "" + }, + "https://tokens.coingecko.com/uniswap/all.json": { + "name": "CoinGecko", + "homepage": "" + }, + "https://www.coingecko.com/tokens_list/uniswap/defi_100/v_0_0_0.json": { + "name": "CoinGecko DeFi 100", + "homepage": "" + }, + "https://raw.githubusercontent.com/compound-finance/token-list/master/compound.tokenlist.json": { + "name": "Compound", + "homepage": "" + }, + "https://defiprime.com/defiprime.tokenlist.json": { + "name": "Defiprime", + "homepage": "" + }, + "https://raw.githubusercontent.com/b-u-i-d-l/bazar-tokens-list/master/dist/decentralizedFlexibleOrganizations.json": { + "name": "DFO Flexible Org", + "homepage": "" + }, + "tokenlist.dharma.eth": { + "name": "Dharma Token List", + "homepage": "" + }, + "https://cdn.furucombo.app/furucombo.tokenlist.json": { + "name": "Furucombo", + "homepage": "" + }, + "https://www.gemini.com/uniswap/manifest.json": { + "name": "Gemini Token List", + "homepage": "https://www.gemini.com/" + }, + "t2crtokens.eth": { + "name": "Kleros T2CR", + "homepage": "" + }, + "https://api.kyber.network/tokenlist": { + "name": "Kyber", + "homepage": "" + }, + "https://messari.io/tokenlist/messari-verified": { + "name": "Messari Verified", + "homepage": "" + }, + "https://uniswap.mycryptoapi.com/": { + "name": "MyCrypto", + "homepage": "" + }, + "https://raw.githubusercontent.com/opynfinance/opyn-tokenlist/master/opyn-v1.tokenlist.json": { + "name": "Opyn Token List", + "homepage": "" + }, + "https://static.optimism.io/optimism.tokenlist.json": { + "name": "Optimism", + "homepage": "https://optimism.io/" + }, + "https://app.tryroll.com/tokens.json": { + "name": "Roll Social Money", + "homepage": "" + }, + "https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/main/set.tokenlist.json": { + "name": "Set Protocol", + "homepage": "" + }, + "synths.snx.eth": { + "name": "Synthetix", + "homepage": "" + }, + "testnet.tokenlist.eth": { + "name": "Testnet Tokens", + "homepage": "" + }, + "list.tkn.eth": { + "name": "TokenDao", + "homepage": "https://tkn.eth.limo" + }, + "https://gateway.ipfs.io/ipns/tokens.uniswap.org": { + "name": "Uniswap Default List", + "homepage": "" + }, + "https://raw.githubusercontent.com/jab416171/uniswap-pairtokens/master/uniswap_pair_tokens.json": { + "name": "Uniswap Token Pairs", + "homepage": "" + }, + "https://umaproject.org/uma.tokenlist.json": { + "name": "UMA", + "homepage": "" + }, + "wrapped.tokensoft.eth": { + "name": "Wrapped Tokens", + "homepage": "" + }, + "https://yearn.science/static/tokenlist.json": { + "name": "Yearn", + "homepage": "https://yearn.finance/" + }, + "https://zapper.fi/api/token-list": { + "name": "Zapper Token List", + "homepage": "" + }, + "tokenlist.zerion.eth": { + "name": "Zerion Explore", "homepage": "" } } diff --git a/src/utils/useMultiFetch.ts b/src/utils/useMultiFetch.ts index 479b5e4..875c0c9 100644 --- a/src/utils/useMultiFetch.ts +++ b/src/utils/useMultiFetch.ts @@ -1,5 +1,4 @@ -import { useEffect, useMemo, useState } from 'react' -import hooksLists from '../hooks.json' +import { useState, useEffect, useMemo } from 'react' interface ListReturn { list: any | undefined | null // TODO replace any @@ -8,15 +7,14 @@ interface ListReturn { } export function getListURLFromListID(listID: string): string { - // if (listID.startsWith('https://')) { - // return listID - // } else if (listID?.endsWith('.eth')) { - // // proxy http urls through a CF worker - // return `https://wispy-bird-88a7.uniswap.workers.dev/?url=${`http://${listID}.link`}` - // } else { - // throw Error(`Unrecognized listId ${listID}`) - // } - return listID + if (listID.startsWith('https://')) { + return listID + } else if (listID?.endsWith('.eth')) { + // proxy http urls through a CF worker + return `https://wispy-bird-88a7.uniswap.workers.dev/?url=${`http://${listID}.link`}` + } else { + throw Error(`Unrecognized listId ${listID}`) + } } export function useMultiFetch(listIDs: string[] = []): { [listID: string]: ListReturn } { @@ -26,10 +24,26 @@ export function useMultiFetch(listIDs: string[] = []): { [listID: string]: ListR if (listIDs.length > 0) { let stale = false - listIDs.forEach((listID) => { - const list = (hooksLists as Record)[listID] - setLists((lists) => ({ ...lists, [listID]: list })) - }) + listIDs.forEach((listID) => + fetch(getListURLFromListID(listID)) + .then((response) => { + if (!response.ok) { + throw new Error('Network response was not ok') + } + return response.json() + }) + .then((list) => { + if (!stale) { + setLists((lists) => ({ ...lists, [listID]: list })) + } + }) + .catch((error) => { + if (!stale) { + console.error(`Failed to fetch ${listID} at ${getListURLFromListID(listID)}`, error) + setLists((lists) => ({ ...lists, [listID]: null })) + } + }) + ) return () => { stale = true From e5720e1f9b238c5ad935d6f73cf895cca67bb091 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Wed, 28 Aug 2024 07:22:11 -0700 Subject: [PATCH 22/22] Update default token list url --- src/token-lists.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token-lists.json b/src/token-lists.json index a206e63..40b9867 100644 --- a/src/token-lists.json +++ b/src/token-lists.json @@ -107,7 +107,7 @@ "name": "TokenDao", "homepage": "https://tkn.eth.limo" }, - "https://gateway.ipfs.io/ipns/tokens.uniswap.org": { + "https://ipfs.io/ipns/tokens.uniswap.org": { "name": "Uniswap Default List", "homepage": "" },