trezor / definitions

1 stars 5 forks source link

Solana+Cardano token definitions #25

Closed tomasklim closed 7 months ago

tomasklim commented 9 months ago

Spec:

Prerequisite for https://github.com/trezor/trezor-suite/issues/10912

Data for Solana has to contain symbol and name, we will fetch it, parse it and use in our UI.

https://www.coingecko.com/en/chains/solana https://www.coingecko.com/en/chains/cardano

https://api.coingecko.com/api/v3/coins/list?include_platform=true

Example

{
    "id": "tether",
    "symbol": "usdt",
    "name": "Tether",
    "platforms": {
        "ethereum": "0xdac17f958d2ee523a2206206994597c13d831ec7",
        "avalanche": "0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7",
        "solana": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
        "kava": "0x919c1c267bc06a7039e03fcc2ef738525769109c",
        "near-protocol": "usdt.tether-token.near",
        "tron": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
    }
},
{
    "id": "babysnek",
    "symbol": "babysnek",
    "name": "BabySNEK",
    "platforms": {
      "cardano": "7507734918533b3b896241b4704f3d4ce805256b01da6fcede430436"
    }
}

It is stupid that we called it eth-definitions and did not use 0x in the address for EVMs https://data.trezor.io/firmware/eth-definitions/chain-id/${chainId}/token-${contractAddress without 0x}.dat

Let's do Solana/Cardano this way? https://data.trezor.io/firmware/token-definitions/${symbol}/token-${contractAddress}.dat

symbol: sol, ada

matejcik commented 8 months ago

related: https://github.com/trezor/trezor-firmware/issues/3541 https://github.com/trezor/trezor-firmware/issues/3542