1

Can you highlight the core difference between two functions: mint and safeMint? Why its called "safe"? and when both of them should use? cause, for me, functions' syntax is pretty similar.

1 Answer 1

2

There was the answer here: _mint vs _safeMint, which is best for ERC721?


To summarize, safeMint is there to prevent someone minting ERC721 to a contract which does not support ERC721 transfer. So the ERC721 token is stuck there forever. If you are sure this won't happen, you can directly use _mint to save the gas cost.

See more: ERC721.sol#L262

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.