estarriolvetch / ERC721Psi

MIT License
117 stars 29 forks source link

prevent reentracy during minting from messing up the data integrity #1

Closed estarriolvetch closed 2 years ago

estarriolvetch commented 2 years ago

Move the _checkOnERC721Received to the end of the _safeMint function to prevent reentrancy from messing up the data integrity. The reentrancy can only happened after the minting process is completed or before the process starts.

However, it is highly recommended to implement reentrancy guard in your mint function.