Remove further hardcoded function resolution #4309
Merged
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.
For some reason I missed these in #4299.
The one in
ERC721Enumerable._removeTokenFromOwnerEnumeration
is interesting and deserves attention. We were usingERC721.balanceOf
because we are more confident that it's the length of the enumeration than when we use the potentially overriddenbalanceOf
. I've just made it callbalanceOf
now because I don't see a way around this, other than introducing a storage inefficiency by storing the length which is redundant with the balance mapping.For the record here is how I am checking that these changes are exhaustive. (
rg
= ripgrep)The only remaining ones are
ERC2771Context._msgData()
andERC2771Context._msgSender()
in a mock, but without this we get a compiler warning.