Uniswap / web3-react

A simple, maximally extensible, dependency minimized framework for building modern Ethereum dApps
https://web3-react-mu.vercel.app/
GNU General Public License v3.0
5.56k stars 1.52k forks source link

tags` as well.beezywqp #925

Open Veezywqp1 opened 7 months ago

Veezywqp1 commented 7 months ago
          It might be possible to address this with `tags` as well. 

In your example, a consumer would have to know the mainnet token first before they could get at the otherChainAddresses. A tag-based alternative might look a bit flatter/easier to access depending on the consumer.

 {
    "chainId": 1,
    "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "symbol": "USDC",
    "name": "USD Coin",
    "decimals": 6,
    "tags": ["USDC", "L1"],
},
{
    "chainId": 420161,
    "address": "0xAAAA...AAAA",
    "symbol": "USDC",
    "name": "USD Coin",
    "decimals": 6,
    "tags": ["USDC", "L2"],
},

Originally posted by @DannyDelott in https://github.com/Uniswap/token-lists/issues/51#issuecomment-874317298