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

feat(contracts): Use immutable variables for storage #201

Closed
wants to merge 1 commit into from

Conversation

ratankaliani
Copy link
Member

We only initialize storage variables once per implementation deployment. As such, we can use immutable variables to save on storage loads.

@ratankaliani ratankaliani added the enhancement New feature or request label Nov 5, 2024
@ratankaliani
Copy link
Member Author

For now, we've decided to table this feature, as the gas cost savings for a proposeL2Output call are at maximum ~4-5% and the immutable pattern is not recommended by OZ: https://docs.openzeppelin.com/upgrades-plugins/1.x/faq#why-cant-i-use-immutable-variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant