_safeMint() should be used rather than _mint() wherever possible #269
Labels
bug
Something isn't working
grade-c
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2022-10-holograph/blob/main/src/enforcer/HolographERC721.sol#L307
https://github.com/code-423n4/2022-10-holograph/blob/main/src/enforcer/HolographERC721.sol#L415
Vulnerability details
_safeMint() should be used rather than _mint() wherever possible
_mint()
is discouraged in favor of_safeMint()
which ensures that the recipient is either an EOA or implementsIERC721Receiver
. Both open OpenZeppelin and solmate have versions of this function so that NFTs aren’t lost if they’re minted to contracts that cannot transfer them back out.Instances
HolographERC721.sol:L307
HolographERC721.sol:L415
Recommendations:
Use _safeMint() instead of _mint().
The text was updated successfully, but these errors were encountered: