Skip to content

Reduce size of state contract #1394

@fullkomnun

Description

@fullkomnun

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions