Guides
Practical guides for common workflows and advanced Foundry patterns.
Deployment
Deploying Contracts
Deploy from local to testnet to mainnet with verification and deterministic addresses.
Deterministic Deployments (CREATE2)
Deploy to predictable addresses across multiple networks using CREATE2.
Multi-Chain Deployments
Deploy the same contracts across multiple networks with per-chain configuration.
Upgrading Contracts
Implement proxy patterns and verify storage layout compatibility.
Testing
Fork Testing
Test against live chain state, impersonate accounts, and handle time-sensitive logic.
Invariant Testing
Write effective invariant tests with handler patterns and ghost variables.
Debugging & Optimization
Debugging Transactions
Replay and debug failed mainnet transactions with trace analysis.
Gas Optimization
Profile gas usage and optimize with snapshots and the IR pipeline.
Stack Too Deep
Understand and fix stack too deep errors with practical solutions.
