GivingThanks

First Flight #28
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

using `_mint` to mint ERC721 tokens instead of `_safeMint`

Summary

In GivingThanks.sol contract, while minting the NFT receipt to the donor's wallet, _mint was used instead of _safeMint.

Vulnerability Details

Line 26 of GivingThanks.sol contract

_mint(msg.sender, tokenCounter);

Impact

This could lead to loss of funds and NFT as the _mint function does not check if the receiving address can receive ERC721 tokens

Tools Used

Manual Review

Recommendations

_mint should be changed to _safeMint

_safeMint(msg.sender, tokenCounter);
Updates

Lead Judging Commences

n0kto Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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