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

Consider an @oz-renamespaced-from tag to redeclare ERC-7201 namespace tags. #1132

Open
ernestognw opened this issue Feb 24, 2025 · 1 comment

Comments

@ernestognw
Copy link
Member

function _getInitializableStorage() internal virtual pure returns (InitializableStorage storage $) {

Would be a smaller change, that we could easily generalize to all the upgradeable contracts. The downside is that overriding it would likely require the user writting assembly.

I'm just realizing that this would not really be "good" to generalize, because it gives the developper direct/easy access to the storage. Its basically like making the storage variables internal instead of private. I don't think its a good idea.

Right now I'd favor the current code.

@arr00 @ernestognw wdyt ? should we finally merge this ?

Originally posted by @Amxx in OpenZeppelin/openzeppelin-contracts#5337 (comment)

@ernestognw
Copy link
Member Author

To better generalize the selection of a namespace, users that override the _initializableStorageSlot to provide a new slot may be interested in keeping using the upgrades plugins checks. For those cases, a good alternative could be to define a new tag for redefining the ERC-7201 storage slot

@ernestognw ernestognw changed the title Define an oz-renamespaced-from tag to redeclare ERC-7201 namespace tags. Define an @oz-renamespaced-from tag to redeclare ERC-7201 namespace tags. Feb 24, 2025
@ernestognw ernestognw changed the title Define an @oz-renamespaced-from tag to redeclare ERC-7201 namespace tags. Consider an @oz-renamespaced-from tag to redeclare ERC-7201 namespace tags. Feb 24, 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

1 participant