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

Reduce size of state contract #1394

Open
fullkomnun opened this issue Feb 21, 2023 · 0 comments
Open

Reduce size of state contract #1394

fullkomnun opened this issue Feb 21, 2023 · 0 comments

Comments

@fullkomnun
Copy link
Contributor

The current deployed contract size of State.sol with default compilation config is 23.758 KiB which is really close to the evm hard limit of 24 KiB. That's not ideal as any feature implemented / bug fixed / refactor might lead to exceeding that limit.
Got the size by running npx hardhat compile && npx hardhat size-contracts --no-compile.

One option to tackle this is to consider breaking up the Config.sol base contract into smaller pieces since it is currently being inherited by multiple contracts (Challenges.sol, Proposers.sol, Shield.sol, State.sol) and its contents might not be required for all of these.
Anyway, I think being too close to the limit is something that should be avoided by some sort of restructuring.

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