Skip to content

feat(ci): enforce contract size limits in CI #27

@jose-compu

Description

@jose-compu

Problem

CI runs forge build --sizes but there is no enforcement of contract size limits. EIP-170 sets the max at 24,576 bytes. We should fail CI if any contract exceeds say 22KB (leaving some headroom).

Approach

  • Parse the output of forge build --sizes
  • Fail if any contract in src/ exceeds the threshold
  • Maybe a small shell script or a custom forge script that checks this
  • Could also add contract sizes to the gas snapshot report for visibility

The Diamond contracts in particular can get large so this is worth watching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ci/cdContinuous integration and deploymentcode qualityStatic analysis, lints, and code standards

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions