code-423n4 / 2022-05-opensea-seaport-findings

1 stars 0 forks source link

QA Report #92

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

_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 implements IERC721Receiver. 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:

contracts/test/TestERC721.sol:9: _mint(to, tokenId); contracts/test/TestERC1155.sol:13: _mint(to, tokenId, amount, ""); contracts/test/TestERC20.sol:26: _mint(to, amount);

Recommendations: Use _safeMint() instead of _mint.

MrToph commented 2 years ago

this warden submitted multiple QA reports, same submitter as #91