Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Valid

Use `_safeMint` instead of `_mint` for minting NFT in `Soulmate::mintSoulmateToken` function.

Summary

It's recommended to use _safeMint instead of _mint function when minting an NFT. As per OpenZeppelin's ERC721.sol contract's documentation. If a soulmate is a smart contract address that doesn't support ERC721 standard, the NFT can be frozen in the contract.

Impact

The Soulmate NFT can be frozen in the receiver contract.

Tools Used

Manual Review

Recommendations

Use _safeMint instead of _mint, to check if receiver address supports ERC721's onERC721Received implementation.

Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-safemint

Low severity, - If a user utilizes an EOA, the check is not required. - If a user utilizes a contract that they own to mint soulmate tokens, than check is required. However, this would rely on user error minting. Since there is no mention that ownership of token must be from EOAs, I believe low severity is appropriate.

Support

FAQs

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