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

OwnableUpgradeable Declares State Variables Outside Diamond Storage #20

Open
mudgen opened this issue Sep 4, 2022 · 0 comments
Open

Comments

@mudgen
Copy link

mudgen commented Sep 4, 2022

The example code on the README file inherits OwnableUpgradeable.sol from OpenZeppelin. OwnableUpgradeable.sol declares state variables outside Diamond Storage which can lead to storage collision if any other contracts, or inherited contracts declare state variables outside Diamond Storage. The best practice for diamonds is to declare all state variables within AppStorage or Diamond Storage.

SafeOwnable.sol from solidsate-solidity could be used instead, or other implementation.

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