Skip to content

[FEATURE]:Establish contract integrity CI: gas baselines, ABI stability, and security scans #145

@aniket866

Description

@aniket866

Feature and its Use Cases

CI Workflow Suggestions (Gas & Beyond)

Workflow Command / Action What It Catches
Gas snapshot diff forge snapshot + forge snapshot --diff .gas-snapshot Fails PR if gas increases beyond threshold
Gas report on test run forge test --gas-report Prints per-function gas costs in CI output
Contract size check forge build --sizes + fail if near 24KB limit Prevents deployment failures from size limit
Coverage report forge coverage --report lcov + upload to Coveralls/Codecov Tracks test coverage over time
Mythril security scan docker run mythril/myth analyze Detects reentrancy, integer overflow, etc.
4naly3er report 4naly3er src/ Gas optimization suggestions specific to Solidity
Storage layout diff forge inspect ContractName storage-layout + diff against saved baseline Catches accidental storage slot changes across PRs
ABI diff check forge inspect ContractName abi + diff against saved baseline Catches accidental breaking interface changes
Deployment dry-run forge script --fork-url $RPC_URL --gas-estimate-multiplier 110 Validates deployment scripts + gas estimates on forked mainnet

Top priority for your repo: Gas snapshot diff and storage layout diff — given you have protocol fees and mapping-heavy storage, both are high-value catches for a contracts repo.

Additional Context

@DengreSarthak Please have a look
feel free to assign

Code of Conduct

  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions