Skip to content
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

ERC721 transfers should not emit Approval events #3484

Closed
AnAllergyToAnalogy opened this issue Jun 16, 2022 · 0 comments · Fixed by #3481
Closed

ERC721 transfers should not emit Approval events #3484

AnAllergyToAnalogy opened this issue Jun 16, 2022 · 0 comments · Fixed by #3481

Comments

@AnAllergyToAnalogy
Copy link
Contributor

As per the ERC721 standard, transfers shouldn't emit an Approval event. It's implied by the Transfer event being emitted.

This means the emitted Approval events are unwanted/unexpected behavior, and it also means literally every transfer wastes about 2000 gas for no reason.

    /// @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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant