What problem does it solve?
This Skill guides developers in applying comprehensive smart contract testing with Foundry, covering unit tests, fuzz testing, fork testing, and invariant testing to uncover edge-case bugs before deployment.
Core Features & Use Cases
- Unit Testing with Foundry: Validate core functionality and edge cases without tautologies.
- Fuzz Testing: Automatically fuzz inputs to reveal unexpected behaviors and invariants.
- Fork Testing: Reproduce real-state scenarios by forking mainnet or other networks to test integrations.
- Invariant Testing: Define and verify properties that must hold across random sequences of interactions.
- Best Practices: Provide patterns for structuring tests, avoiding common pitfalls, and ensuring deterministic outcomes.
Quick Start
Run forge test to execute the unit tests, fuzz tests, fork tests, and invariant tests against your Solidity contracts.