Home

Awesome

<img src=".github/logo.png" alt="Foundry logo" align="right" width="120" />

Foundry

Github Actions Telegram Chat Telegram Support

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.

Foundry consists of:

Need help getting started with Foundry? Read the 📖 Foundry Book (WIP)!

Demo

Installation

See the installation guide in the book.

If you're experiencing any issues while installing, check out Getting Help and the FAQ.

Forge

Features

How Fast?

Forge is quite fast at both compiling (leveraging ethers-solc) and testing.

See the benchmarks below. More benchmarks can be found in the v0.2.0 announcement post and in the Convex Shutdown Simulation repository.

Testing Benchmarks

ProjectForgeDappToolsSpeedup
transmissions11/solmate2.8s6m34s140x
reflexer-labs/geb0.4s23s57.5x
Rari-Capital/vaults0.28s6.5s23x

Note: In the above benchmarks, compilation was always skipped

Compilation Benchmarks

<img alt="Compilation benchmarks" src=".github/compilation-benchmark.png" width="693px" />

Takeaway: Forge compilation is consistently faster by a factor of 1.7-11.3x, depending on the amount of caching involved.

Cast

Cast is a swiss army knife for interacting with Ethereum applications from the command line.

More documentation can be found in the cast package.

Configuration

Using foundry.toml

Foundry is designed to be very configurable. You can configure Foundry using a file called foundry.toml in the root of your project, or any other parent directory. See config package for all available options.

Configuration can be arbitrarily namespaced by profiles. The default profile is named default (see "Default Profile").

You can select another profile using the FOUNDRY_PROFILE environment variable. You can also override parts of your configuration using FOUNDRY_ or DAPP_ prefixed environment variables, like FOUNDRY_SRC.

forge init creates a basic, extendable foundry.toml file.

To see your current configuration, run forge config. To see only basic options (as set with forge init), run forge config --basic. This can be used to create a new foundry.toml file with forge config --basic > foundry.toml.

By default forge config shows the currently selected foundry profile and its values. It also accepts the same arguments as forge build.

DappTools Compatibility

You can re-use your .dapprc environment variables by running source .dapprc before using a Foundry tool.

Additional Configuration

You can find additional setup and configurations guides in the Foundry Book:

Contributing

See our contributing guidelines.

Getting Help

First, see if the answer to your question can be found in book, or in the relevant crate.

If the answer is not there:

If you want to contribute, or follow along with contributor discussion, you can use our main telegram to chat with us about the development of Foundry!

Acknowledgements