Uniswap / token-lists

📚 The Token Lists specification
https://tokenlists.org
MIT License
1.45k stars 988 forks source link

It might be possible to address this with `tags` as well. #641

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