-
Notifications
You must be signed in to change notification settings - Fork 19
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
[Audit]: L-02 Inconsistent Implementations in ERC-721 Extension #312
Milestone
Comments
ggonzalez94
added
type: feature
New feature request.
needs triage
Needs to be assigned the appropriate labels
labels
Oct 4, 2024
ggonzalez94
removed
type: feature
New feature request.
needs triage
Needs to be assigned the appropriate labels
labels
Oct 9, 2024
bidzyyys
added a commit
that referenced
this issue
Oct 17, 2024
Resolves #312 --------- Co-authored-by: Alisander Qoshqosh <[email protected]>
Closed by #333 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the feature you would like to see?
The Stylus library ERC-721 extensions are not consistent with the respective functionality of the Solidity library.
These inconsistencies were identified:
• In the uri_storage extension, the token_uri() function directly returns the value from storage but omits key checks:
◦ It does not verify whether the token exists, which is handled in the Solidity implementation.
◦ It does not handle base URI concatenation like the Solidity version. Instead, it directly retrieves and returns the stored token URI without constructing the full URI.
• There is a mismatch in the implementation of ERC721Metadata :
◦ The Rust implementation exposes the base_uri function. In the Solidity version, URIs are only accessible by token ID when the token exists. Not exposing
baseURI is generally advisable, as revealing it prematurely can leak sensitive NFT data before minting. This can enable advanced users to time their minting to acquire more desirable NFTs.
◦ The Rust version lacks the tokenURI function by default, which may cause integration issues.
Consider aligning these implementations with the Solidity library to ensure consistency and mitigate potential risks.
Contribution Guidelines
The text was updated successfully, but these errors were encountered: