You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: PermitERC721 currently uses a check to ensure recoveredAddress != address(0) even though it should be covered by the check recoveredAddress == owner, where owner is already checked to never been equal to address(0) in ownerOf function of ERC721 from openzeppelin-contracts.
Recommendation:
Consider removing the check to improve gas efficiency.
Ensure openzeppelin-contracts implementation of ownerOf doesn't change, otherwise this will break the contract (see here).
Ajna: PermitERC721 have been refactored to follow standard reference implementation (see here), where the explicit zero address check is now required due to extra conditions in isApprovedOrOwner function.
Prototech:
The text was updated successfully, but these errors were encountered:
Context: PermitERC721.sol#L108
Description:
PermitERC721
currently uses a check to ensurerecoveredAddress != address(0)
even though it should be covered by the checkrecoveredAddress == owner
, where owner is already checked to never been equal toaddress(0)
inownerOf
function ofERC721
fromopenzeppelin-contracts
.Recommendation:
Consider removing the check to improve gas efficiency.
Ensure
openzeppelin-contracts
implementation ofownerOf
doesn't change, otherwise this will break the contract (see here).Before
After
Ajna:
PermitERC721
have been refactored to follow standard reference implementation (see here), where the explicit zero address check is now required due to extra conditions inisApprovedOrOwner
function.Prototech:
The text was updated successfully, but these errors were encountered: