Foundry
Developer CLI · Free
An Ethereum contract development toolchain with a local chain, tests, and a CLI: it helps test smart contracts before network deployment.
Also known as: foundry-rs/foundry; foundry; foundry-ethereum-toolkit

What you can use for free
Local blockchain, contract builds, and tests under the selected license.
Paid features and costs
Network transactions, RPC providers, and hosting are paid for separately.
Access and limitations
Local blockchain, contract builds, and tests under the selected license. Network transactions, RPC providers, and hosting are paid for separately.
Use cases
- Test smart contracts before network deployment
- Compile and test contracts and investigate detected errors
Example workflow
A possible workflow; this is not a report of hands-on testing.
Test smart contracts before network deployment.
Before you start
- Solidity contracts, expected state changes, and test accounts.
- A local Foundry environment and a test network without real funds.
Steps
- Prepare Solidity contracts and start a local chain for the test scenario.
- Compile and test contracts and investigate detected errors.
- Save the working command or script and the result criteria.
Check your result
- Tests check successful operations and expected reverts; assertions verify contract state.
- Local checks do not replace a contract audit; private keys are not written to repositories or logs.
Choosing Foundry
Test smart contracts before network deployment
Choose this when
- Test smart contracts before network deployment
- Compile and test contracts and investigate detected errors
Requirements
- Choose the tool for the task; foundryup is the toolchain installation path described in the README.
Things to consider
- Costs and limits of free use: Network transactions, RPC providers, and hosting are paid for separately.
- Terms of use: Apache-2.0 OR MIT according to the official README; third-party components retain their own terms.
- Local Anvil availability does not establish free RPC services or absence of gas costs on a chosen external network.
Frequently asked questions
What can you use for free in Foundry?
Local blockchain, contract builds, and tests under the selected license.
What additional costs might arise with Foundry?
Network transactions, RPC providers, and hosting are paid for separately.
What terms of use matter for Foundry?
Apache-2.0 OR MIT according to the official README; third-party components retain their own terms.
How do you get started with Foundry?
Prepare Solidity contracts and start a local chain for the test scenario. Compile and test contracts and investigate detected errors. Save the working command or script and the result criteria.
How do Forge, Cast, Anvil, and Chisel differ in Foundry?
Forge builds and tests Solidity projects. Cast interacts with the EVM, sending transactions and reading chain data. Anvil starts a local Ethereum node, and Chisel provides a Solidity REPL. These tools have different roles; a local node separates development from real network interaction.
License
Apache-2.0 OR MIT according to the official README; third-party components retain their own terms.
Apache 2.0 — permissive license with patent terms
You can use and modify the code in commercial and closed-source projects. When distributing it, retain the license and relevant notices, identify modified files, and include NOTICE if provided. Authors grant a limited patent license for their contributions; it does not grant permission to use trademarks.
License termsMIT — permissive license
You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.
License termsTechnologies and topics
- Foundry
- CLI
- Development