Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Latest commit

 

History

History
21 lines (13 loc) · 876 Bytes

045.md

File metadata and controls

21 lines (13 loc) · 876 Bytes

Bnke0x0

low

_safeMint() should be used rather than _mint() wherever possible

Summary

Vulnerability Detail

Impact

_mint() is discouraged in favor of _safeMint() which ensures that the recipient is either an EOA or implements IERC721Receiver. in the [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/d4d8d2ed9798cc3383912a23b5e8d5cb602f7d4b/contracts/token/ERC721/ERC721.sol#L238-L250

Code Snippet

https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/OptimismMintableERC20.sol#L79 => _mint(_to, _amount);

Tool used

Manual Review

Recommendation

_safeMint() should be used rather than _mint() wherever possible