-
Notifications
You must be signed in to change notification settings - Fork 94
Description
Description
The payable modifier appears to be enforced by the interfaces of @solidstate's IERC721, however, the actual SolidStateERC721 implementation contains a dedicated hook system to prohibit non-zero msg.value transactions.
Recommendation
The payable modifier should either be removed from the interface definition or the internal hook system should be removed (i.e. _handleApproveMessageValue) to actually take advantage of the gas optimization provided by payable.
Rationale
Currently, the system simply imposes additional checks on itself significantly increasing the gas cost of the contract whilst retaining the same behaviour as if payable was never defined. A little bit more background as to why payable is specified in the interface would greatly help in judging the correct action.
To note, removing payable is still compliant with the EIP-721 standard. For more background, consult first bullet point in: https://eips.ethereum.org/EIPS/eip-721#caveats