hardStudy question · answer published in Blockchain interview questions, so no pointssmart-contract-securitytoken-standards
Reentrancy through safeMint
A mint function limits each address to 1 NFT. An attacker's contract ends up with 20. How?
function mint() external {
require(minted[msg.sender] == 0, "already minted");
_safeMint(msg.sender, nextId++);
minted[msg.sender] = 1;
}Discussion 0
Join free to post in the discussion.
Related questions
- Private variables are public dataBlockchain Developer
- One contract, many token typesBlockchain Developer
- Token decimalsBlockchain Developer
- Verifying a contract on EtherscanBlockchain Developer
- Sharing a seed phraseBlockchain Developer
- Why use OpenZeppelinBlockchain Developer
- The checks-effects-interactions orderBlockchain Developer
- What nonReentrant doesBlockchain Developer