Skip to main content

Forge Contract Testing

Use the Bun scripts in packages/contracts/package.json; do not invoke raw Forge as a repository workflow.

Choose the proof

  • Use a targeted package script while developing one contract behavior.
  • Use unit and fuzz tests for local invariants and authorization edges.
  • Use integration tests for module composition and resolver interactions.
  • Use fork scripts only when deployed code, external protocols, or release state must be proven.
  • Use the validation selector for the required release or critical-surface gate.

foundry.toml, package scripts, and the test tree own profiles and inventories. A fork test must pin the intended network context and must not be reported as a deployment unless a broadcast was authorized and observed.