Foundry

Foundry is a Solidity development framework by Paradigm that provides fast compilation, built-in fuzz testing via forge test and forge fuzz, and native support for invariant testing.

In Depth

Foundry is a Solidity-first toolkit built in Rust by Paradigm, designed for speed and developer ergonomics. Its core binary, forge, handles compilation, testing, and fuzzing. Running forge test executes unit and fuzz tests written in Solidity, while forge fuzz drives property-based campaigns that generate random inputs to break assertions. Foundry's built-in fuzzer isn't as battle-tested as dedicated tools like Echidna or Medusa, but it's the fastest way to get started with fuzz testing. Recon's Chimera framework bridges Foundry with Echidna and Medusa, so you can write invariant tests once and run them across all three fuzzers without rewriting anything. Foundry also ships with cast for RPC interaction and anvil for running a local node, making it a complete development environment.

Frequently Asked Questions

What is Foundry?

Foundry is a Rust-based Solidity development framework by Paradigm. It includes forge for compiling and testing contracts, plus cast and anvil for RPC interaction and local nodes. It's known for fast compile times and native fuzz testing support directly in Solidity.

Can Foundry do invariant testing?

Yes. Foundry supports invariant testing through its forge fuzzer, which can call random sequences of functions and check that defined properties hold. For more advanced invariant campaigns, teams pair Foundry with Echidna or Medusa using the Chimera framework, which lets you run the same tests on all three fuzzers.

Related Terms

Need expert help with foundry?