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
Description
The
payablemodifier appears to be enforced by the interfaces of@solidstate'sIERC721, however, the actualSolidStateERC721implementation contains a dedicated hook system to prohibit non-zeromsg.valuetransactions.Recommendation
The
payablemodifier should either be removed from theinterfacedefinition or the internal hook system should be removed (i.e._handleApproveMessageValue) to actually take advantage of the gas optimization provided bypayable.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
payablewas never defined. A little bit more background as to whypayableis specified in theinterfacewould greatly help in judging the correct action.To note, removing
payableis still compliant with the EIP-721 standard. For more background, consult first bullet point in: https://eips.ethereum.org/EIPS/eip-721#caveats