Free download1 sections · 2 min readBy Dezső Mező · Published .mdtemplateSolidity + Markdownblockchainfoundryinvariantaudit
Starter scaffold for invariant testing in Foundry · handlers, ghost variables, 8 patterns with ready code. MIT.
Foundry invariant-test scaffold · base Handler, ghost state, pre/post-delta asserts, cross-function coupling test, conservation, monotonicity, bounded-state. Ready with 200k fuzz runs.
01What the file contains
- Base Handler contract template
- 8 invariant patterns with ready Foundry code
- Ghost-variable pattern for property tracking
- forge-config + optimal fuzz-run parameters
- CI integration · GitHub Actions workflow
What to take away
- Base Handler contract template
- 8 invariant patterns with ready Foundry code
- Ghost-variable pattern for property tracking
- forge-config + optimal fuzz-run parameters
- CI integration · GitHub Actions workflow
More from the lab
Browse all entries- Smart contract threat model template
- ERC-4337 paymaster starter
What Solana RPC actually costs once the prototype works
Solana foot-guns Anchor does not remove
Want this looked at on your own system?Start a conversation
