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

Migrate to OZ Contracts v5 #1270

Open
jaybuidl opened this issue Oct 11, 2023 · 0 comments · May be fixed by #1562
Open

Migrate to OZ Contracts v5 #1270

jaybuidl opened this issue Oct 11, 2023 · 0 comments · May be fixed by #1562

Comments

@jaybuidl
Copy link
Member

https://blog.openzeppelin.com/introducing-openzeppelin-contracts-5.0
https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v5.0.0

Relevant change for Proxies

Immutable variables

Version 5.0 saves gas by avoiding duplicate SLOADs where possible. More immutable variables are used across the library to avoid such unnecessary storage reads. Some examples of how this pattern was applied can be seen in TransparentUpgradeableProxy and BeaconProxy where the admin or beacon is now stored in an immutable variable, saving reads on every call to such proxies.

Namespaced storage

This is an alternative to the previous recommendation of using a __gap variable in storage between inherited contracts.

@jaybuidl jaybuidl assigned jaybuidl and unassigned jaybuidl Mar 28, 2024
@Anmol-Dhiman Anmol-Dhiman linked a pull request Apr 9, 2024 that will close this issue
@Anmol-Dhiman Anmol-Dhiman linked a pull request Jun 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant