code-423n4 / 2022-06-nested-findings

0 stars 1 forks source link

QA Report #31

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/mocks/DeflationaryMockERC20.sol:12:        _mint(msg.sender, _initialSupply);
contracts/mocks/DeflationaryMockERC20.sol:16:        _mint(recipient, amount);
contracts/mocks/MockERC20.sol:12:        _mint(msg.sender, _initialSupply);
contracts/mocks/MockERC20.sol:16:        _mint(recipient, amount);

Recommendations:

Use _safeMint() instead of _mint().

obatirou commented 2 years ago

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

Instances out of scope

JeeberC4 commented 2 years ago

Warden submitted multiple QA Reports. Will not be judged.