-
Notifications
You must be signed in to change notification settings - Fork 138
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
nft_tokens exceed gas limits #449
Comments
I don't see anything the standards team can offer here unless there is a proposal to add some interface that will solve the indexing problem differently. In fact, when it comes to indexers, I rely on JSON Events and incrementally index the NFTs instead of fetching the whole list over and over again. I believe near-sdk-rs/near-contract-standards team or anyone from the community should benchmark the current implementation to pinpoint the exact source of inefficiency. My wild guess is that the root cause is the fact that |
Hey @frol - thanks for your comment. I don't think changing the We have solved this on our Few and Far specification by utilizing a TokenId standard (a variation on the usual stringified incrementing integer) to determine token IDs without needing to iterate through |
@lachlanglen Do you see an opportunity for improvement in NEP-171 (NFT standard) or maybe introducing a new NEP regarding TokenId naming strategy allowing more efficient implementations down the road? |
@frol I think a new standard should be proposed for a multi-collection NFT contract that implements a |
"the implementation of nft_tokens in the near_contract_standards Rust library has a reputation of being unreliable (it easily exceeds gas limits above a certain from_index, even with a small
limit
) and indexers etc have to find other ways around getting the data that this method should provide. And it makes it difficult for marketplaces like FnF to support contracts that use this library. So it would be good if someone from the standards team could take a look at that."@lachlanglen
from NFT Builder group
also from indexer group
"Hey guys, I was hoping perhaps someone can help me out with a problem I am having.
The problem is I’m trying to get all the token ids by running view call nft_tokens and using offsets and limit of 10. However once I cross a certain offset number I’m getting GasLimitExceeded error. Any solution for this?"
The text was updated successfully, but these errors were encountered: