-
Notifications
You must be signed in to change notification settings - Fork 12k
ERC721 unnecessarily emits an Approval
event on transfers
#1038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The 841 thread can't be used for identifying the standard's requirements, since they've been outdated by various updates to the primary spec at http://eips.ethereum.org/EIPS/eip-721 The text of 721:
Specifically, Let me know if that should be interpreted differently |
For the record, the relevant comment is currently the last comment in the EIP, and I haven't seen any more recent comments or updates to the spec that would challenge this assertion (by @fulldecent: I guess the line Overall, I think your interpretation of the spec is probably correct. I'm just not sure if this is the intent of the spec though. |
@abandeali1 ah, sorry for not checking the thread directly. didn't realize it was fulldecent that had commented on the distinction. I do think my interpretation makes much more sense than the special case for transfer-initiated approval resets, but I'm not sure how flexible the standard is, now that it's been finalized. What are the pros towards not emitting the Approval event? An indexer trying to ascertain the full approval log of a token must also understand the implicit side effects of a Transfer event if they are to build an accurate history. Anyway, the spec is confusing in this case, and the language should be updated to very clearly state the intention. I've reached out to @fulldecent in the ETH-NFt chat to get his understanding. |
I just find it to be redundant - you're not gaining any extra information that you don't already get from the |
I can understand that, yeah. Looks like fulldecent has already approved and pushed the oxcert change, so I'll take that as the intent of the spec. It would be nice to get the wording clearer in the future. |
Hello all, I'm dropping by from a note in NFT/Lobby. I can see that a specific word in the spec is ambiguous and has lead to two different interpretations: /// @dev This emits when the approved address for an NFT is changed or
/// reaffirmed. The zero address indicates there is no approved address.
/// When a Transfer event emits, this also indicates that the approved
/// address for that NFT (if any) is reset to none.
event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); It would have been more clear to say "It is unnecessary to emit Approval when a transfer occurs," and that is the intention of these words in the standard. I can see the problem is my poor choice of "this also indicates" -- where "this" is the Transfer. To be clear, an implementation that emits a redundant Approval event is compliant with the standard. If OZ will accept this interpretation of the standard and make the change, then I would appreciate if anybody can propose an errata for 721 to clarify this. |
🎉 Description
Currently, an
Approval
event is unnecessarily emitted when a transfer that resets an approval occurs. See comments towards the end of ethereum/EIPs#841 clarifying that anApproval
event should not be emitted in this scenario.The text was updated successfully, but these errors were encountered: