1 of 30

Foundry

a portable, fast, and modular toolkit� for Ethereum application development, �written in Rust.

georgios@paradigm.xyz

@gakonst

https://github.com/foundry-rs

2 of 30

Foundry

a portable, fast, and modular toolkit� for Ethereum application development, �written in Rust.

georgios@paradigm.xyz

@gakonst

https://github.com/foundry-rs

3 of 30

The Problem

  • Context Switching
    • Solidity contracts
    • JS/TS/Python tests
    • Too much to learn / remember
  • Speed/Productivity
    • Compilation + Testing take >15-20s, or even minutes
    • >20s → minutes, I just alt tab to Twitter
    • Slow forking mode
  • Security
    • Fuzzing requires too much setup
    • Hard to modify EVM state to explore more codepaths
  • High overhead to install across platforms

4 of 30

..also js bignumber

5 of 30

The Solution

  • Solidity tests
    • no context switching
    • write in 1 language
    • no new testing syntax
  • Intuitive property-based testing
  • VM State Overriding
  • Optimized compilation + testing pipeline
    • aggressive caching + pruning of dep graph
    • compile tests + app code together/in parallel
    • Fast Rust EVM
  • Runtime observability + debugging
  • <15MB cross-platform binaries

6 of 30

aka Foundry

7 of 30

Does anyone care?

8 of 30

Does anyone use this?

9 of 30

Wide ecosystem + contributor set

10 of 30

Easy to install: Foundryup

11 of 30

Fast Compilation pipeline

12 of 30

Fast Testing + Forking

..and >16x vs Hardhat on @uniswap/v3-periphery

13 of 30

Solidity Tests

14 of 30

Intuitive property based testing / fuzzing

15 of 30

Invariant Testing / Multi-step Fuzzing

16 of 30

VM State Overrides aka Cheatcodes

17 of 30

Runtime Introspection: Call Traces

18 of 30

Runtime Introspection: Interactive Debugger

19 of 30

Runtime Introspection: Gas Reports

20 of 30

When Coverage?

21 of 30

Coverage!

22 of 30

Chain Ops / Solidity Scripting

23 of 30

Chain Ops & tests go multichain

24 of 30

Formatting: forge fmt

25 of 30

Anvil: A drop-in ganache-cli / hardhat node replacement

26 of 30

Hardhat Plugin: Speed improvements for free

27 of 30

Mandatory shoutout

28 of 30

Mandatory shoutout

29 of 30

Next few months…

..Not much! We’re almost feature complete.

  • Release v0.3 (next ~2 weeks, fixing edge cases)
  • Release v1.0 (next ~2 months, figuring out checklist)
  • Performance / stability improvements
  • Prioritize v2.0 features (more languages?)

It’s good! Try it out if you haven’t :)

Docs: https://book.getfoundry.sh/

30 of 30

Thank you for your attention!

Q&A?�https://getfoundry.sh/

https://github.com/foundry-rs

georgios@paradigm.xyz

@gakonst