Skip to content
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

make all the internal function of ERC721Upgradeable virtual so they can be overriden #5188

Closed
adjisb opened this issue Sep 4, 2024 · 2 comments

Comments

@adjisb
Copy link

adjisb commented Sep 4, 2024

🧐 Motivation
Sometimes you want to override methods like: _burn it seems that in general having internal methods virtual is a good idea.

Same thing about safeTransferFrom so we can add modifiers that limits the access or change the behavior.

@JhaMohan
Copy link

@adjisb can I work on this?

@Amxx
Copy link
Collaborator

Amxx commented Feb 4, 2025

_transfer, _mint and _burn are not virtual on purpose. This is to avoid inconsistency between calling an overriden version of these and the underlying _update function they are based on.

I suggest you override _update instead, as shown here

@Amxx Amxx closed this as completed Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants