-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Internal ownedTokensIndex
not properly cleared when removing a token from its owner in ERC721
#839
Comments
I'm inclining towards not fixing this 'bug', for the following reasons:
|
This is related to #1541, where I propose getting rid of more cleanup of this sort. |
Actually the additional |
Yup, my comment was based on tests, not my understanding of the platform (which is clearly wrong, since I'd expect the zero-ing out to refund 10k gas). Continuing the discussion on #1541 to avoid having two threads. |
🎉 Description
See this comment for more info. In the scenario that a token is removed from its owner, if that token was in the last index of the owner's array, the
ownedTokensIndex
keeps a reference to the token that should be deleted.This does not cause any issues in the external interface of the contract, but the data structure it should be properly cleared. Thanks @mudgen for catching it.
The text was updated successfully, but these errors were encountered: