Releases: foundry-rs/foundry
Nightly (2025-10-28)
Other
- chore: clean up benchmark script a bit (#12295) by @onbjerg
- chore(docs): default
allforprefer_compactfmt config (#12294) by @grandizzy - test(config): add test for test_failures_file path normalization (#12235) by @silvekkk
- fix: enable/disable global yansi color with flag (#12297) by @DaniPopes
- test: invariant sequence colors (#11730) by @grandizzy
- docs(fmt): add
nonevariant (#12298) by @0xrusowsky - docs: update transaction types to use constants (#12301) by @CreeptoGengar
- chore(deps): bump taiki-e/install-action from 2.62.33 to 2.62.39 (#12310) by @dependabot[bot]
- chore(deps): bump actions/upload-artifact from 4 to 5 (#12311) by @dependabot[bot]
- chore(deps): bump actions/download-artifact from 5 to 6 (#12312) by @dependabot[bot]
- chore: switch rpc url arbitrum (#12314) by @grandizzy
Full Changelog:
Nightly (2025-10-28)
Other
- feat(cast): add cast erc20 with subcommands balance, transfer, approve, allowance (#12258) by @marcvernet31
- feat(fmt): add single_line_imports option to keep single imports on one line (#12303) by @silvekkk
- fix(fmt): keep if stmts inline in assembly blocks (#12306) by @0xrusowsky
- chore: remove redundant Bytes conversion in mined_transaction_receipt (#12313) by @Sharilleed223
- chore: remove unused Add import in state_snapshot.rs (#12305) by @wedjob0X
- fix(fmt): prevent double-ind in complex ternary expr (#12317) by @0xrusowsky
- chore: rpc url (#12318) by @grandizzy
- fix(fmt): only indent wrapped trailing block cmnts (#12319) by @0xrusowsky
- chore: fix rpc url for arb if no env var (#12320) by @grandizzy
- ci: don't run most CI on push (#12230) by @DaniPopes
- fix(fmt): don't break var assignments when callee fits (#12323) by @0xrusowsky
- ci: add 'release' to release job names (#12326) by @DaniPopes
Full Changelog:
Nightly
Other
- feat(cast): add cast erc20 with subcommands balance, transfer, approve, allowance (#12258) by @marcvernet31
- feat(fmt): add single_line_imports option to keep single imports on one line (#12303) by @silvekkk
- fix(fmt): keep if stmts inline in assembly blocks (#12306) by @0xrusowsky
- chore: remove redundant Bytes conversion in mined_transaction_receipt (#12313) by @Sharilleed223
- chore: remove unused Add import in state_snapshot.rs (#12305) by @wedjob0X
- fix(fmt): prevent double-ind in complex ternary expr (#12317) by @0xrusowsky
- chore: rpc url (#12318) by @grandizzy
- fix(fmt): only indent wrapped trailing block cmnts (#12319) by @0xrusowsky
- chore: fix rpc url for arb if no env var (#12320) by @grandizzy
- ci: don't run most CI on push (#12230) by @DaniPopes
- fix(fmt): don't break var assignments when callee fits (#12323) by @0xrusowsky
- ci: add 'release' to release job names (#12326) by @DaniPopes
Full Changelog:
Nightly (2025-10-27)
Other
- chore(deps): weekly
cargo update(#12286) by @github-actions[bot] - chore: reduce number of shrink runs for slow test (#12291) by @grandizzy
- feat(forge): exit test run gracefully if show progress (#12290) by @grandizzy
- docs: correct logging documentation accuracy in debugging.md (#12287) by @avorylli
- chore: simplify Bytes handling in revert errors (#12280) by @Sharilleed223
- fix(script): prevent --verify without --broadcast from causing deployment not found error (#11734) by @DeVikingMark
- chore(fmt): prefer_compact + indent bin expr w/ parenthesis (#12281) by @0xrusowsky
- fix: enable IPC tests on Windows (#12282) by @DeVikingMark
- fix(fmt): simplify boolean expression in Solidity formatter (#12275) by @phrwlk
Full Changelog:
Nightly (2025-10-26)
Other
- chore(forge): delete useless todo's (#12276) by @DeVikingMark
- refactor: remove redundant .as_str() calls on temporary strings (#12279) by @Fallengirl
- docs: fix Cheatcode trait methods count in documentation (#12277) by @avorylli
Full Changelog:
Nightly (2025-10-25)
Other
- chore: remove redundant Bytes inner conversion in otterscan backend (#12259) by @Sharilleed223
- fix(forge): fix dynamic gas limit check (#12267) by @grandizzy
- fix(common): spurious detection off-by-one (#12262) by @MozirDmitriy
- fix(wallets): prevent duplicate Trezor wallets when using --hd-paths (#12214) by @GarmashAlex
- fix(fmt): preserve indexed callee when it fits (#12270) by @0xrusowsky
- chore: bump v1.4.4 (#12271) by @grandizzy
Full Changelog:
Nightly (2025-10-24)
Other
- chore: set seed for flaky tests, use etherscan api key (#12255) by @grandizzy
- fix(npm): handle unhandled promise rejection in binary download (#12261) by @maradini77
Full Changelog:
Nightly (2025-10-23)
Other
- chore: fix erc20 balance test (#12239) by @grandizzy
- chore: update traces for p256 precompile test (#12242) by @grandizzy
- feat(doc): render @title NatSpec tag in comment output (#12232) by @MozirDmitriy
- feat(fuzz): ast-seeded dictionary (#12015) by @0xrusowsky
- chore(evm): remove public visibility from
FoundryEvm's inner field (#12237) by @mablr - fix(fmt): no trailing cmnts in opening brace of empty blocks (#12241) by @0xrusowsky
- fix(forge): update progress on rejected fuzz runs (#12243) by @grandizzy
- chore(deps): bump revm 30+, alloy-evm, revm-inspectors (#12094) by @zerosnacks
- chore: remove dead code (#12245) by @onbjerg
- chore: mark some inner fields private (#12246) by @onbjerg
- chore: mark more stuff private (#12248) by @onbjerg
- chore(deps): bump alloy-chains (#12244) by @zerosnacks
- chore: clean up
EvmOpts(#12247) by @onbjerg - chore: update Selectors API URLs to Sourcify (#12250) by @akshatmittal
Full Changelog:
v1.4.3
Foundry v1.4.3
Foundry v1.4.3 is a bugfix release for forge and anvil.
Anvil Fixes
- fix(anvil): get account info from db when node block > fork block (#12175) by @grandizzy
Forge Fixes
- fix(fmt): inline call options when they fit (#12172) by @0xrusowsky
- fix(fmt): do not add underscores on fractional part with exponent (#12195) by @0xrusowsky
- fix(forge): show backtrace line only on -vvvvv (#12211) by @grandizzy
- fix(coverage): do not account abstract contract items (#12202) by @grandizzy
- fix(coverage): exclude only virtual fns without impl (#12216) by @grandizzy
Full Changelog:
stable
Foundry v1.4.3
Foundry v1.4.3 is a bugfix release for forge and anvil.
Anvil Fixes
- fix(anvil): get account info from db when node block > fork block (#12175) by @grandizzy
Forge Fixes
- fix(fmt): inline call options when they fit (#12172) by @0xrusowsky
- fix(fmt): do not add underscores on fractional part with exponent (#12195) by @0xrusowsky
- fix(forge): show backtrace line only on -vvvvv (#12211) by @grandizzy
- fix(coverage): do not account abstract contract items (#12202) by @grandizzy
- fix(coverage): exclude only virtual fns without impl (#12216) by @grandizzy
Foundry v1.4.2
Foundry v1.4.2 is a bugfix release for forge fmt and anvil.
Anvil Fixes
- fix(anvil): eth_getAccountInfo check if predates fork inclusive (#12101) by @grandizzy
Forge Fixes
- fix(doc): follow tab width fmt config (#12103) by @grandizzy
- fix(fmt): account for ternary operators when estimating size (#12104) by @0xrusowsky
- fix(fmt): properly handle multiline_func_header = "all" + bump alloy (#12110) by @0xrusowsky
- fix(fmt): ensure no underscores in yul number literals (#12112) by @0xrusowsky
- fix(fmt): handle trailing coments between base contracts (#12127) by @0xrusowsky
- fix(fmt): filter libs when recursing (#12119) by @0xrusowsky
- fix(fmt): break try stmts in a fn header-like fashion (#12131) by @0xrusowsky
- fix(fmt): use nbsp if LHS-most element fits (#12135) by @0xrusowsky
- fix(fmt): prioritize parenthesis breaks in emit and revert stmts (#12147) by @0xrusowsky
Foundry v1.4.1
Foundry v1.4.1 is a bugfix release for forge fmt and anvil.
Anvil Fixes
- fix(anvil): set envelope for non deposit tx in debug tracers (#12080) by @grandizzy
Forge Fixes
- fix(fmt): ensure commasep breaks with final trailing cmnt (#12031) by @0xrusowsky
- fix(fmt): refine logic over comments between uninformed commasep (#12055) by @0xrusowsky
- fix(fmt): don't normalize single-line non-doc block cmnts (#12078) by @0xrusowsky
Foundry v1.4.0
This release brings up to 10.52% better performance for forge coverage and up to 11.41% for fuzzed tests, a new formatter built on Solar, enhanced handling of multiple chain configurations and deployments, and an improved testing and debugging experience with backtraces and custom network precompiles. Foundry v1.4 is Osaka-ready, comes with new Anvil endpoints, deprecates the Etherscan v1 API, and publishes forge as an npm package.
Performance Improvements
Foundry v1.4 leverages Solar API to analyze contracts and identify coverage items (#11565), and updates coverage implementation to align with that of forge test (#11801). It also completely removes the proptest runner from fuzzed tests (#11061), resulting in up to a 10.52% performance improvement for forge coverage and up to an 11.41% performance improvement in fuzzed tests execution speed on the same benchmarked projects as previous versions.
Forge Coverage
| Repository | v1.3.6 | v1.4.0 | X Times Faster | % Improvement |
|---|---|---|---|---|
| ithacaxyz-account | 14.91 s | 13.34 s | x1.12 | 10.52% |
| Uniswap-v4-core | 1m 34.8s | 1m 30.3s | x1.05 | 4.74% |
| sparkdotfi-spark-psm | 3m 49.3s | 3m 40.2s | x1.04 | 3.97% |
Forge Fuzz tests
| Repository | v1.3.6 | v1.4.0 | X Times Faster | % Improvement |
|---|---|---|---|---|
| ithacaxyz-account | 3.18 s | 3.02 s | x1.05 | 5.03% |
| solady | 2.39 s | 2.24 s | x1.07 | 6.28% |
| Uniswap-v4-core | 6.84 s | 6.20 s | x1.10 | 9.36% |
| sparkdotfi-spark-psm | 3.07 s | 2.72 s | x1.13 | 11.41% |
Enhanced configuration
Configuration inheritance
Foundry v1.4 supports configuration inheritance through the extends field in foundry.toml, making it easier to maintain a shared base configuration across multiple projects or profiles (#11284). This enables cleaner setups and reduces duplication by inheriting from a base configuration file:
[profile.default]
extends = "./base-config.toml"
src = "src"
test = "test"For more details please refer to configuration inheritance docs.
Multi-chain configuration
The newly added forge-std config helper, built on top of Foundry v1.4 cheatcodes, provides a streamlined way to manage configuration for multi-chain environments in tests and scripts. It automatically loads and parses TOML configuration files, creates forks for specified chains, and provides type-safe access to configuration variables.
Loading configuration and creating forks for each chain specified in the config can be done by calling _loadConfigAndForks function, which also supports updating configurations on the fly.
function _loadConfigAndForks(string memory filePath, bool writeToFile) internalScripting workflows, in particular, gain significant advantages from the features of the Config contract. Please refer to config helper docs and scripting with config docs for more details.
For a complex, production-ready example, please see Ithaca's account deploy script and configuration.
We're continuously working to improve multi-chain support, please share your feedback on the current approach and suggest new features or enhancements in #11449.
Enhanced testing UX
Foundry v1.4 introduces backtraces (#11547) that include the exact line number in the Solidity source code corresponding to the compiled bytecode where the error or revert occurred.
[FAIL: ERC20: transfer amount exceeds allowance] testTransferFromWithoutApproval() (gas: 28771)
Traces:
[28771] ForkBacktraceTest::testTransferFromWithoutApproval()
├─ [22928] ForkedERC20Wrapper::transferFromWithoutApproval(0x55FE002aefF02F77364de339a1292923A15844B8, 0x000000000000000000000000000000000000dEaD, 1000000 [1e6])
│ ├─ [18884] FiatTokenProxy::fallback(0x55FE002aefF02F77364de339a1292923A15844B8, 0x000000000000000000000000000000000000dEaD, 1000000 [1e6])
│ │ ├─ [11573] FiatTokenV2_2::transferFrom(0x55FE002aefF02F77364de339a1292923A15844B8, 0x000000000000000000000000000000000000dEaD, 1000000 [1e6]) [delegatecall]
│ │ │ └─ ← [Revert] ERC20: transfer amount exceeds allowance
│ │ └─ ← [Revert] ERC20: transfer amount exceeds allowance
│ └─ ← [Revert] ERC20: transfer amount exceeds allowance
└─ ← [Revert] ERC20: transfer amount exceeds allowance
Backtrace:
at FiatTokenV2_2.transferFrom
at FiatTokenProxy.fallback
at ForkedERC20Wrapper.transferFromWithoutApproval (src/ForkedERC20Wrapper.sol:35:24)
at ForkBacktraceTest.testTransferFromWithoutApproval (test/ForkBacktrace.t.sol:28:96)Forge Formatter
Foundry v1.4 ships with a new Solidity formatter (forge fmt) built on top of Solar and replacing the previous Solang-based implementation and its limitations (#10907). This change enables faster support for new Solidity language features and allows us to address long-standing formatting bugs that were previously blocked by Solang dependency.
We've aimed for feature parity with the legacy formatter, but there may still be some edge cases that aren’t fully covered yet, so please be aware and report any issues you encounter.
Coverage-Guided Fuzzing
In addition to extending coverage-guided fuzzing and time-based campaigns to stateless fuzz tests, this version introduces ABI mutations (such as bit-flip, interesting word, increment/decrement, and Gaussian noise mutators) to enhance test coverage and help uncover new execution paths by generating diverse and edge-case inputs (#11061).
Custom Network Precompiles
Beginning with the transfer precompile contributed by the Celo team for Anvil (#11209), we have extended support to forge and cast components, making it simpler for external contributions. If you want to contribute support for a custom network, please check out documentation and Celo example within foundry-evm-networks crate.
Anvil Improvements
With this release, Anvil adds support for JS and prestate tracers, and print traces and logs when using --print-traces switch, enabling more powerful and customizable debugging capabilities. Additionally, several new RPC endpoints have been introduced:
eth_config: exposes Anvil's current configuration, such as chain ID, fork settings, and feature flags (#11591).anvil_impersonateSignature: allows simulating transactions as if they were signed by a given address, useful for testing signature-based flows (#11195).anvil_getBlobSidecarsByBlockId: returns the blobs for a given transaction hash (#11828).
Other
forge lintimprovements: mixed case exceptions lint, ERC20 transfer check- improve state diffs cheatcodes by adding nonce and balance diffs and by using storage layout to decode values
- addition of native
vm.boundcheatcode that enables log-uniform sampling - updated Sourcify integration to support API ...