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

Support for collections that skip token ids #68

Open
clrke opened this issue Sep 28, 2022 · 1 comment
Open

Support for collections that skip token ids #68

clrke opened this issue Sep 28, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@clrke
Copy link

clrke commented Sep 28, 2022

Describe the bug
Some NFT collections have a gimmick of skipping token ids like https://opensea.io/collection/mutant-ape-yacht-club. As of the time of posting, there are 19,425 Mutant Apes minted, some have token ids upwards of 10k and even 20k because those have been minted and assigned a token id in an unconventional way.

open_rarity.resolver.opensea_api_helpers.open_rarity.resolver.opensea_api_helpers.get_token_ids assumes that the collection's token ids are incremental from 0 to 19,424.

Information

Collection link/name: https://opensea.io/collection/mutant-ape-yacht-club
Contract standard: ERC721Enumerable
Chain: Ethereum Mainnet

To Reproduce
Steps to reproduce the behavior:
Run python -m scripts.score_real_collections mutant-ape-yacht-club

Expected behavior
It should have all token ids in the generated json file.

Environment

  • OS: Ubuntu 22.04.1
  • Python 3.10.6
  • Library Version v0.4.3-beta
@clrke clrke added the bug Something isn't working label Sep 28, 2022
@impreso
Copy link
Contributor

impreso commented Sep 28, 2022

Thanks for the report. One way to deal with this is to setup the collection supply variable explicitly to the desired supply or implement smart logic that skips "empty" result during the asset resolution.

To unblock you , i recommend to change the parameter directly in cod, while we implementing "smart" skip logic for such use-cases.
https://github.com/OpenRarity/open-rarity/blob/main/open_rarity/resolver/opensea_api_helpers.py#L310 - the place where you can override total supply to desired quantity while we are working on the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants