The claimNft
function in Solidity allows a user to claim an NFT (non-fungible token) under certain conditions.
The NftClaimed
event is before transfer the NFTs tokens.
IERC721(nftAddress).safeTransferFrom(address(this), msg.sender, tokenInfo.tokenId);
If the event is emitted before the actual transfer of the NFT, it might lead to a situation where the event log indicates that a transfer has occurred, even though it may have failed. This can result in misleading records about the state of the contract.
manual review
The emit NftClaimed(nftAddress)
statement should be placed after the safeTransferFrom
method to ensure the NFT has been successfully transferred before emitting the event.
Please check example:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.