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

Smart Contract: Storage Layout & Ordering #7

Open
gurukamath opened this issue Dec 17, 2021 · 0 comments
Open

Smart Contract: Storage Layout & Ordering #7

gurukamath opened this issue Dec 17, 2021 · 0 comments

Comments

@gurukamath
Copy link
Owner

Ordering of storage variables and struct members affect how they can be packed tightly. For example, declaring your storage variables in the order of uint128, uint128, uint256 instead of uint128, uint256, uint128, as the former will only take up two slots of storage whereas the latter will take up three.
https://secureum.substack.com/p/solidity-201

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