-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Next v5.0 erc721 update hook #4171
Next v5.0 erc721 update hook #4171
Conversation
|
Thank you @RenanSouza2, we will review this shortly. |
FYI, we already have a branch (that has been sitting for the last 3 months) with the here is what I found (https://github.com/Amxx/openzeppelin-contracts/blob/refactor/erc721-mint-burn-transfer/contracts/token/ERC721/ERC721.sol) ... there was something on julissa's fork that I pushed to mine. AFAIK, we were worried about the duplicate sload when doing a transferFrom:
It was supposed to get a review ... but I guess we forgot about it ? |
Note: I rebased the above code onto next-v5 to have a clean diff. There is an issue with this design. the "simple" hooks can be replace by an override to So we need to find a new design for Consecutive ... |
I've expanded the code in the PR in this other branch There is a function _increaseBalance that is also used as a hook. This function is called in the _mintBatch function in Consecutive and is overriden in Enumerable to avoit batch sizes bigger than one. In this branch specifically it is used to in the Votes to distribute voting power |
This is proposal to remove before and after hooks from ERC721 and replace them with an update hook