# What is Foundry?

URL: https://shield.quillaudits.com/learn/glossary/foundry/

Foundry is a toolkit for Ethereum development, written in Rust, in which you build, test and deploy Solidity contracts and write the tests in Solidity too ([Foundry](https://github.com/foundry-rs/foundry/blob/master/README.md)). Paradigm introduced it on 7 December 2021 as a reimplementation of the dapptools testing framework ([Paradigm](https://paradigm.xyz/2021/12/introducing-the-foundry-ethereum-development-toolbox)).

Last updated 3 December 2026. 2 minute read. By the QuillAudits Team.

## What are Forge, Cast, Anvil and Chisel?

| Tool | What it does |
| --- | --- |
| Forge | Builds, tests, deploys and verifies contracts |
| Cast | Calls contracts, sends transactions and reads chain data from the command line |
| Anvil | Runs a local Ethereum node that can fork a live network |
| Chisel | A Solidity REPL for trying out snippets |

The descriptions come from the [Foundry README](https://github.com/foundry-rs/foundry/blob/master/README.md) and the [Foundry docs](https://getfoundry.sh/introduction/overview).

## What does a Foundry test look like?

Foundry tests are Solidity contracts in which `setUp()` runs before each test and test functions are prefixed with `test` ([Foundry](https://getfoundry.sh/forge/fuzz-testing)), and a test that takes parameters becomes a [fuzz test](https://shield.quillaudits.com/learn/glossary/fuzzing/).

**A contract, a unit test and a fuzz test, with no imports (illustrative, not audited code)** `CounterTest.sol`

```
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;

contract Counter {
    uint256 public count;

    function increment() external {
        count += 1;
    }
}

contract CounterTest {
    Counter internal counter;

    function setUp() public {
        counter = new Counter();
    }

    function test_incrementAddsOne() public {
        counter.increment();
        assert(counter.count() == 1);
    }

    function testFuzz_incrementTimes(uint8 times) public {
        for (uint256 i = 0; i < times; i++) counter.increment();
        assert(counter.count() == times);
    }
}
```

Real projects inherit from the forge-std `Test` contract, which adds assertions and cheatcodes that change `msg.sender`, balances, block time and storage inside a test ([Foundry](https://www.getfoundry.sh/reference/cheatcodes/overview)).

## Why do security reviewers use Foundry?

The attack and the test are in the same language. A reviewer can write a [proof of concept exploit](https://shield.quillaudits.com/learn/glossary/proof-of-concept-exploit/) as a test, run it on a fork of mainnet with `forge test --fork-url` ([Foundry](https://www.getfoundry.sh/guides/fork-testing)), and turn a property into an [invariant test](https://shield.quillaudits.com/learn/glossary/invariant-testing/) without leaving Solidity. QuillShield supports Solidity in Foundry projects today, and [run your first audit](https://shield.quillaudits.com/guides/run-your-first-audit/) shows the steps.

## Sources

- [Foundry README, foundry-rs (GitHub)](https://github.com/foundry-rs/foundry/blob/master/README.md) · checked 3 December 2026
- [Introducing the Foundry Ethereum development toolbox, Paradigm](https://paradigm.xyz/2021/12/introducing-the-foundry-ethereum-development-toolbox) · checked 3 December 2026
- [Foundry overview, Foundry docs](https://getfoundry.sh/introduction/overview) · checked 3 December 2026
- [Testing, Foundry docs](https://getfoundry.sh/forge/fuzz-testing) · checked 3 December 2026
- [Cheatcodes overview, Foundry docs](https://www.getfoundry.sh/reference/cheatcodes/overview) · checked 3 December 2026
- [Fork testing, Foundry docs](https://www.getfoundry.sh/guides/fork-testing) · checked 3 December 2026
