Foundry (Solidity toolkit)
Open-source Rust toolkit for building, testing, fuzzing and deploying Solidity smart contracts.
No project pays to be listed. How we rank
Foundry key facts
| Category | Smart contract tool |
|---|---|
| Chains | Ethereum and EVM networks |
| Platforms | macOS, Linux, Windows |
| Open source | Yes, Apache-2.0 on GitHub (foundry-rs/foundry) |
| Pricing | Free |
| Launched | 2021 (repository created September 2021) |
| Free plan | Yes, free and open source (MIT or Apache-2.0) |
What is Foundry?
Foundry is an open-source toolkit for Ethereum smart contracts made of four tools: Forge, Cast, Anvil and Chisel. Tests are written in Solidity. The code is on GitHub under the foundry-rs organization, written in Rust and licensed Apache-2.0.
How Foundry works
Forge compiles contracts, runs tests and deploys.
Tests are Solidity functions: a test function that takes arguments becomes a fuzz test, and the sample output in the docs shows 256 runs for a fuzz test. Forge also runs invariant and fork tests, prints call traces at higher verbosity (forge test -vvvv), reports gas, and verifies source on Etherscan and other explorers. Deployments are Solidity scripts run with forge script.
Cast is the command-line client for interacting with EVM contracts, sending transactions and reading chain data. Anvil is a local in-memory node that starts with 10 development accounts holding 10,000 ETH each, and can fork any EVM chain at a chosen block with --fork-url and --fork-block-number. Chisel is a Solidity REPL for trying snippets. Running forge lsp with VS Code installed opens the project in VS Code with Solidity editor support.
How to start with Foundry
- Install foundryup with curl -L https://getfoundry.sh/install | bash, restart the terminal, then run foundryup to get the latest stable forge, cast, anvil and chisel.
- On Windows, foundryup needs Git Bash or WSL; PowerShell and Command Prompt are not supported.
- Foundry no longer publishes npm packages, so use foundryup, GitHub release binaries, Docker or a Rust source build.
- A first project is forge init counter, then forge build and forge test.
Foundry fees and limits
Foundry is free and open source, so the toolkit costs nothing. You still pay network gas when forge script or cast send broadcasts to a live chain, and forking or deploying needs an RPC URL, which the docs pass with --fork-url or --rpc-url.
Risks to know before using Foundry
- Anvil's default mnemonic, test test test test test test test test test test test junk, is public, so anyone can sign with the default accounts.
- The docs tell you to use a custom mnemonic when forking mainnet or talking to public RPC providers. foundryup checks each downloaded binary's SHA-256 hash against the release's GitHub attestation, which helps if you install from the official script and not a copied link.
Foundry alternatives
Other projects people compare with Foundry.
Development environment for compiling, testing, debugging and deploying Solidity contracts on EVM chains.
Open-source Solidity contract library plus smart contract audits and security services.
Browser-based IDE for writing, compiling, testing and deploying Solidity smart contracts.
Where Foundry ranks on DappAtlas
Listed next to Foundry
Foundry pros and cons
- Tests written in Solidity, the same language as the contracts
- Fuzzing built into Forge
- Free and open source under Apache-2.0
- Command-line only, with no official graphical IDE
- JavaScript deployment scripts from Hardhat projects need rewriting
Foundry FAQ
What is Foundry?
Foundry is an open-source toolkit for Ethereum smart contracts made of four tools: Forge, Cast, Anvil and Chisel. Tests are written in Solidity. The code is on GitHub under the foundry-rs organization, written in Rust and licensed Apache-2.0.
Which chains does Foundry support?
Ethereum and EVM networks.
How much does Foundry cost?
Free, according to Foundry’s own page (checked Sep 26, 2026). Free plan: Yes, free and open source (MIT or Apache-2.0).
Sources
How this page works
Sources: Foundry: official site, Foundry: GitHub repository, Foundry: Documentation. Data as of Oct 1, 2026.
Not affiliated with any project listed. Educational content, not financial advice.