-
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
Remove hardcoded function resolution #4299
Remove hardcoded function resolution #4299
Conversation
🦋 Changeset detectedLatest commit: 71ff0c4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
That part I'm not sure about. We considered that option in mapping(address => uint256) private _balanceFromConsecutiveMints;
function _balanceOf(address user) internal virtual view returns (uint256) {
unchecked {
return super._balanceOf(user) + _balanceFromConsecutiveMints[user];
}
} Which overflow balancing out. If we make the balance update in Everything else looks good. |
I would come back to the ERC721Consecutive issue when we work on the ERC721 hook refactor. |
Fixes #3883
This should be removing all hardcoded function resolution.
As a consequence, in ERC721 I have switched it to checked arithmetic for
_balances[from] -= 1
, to avoid overflow if_ownerOf
is overriden and out of sync with the mapping.