Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: medium
Invalid

Different id being used for mappings and minted token

Summary

Several variables are set to a different id from the one being use by the mint function.

Vulnerability Details

Mappings idToOwners, ownerToId, idToOwners and idToCreationTimestamp use the currentvalue of nextID while the _mint() method is passed nextId + 1.

Impact

Medium. This will create confusion between the ERC721 token minted for the user and the internal variables used for tracking its state.

Tools Used

Manual analysis.

Recommendations.

Change the variable passed to the mint function.

- _mint(msg.sender, nextID++);
+ _mint(msg.sender, nextID);
+ nextID++;
Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.