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

Why is the type of tokenId set as number? What is the reason behind the size limitation in the isTokenId function? #29

Open
Stpmyclique opened this issue Dec 6, 2023 · 1 comment

Comments

@Stpmyclique
Copy link

Hi Team,

We have found that the current released code version is not compatible with long tokenId values, such as those used in ENS (Ethereum Name Service). The code treats tokenId as a number type, which seems incorrect in a JavaScript environment.

There is also a configuration option called MAX_TOKEN_ID in the code. Does the current version limit the use of long IDs?

We are currently unsure of the reasoning behind this design decision, but are there any plans to consider compatibility in the future, such as changing the tokenId type to string?

@huynhr
Copy link
Collaborator

huynhr commented Dec 6, 2023

Hi @Stpmyclique! Thanks for pointing this out.

Originally this iframe was ported over from the sapienz project and we did not anticipate the token_id to be an ENS name yet. However there are plans for that in the future implementations.

As for the MAX_TOKEN_ID, again this iframe was ported over from the sapienz project which has an upper bound number of mintable tokens. We can definetly remove those changes.

Also, this iframe is opensource so feel free to push up changes you don't see fit and we can review them and have them in.

For now, I don't see an issue with changing the token_id to a string type or removing the MAX_TOKEN_ID upper bound.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants