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

Use safeTransferFrom() instead of transferFrom() for outgoing erc721 transfers

Details & Impact

 It is recommended to use safeTransferFrom() instead of transferFrom() when transferring ERC721s.
 The transferFrom() method is used instead of safeTransferFrom(), presumably to save gas. I however argue that this isn’t recommended because:
 OpenZeppelin’s documentation discourages the use of transferFrom(), use safeTransferFrom() whenever possible 
 Given that any NFT can be used for the call option, there are a few NFTs (here’s an example) that have logic in the onERC721Received() function, which 
 is only triggered in the safeTransferFrom() function and not in transferFrom().

Recommended Mitigation Steps

 Call the safeTransferFrom() method instead of transferFrom() for NFT transfers.
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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