-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
clearApproval
should not fire event
#100
Comments
Hm, yes, I think this is a valid reasoning based on the EIP comment. @fulldecent can you comment on it? |
You are correct. Here is a similar discussion for reference: |
Alright, to the PR ... |
I can’t see the context here. Is there a PR? |
@fulldecent the PR for this is in progress and will be ready by tomorrow. I will ask you to check that just to be sure it's aligned with the standard. |
Yes, got it! |
Because this function is called only from
_burn
and_transfer
in which cases alsoTransfer
is emitted,clearApproval
should only set state to 0 (might be more gas efficient to do it conditionally).According to spec (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md)
OZ also does it incorrectly, but "slightly" better.
https://github.com/OpenZeppelin/openzeppelin-solidity/blob/07020e954475a4fdd36e0252e88717b60f790b71/contracts/token/ERC721/ERC721BasicToken.sol#L300-L303
The text was updated successfully, but these errors were encountered: