github foundry-rs/foundry v1.10.0

one hour ago

Foundry 1.10.0 replaces revm with evm2, a new blazing fast execution engine, across Forge, Anvil, Cast and Chisel. Read Action required before upgrading, because gas numbers and some execution details change.

What you get:

  • Up to 4.5× faster tests on evm2. A tighter interpreter, and inspectors that step only the opcodes they act on, make forge test 4.5× faster than 1.9.0 on Morpho Blue, 3.5× on Spark PSM and 2.1× on Aave v4.
  • Pinned Solar releases. solc = "solar:0.3.0" pins a Solar release, which Forge downloads if it is missing, and forge build -j 4 compiles with four Solar threads.
  • Tempo T14 configurable accounts. Create configurable accounts, manage their owners and thresholds, and send transactions their owners sign, from Cast, Forge and Anvil.
  • Faster debugger. On the 1.46M-step Aave v4 test, SolDB is ready in 1.40 s instead of 1.96 s, with peak memory around 1 GiB. The opcode pane shows PUSH values again.
  • Deeper invariant campaigns. Runs resume from states reached by earlier runs, and failing fuzz and invariant tests report minimized counterexamples.
  • About 220 fixes across symbolic execution, coverage, cheatcodes, fuzzing, Anvil and Cast.

Action required

  • Gas snapshots (evm2): regenerate them. Fork warmth and fork transient storage no longer leak from setUp, and vm.setArbitraryStorage leaves slots cold. A halting call under vm.expectRevert now consumes all forwarded gas, as on chain, unless the test makes it directly as a non-static call with isolate = true. If later work in the test runs out of gas, forward a fixed amount, as in target.f{gas: 100_000}() (#17541, #18396).
  • Remappings: when a dependency's remapping conflicts with another dependency or a root path, it now applies only inside that dependency, which can change which copy a dependency compiles against. A root import of that alias then fails with an error that suggests the remapping to add, or silently resolves to another target, and Forge warns in that case. Adding the old line to your root remappings restores 1.9 resolution for the whole project (#18433, #18573, #18590, #18603).
  • Test discovery: only suites under src, test and script run, and forge test warns about project suites it skips. Widen test to keep running them (#18424, #18572).
  • Invariants: snapshot fuzzing is on by default, so a run can start from a state an earlier run reached instead of from setUp. Handlers and afterInvariant hooks that assume a fresh state per run can fail (#18018).

Performance

Features

Forge

Tempo T14 configurable accounts

  • Cast: cast wallet creates configurable accounts and manages their owners. send, mktx, batch-send, estimate and zone transfers sign as configurable accounts with their owners' keys, a configurable account can act as another account's access key, and owners on other machines approve with cast wallet sign --no-hash, including --p256. cast tx shows their signatures (#18378, #18410, #18407, #18506, #18510, #18535, #18507, #18426, #18421, #18508) by @mablr, @stevencartavia.
  • Forge: cheatcodes derive, digest and sign for configurable accounts, and forge script sends as one whose owners sign on other machines (#18408, #18411, #18443) by @mablr.
  • Anvil: it simulates and impersonates configurable accounts, including forked ones, and traces decode their precompile (#18377, #18536, #18509, #18374, #18372) by @mablr.

Anvil and Cast

Bug fixes

Execution and Anvil

Cheatcodes and state diffs

Fuzzing, invariants and coverage

Symbolic execution

Forge, scripts and config

Cast and Chisel

Other fixes and chores

Other behavior changes

  • evm2: transfers that overflow a balance saturate instead of halting, re-selecting a fork restores its whole block environment, and vm.setEvmVersion applies to new calls only. Traces show halted nested calls using all forwarded gas. Anvil removes empty touched accounts (EIP-161), so state roots can differ from 1.9, and rejects EIP-4844 transactions on OP Stack networks (#17541, #18278).
  • Downgrades: older versions discard fork caches written by 1.10 and cannot load Anvil dumps written with --preserve-historical-states (#17541).
  • Tempo T14: cast wallet new creates a configurable account on Tempo chains with T14 active. Pass --eoa for a conventional account (#18378, #18410).
  • Invariants: multi-worker campaigns no longer reserve a worker for selector focus. Use targetSelector to target one handler (#18184).
  • Symbolic execution (preview): soundness fixes turn some previously passing tests into failures with replayed counterexamples (#18057, #18090, #18101, #18175).
  • Lints: the new ERC-7201 lints run on build and fail builds with --deny warnings (#18029, #18030).
  • Rust API: revm types are gone from foundry-evm* and anvil, and Anvil's PrecompileFactory no longer has install (#17541, #18375).

Dependencies

New contributors

@clippytool, @erkancamli, @kutluhaneth46, @Naveen-6087, @PlasticDigits, @rome-xi, @Steven-J-22, @unixglo and @Ynyesto.

Full Changelog:

v1.9.0...v1.10.0

Don't miss a new foundry release

NewReleases is sending notifications on new releases.