You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This removes the _addTokenTo and _removeTokenFrominternal functions (which had a notice indicating they were not meant to be used, and only existed due to a language limitation, and are therefore not considered part of the API). They have been inlined into _mint and _burn, making it easier to understand how each function is called in ERC721Enumerable.
Additionally, #839 had already been accidentally fixed in #1539, but the current implementation makes it more obvious that the issues is gone.
Coverage dropped due to a check that is now in _burn and used to be tested via _removeTokenFrom in the tests I got rid of, but that require won't make sense after #1550 goes in - we could first merge that PR and then this one on top.
I know the _mint test is sort of out of scope, but the _burn tests require _mint, and having that doesn't really make sense unless _mint is also tested.
Should be ready now, @frangio PTAL. The functions for adding/removing tokens from both enumerations should be replaced by a function that receives a storage mapping (they are pretty much the same), but sadly that isn't supported in 0.4.x.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the
_addTokenToand_removeTokenFrominternalfunctions (which had a notice indicating they were not meant to be used, and only existed due to a language limitation, and are therefore not considered part of the API). They have been inlined into_mintand_burn, making it easier to understand how each function is called inERC721Enumerable.Additionally, #839 had already been accidentally fixed in #1539, but the current implementation makes it more obvious that the issues is gone.
Fixes #839
Closes #912
Closes #1541