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

[Audit]: L-02 Inconsistent Implementations in ERC-721 Extension #312

Closed
1 task done
ggonzalez94 opened this issue Oct 4, 2024 · 1 comment · Fixed by #333
Closed
1 task done

[Audit]: L-02 Inconsistent Implementations in ERC-721 Extension #312

ggonzalez94 opened this issue Oct 4, 2024 · 1 comment · Fixed by #333
Assignees

Comments

@ggonzalez94
Copy link
Collaborator

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

  • I agree to follow this project's Contribution Guidelines
@ggonzalez94 ggonzalez94 added type: feature New feature request. needs triage Needs to be assigned the appropriate labels labels Oct 4, 2024
@qalisander qalisander self-assigned this Oct 4, 2024
@ggonzalez94 ggonzalez94 added this to the Release v0.1.0 milestone Oct 4, 2024
@ggonzalez94 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
@bidzyyys
Copy link
Collaborator

Closed by #333

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

Successfully merging a pull request may close this issue.

3 participants