Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVM NFT token definitions #26

Closed
tomasklim opened this issue Feb 9, 2024 · 2 comments
Closed

EVM NFT token definitions #26

tomasklim opened this issue Feb 9, 2024 · 2 comments
Assignees

Comments

@tomasklim
Copy link
Member

tomasklim commented Feb 9, 2024

Spec:

There are definitely not all "legit" NFT collections on CoinGecko but it is a good start.
Missing "legit" collections are e.g.
https://etherscan.io/token/0xe8b651a8dbca7aa9032e629657936edcc2bb438c from 1Inch
https://etherscan.io/token/0x1645787ddcb380932130f0d8c22e6bf53a38e725 from Rabby

Prerequisite for reverting trezor/trezor-suite#11077
Prerequisite for trezor/trezor-suite#8004

https://api.coingecko.com/api/v3/nfts/list?per_page=100&page=1 (there is around 39 pages of 100 items)

Example of data

  {
    "id": "lootprints-for-mooncats",
    "contract_address": "0x1e9385ee28c5c7d33f3472f732fb08ce3cebce1f",
    "name": "lootprints (for MoonCats)",
    "asset_platform_id": "ethereum",
    "symbol": "📜"
  },
  {
    "id": "ethlings",
    "contract_address": "0x8a1abd2e227db543f4228045dd0acf658601fede",
    "name": "Ethlings",
    "asset_platform_id": "polygon-pos",
    "symbol": "😉"
  },
  {
    "id": "pawnshop-gnomies",
    "contract_address": null,
    "name": "Pawnshop Gnomies",
    "asset_platform_id": "solana",
    "symbol": "PAWNSHOPGNOMIE"
  },

Solana does not have contract_address so let's truncate records without contract_address. It is not possible to indentify collection by CoinGecko's id with data we have.

The only thing which is important for us is that NFT with specific contract_address exists on specific chainId. That is all we need to know. As Solana NFTs are out of game and Cardano is not in the list of platforms, let's use the structure from token definitions.
List of platforms with NFTs on CoinGecko https://api.coingecko.com/api/v3/asset_platforms?filter=nft

Structure same as token-definitions
https://data.trezor.io/firmware/nft-definitions/chain-id/${chainId}/nft-${contractAddress}.dat we just do HEAD request to find out if data are there or not. It does not even need to be .dat

@tomasklim tomasklim assigned tomasklim and Hannsek and unassigned tomasklim Feb 9, 2024
@Hannsek Hannsek transferred this issue from trezor/trezor-suite Feb 15, 2024
@Hannsek Hannsek assigned matejcik and unassigned Hannsek Feb 15, 2024
@Hannsek Hannsek added this to Firmware Feb 15, 2024
@Hannsek Hannsek moved this to 🎯 To do in Firmware Feb 15, 2024
@matejcik
Copy link
Collaborator

We can add this to definitions-latest.json but adding it to data.trezor.io/firmware/definitions does not make sense at this point / with this spec.

As I was saying on Slack, this tree is not just an arbitrary data store, it's "trustable by firmware" data store. In that context, it's highly unclear what data should there be. If all that is needed is "does this nft exist y/n" then we can add a separate nfts.json with this info.

@matejcik
Copy link
Collaborator

as discussed, we will not be making this part of the definitions repo for now

@matejcik matejcik closed this as not planned Won't fix, can't repro, duplicate, stale Feb 29, 2024
@github-project-automation github-project-automation bot moved this from 🎯 To do to 🤝 Needs QA in Suite Desktop Feb 29, 2024
@bosomt bosomt moved this from 🤝 Needs QA to ✅ Approved in Suite Desktop Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Archived in project
Development

No branches or pull requests

3 participants