Description:
When calling the safeTransferFrom
function defined in the ERC721 standard, it is not necessary to add additional checks on whether the transaction has succedeed or not, since the standard contract already reverts in case there are no conditions to transfer the token.
Impact:
Adding additional checks could cause an increase in gas costs, along with a more complex and less readable codebase.
Tools Used:
Manual review
Recommended Mitigation:
It is recommended to remove the additional check in TokenDivider::divideNft
function. This operation is safe since we can rely on the standard implementation of the ERC721 contract.
This way, the custom error TokenDivider__NftTransferFailed
can be removed, as it is not used elsewhere.
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.