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

Facts checked Oct 1, 2026

Foundry key facts

CategorySmart contract tool
ChainsEthereum and EVM networks
PlatformsmacOS, Linux, Windows
Open sourceYes, Apache-2.0 on GitHub (foundry-rs/foundry)
PricingFree
Launched2021 (repository created September 2021)
Free planYes, free and open source (MIT or Apache-2.0)
About

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

  1. 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.
  2. On Windows, foundryup needs Git Bash or WSL; PowerShell and Command Prompt are not supported.
  3. Foundry no longer publishes npm packages, so use foundryup, GitHub release binaries, Docker or a Rust source build.
  4. 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.
Smart contract toolmacOSLinuxWindows

Foundry alternatives

Other projects people compare with Foundry.

Hardhat

Development environment for compiling, testing, debugging and deploying Solidity contracts on EVM chains.

OpenZeppelin

Open-source Solidity contract library plus smart contract audits and security services.

Remix IDE

Browser-based IDE for writing, compiling, testing and deploying Solidity smart contracts.

Where Foundry ranks on DappAtlas

Foundry pros and cons

Pros
  • Tests written in Solidity, the same language as the contracts
  • Fuzzing built into Forge
  • Free and open source under Apache-2.0
Cons
  • 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

  1. Foundry: official site
  2. Foundry: GitHub repository
  3. Foundry: Documentation
  4. Foundry: Installation
  5. Foundry: Forge overview
  6. Foundry: Anvil overview

How this page works

Sources: Foundry: official site, Foundry: GitHub repository, Foundry: Documentation. Data as of Oct 1, 2026.

How we review

Not affiliated with any project listed. Educational content, not financial advice.