Releases: foundry-rs/foundry
v1.2.2
Foundry v1.2.2
Foundry v1.2.2 is a bugfix release for forge formatter and cast hash-message command.
Forge Fixes
- fix(fmt): 'layout' is not a keyword (#10656) by @DaniPopes
Cast Fixes
- fix(cast): read all lines for message to hash (#10671) by @grandizzy
Changelog:
Foundry v1.2.1
Foundry v1.2.1 is a bugfix release for forge formatter, forked tests and vm.cool cheatcode.
Forge Fixes
- fix: patch solang-parser (#10509 #10556) by @DaniPopes
- fix: update persistent storage from active db (#10576) by @grandizzy
- fix: vm.cool mark cold instead storage cleaning (#10582) by @grandizzy
Changelog:
Foundry v1.2.0
This release comes with support for Etherscan's V2 API, forge script execution protection, performance improvement of Anvil block mining and several fixes for EIP-7702 cheatcodes.
Etherscan v2 API support
foundry.toml
:
[etherscan]
sepolia = { key = "$YOUR_V2_COMPATIBLE_API_KEY" }
Etherscan v1 API and keys are still supported by specifying the global etherscan_api_version = "v1"
config, or per chain api-version
as follows in your foundry.toml
:
[etherscan]
base-sepolia = { key = "$YOUR_V1_API_KEY", api-version = "v1" }
Performance
Consistent Anvil blocks mining
Mining a block in Anvil is a blocking operation because it can take a relatively long time (and can be significantly longer in forking mode due to rpc requests). Until this version, the mining block tasks were not spawned as blocking tasks, and that could cause state inconsistencies like seen in Cow protocol integration tests failures. Foundry v1.2.0 changes the way blocks are mined in Anvil and ensures consistency by spawning request handlers as blocking tasks.
Forge script execution protection
In order to protect against coding errors that could lead to undesired transactions and transfer of funds to script address itself, this version comes with execution protection feature which reverts execution if address(this)
is used. The protection is enabled by default and can be turned off by setting as follows in foundry.toml
:
script_execution_protection = false
Anvil Features
- feat: added TransactionStream to subscribe to pending transactions (#10482) by @Soubhik-10
- feat: added eth_getAccountInfo to anvil (#10496) by @Rimeeeeee
- feat: add 7702 support to eth-sendtransaction (#10504) by @mattsse
Anvil Fixes
- perf: spawn mining on blocking (#10471) by @mattsse
- fix(anvil): use saturating_to when check for req funds (#10503) by @grandizzy
- fix(anvil): trace_filter same to and from block range is valid (#10400) by @0xdapper
- fix: Replay raw txs without tweaks in anvil_reorg (#10442) by @spalladino
- fix(anvil): recomputing next-base-fee after reloading state (#10488) by @naps62
Cast Features
- Support the
gcp
option incast wallet list
(#8232) by @moricho - feat(cast): Include recover_authority when logging SignedAuthorization (#10349) by @naijauser
- feat(cast): Add state overrides flags to cast call (#10255) by @tushar994
- feat(cast): Add file option for calldata input (#10397) by @Ayushdubey86
Cast Fixes
- Apply access list to tracing executor for 'cast call --trace' (#10161) by @svenski123
- fix: add check for conflicting create (#10467) by @mattsse
Forge Features
- feat(forge): add new cheatcode
attachBlob
to send EIP-4844 transaction (#10336) by @0xcomfycat - feat(script): revert if address(this) used (#10295) by @gap-editor
- feat: add serde derive to forge bind (#10332) by @0xcomfycat
- feat(forge): add
vm.stopRecord
(#10370) by @tushar994 - feat(forge): script warn if no transactions to broadcast (#10384) by @Ayushdubey86
- feat(forge): add script execution protection config (#10408) by @grandizzy
- feat: Etherscan V2 support (#10440) by @grandizzy
- feat: solc 0.8.30 (#10459) by @DaniPopes
Forge Fixes
- fix(forge): avoid panic on internal decoding of linked tests (#10333) by @grandizzy
- fix(forge): run git submodule sync when installing (#10347) by @grandizzy
- fix(forge): do not use bytecode metadata in fuzz dict (#10402) by @grandizzy
- fix(forge): show lcov hits for do while statements (#10423) by @grandizzy
- fix(forge): Set empty code if the 7702 delegation address is 0x (#10481) by @grandizzy
- fix(forge): fix nonce for tx with 7702 auth (#10464) by @grandizzy
- fix(forge): support preproc with try contract creation (#10498) by @grandizzy
Other
- chore(deps): weekly
cargo update
(#10339) by @github-actions[bot] - chore(
release
): addgcp-kms
flag to default release workflow (#10346) by @zerosnacks - chore(deps): weekly
cargo update
(#10381) by @github-actions[bot] - chore(deps): replace inflector with heck (#10386) by @DaniPopes
- chore(deps): switch to proc-macro-error2 (#10387) by @DaniPopes
- chore(deps): remove serde_regex (#10389) by @DaniPopes
- chore(deps): use unicode-rs as the idna backend (#10390) by @DaniPopes
- test(anvil): fix flaky test (#10391) by @DaniPopes
- test: move serial_tests to nextest test groups (#10392) by @DaniPopes
- chore: metadata hash extraction cleanup (#10396) by @DaniPopes
- chore(deps): replace humantime with jiff (#10395) by @DaniPopes
- Update to soldeer 0.5.4 (#10399) by @mario-eth
- chore: update
std::process::exit(0)
calls inProjectCompiler::compile
(#10328) by @Pronoss - chore: minor changes (#10415) by @DaniPopes
- feat: add Alpine Linux support to foundryup (#10257) by @daramir
- fix(forge): remove
strategy
section from workflow template to simplify (#10434) by @winor30 - core: sprinkle some traces (#10456) by @mattsse
- chore: add OpRetro to funding.json (#10462) by @yash-atreya
- test(
cast
): add and enable negative octal formatting test (#10468) by @torrpriius - chore: replaced trie with alloy-trie (#10478) by @Rimeeeeee
- chore: rm work type (#10474) by @mattsse
- chore: rm unused account type (#10472) by @mattsse
- replaced default with calculate (#10236) by @Rimeeeeee
- feat: add devcontainer (#10429) by @just-mitch
- refactor(common): improve URL path handling in runtime transport (#10493) by @CreeptoGengar
- chore: remove
Eof::decode
usage (#10499) by @klkvr - fix: sort blocks by number (#10505) by @mattsse
Full Changelog:
Nightly (2025-05-30)
- No changes
Nightly
- No changes
Nightly (2025-05-28)
Other
- chore(wallets): improve error message for signer instantiation failure (#10646) by @mablr
- chore: replaced anvil hardforks with alloy hardforks (#10612) by @Rimeeeeee
Full Changelog:
Nightly (2025-05-27)
Cast Features
Other
- chore(deps): bump revm to 24.0.0 (#10601) by @zerosnacks
- feat: implement add_balance endpoint (#10636) by @pistomat
- fix(bindings): ensure forge bind generates snake_case file names (#10622) by @zarkk01
- chore: standardize lint help + validate docs existance (#10639) by @0xrusowsky
Full Changelog:
Nightly (2025-05-26)
Nightly (2025-05-25)
Nightly (2025-05-24)
Other
- Force
prevrandao
on Rootstock testnet (#10603) by @ahsan-javaiid - fix(
cast
): include zero address as known system sender in cast run (#10608) by @yash-atreya - fix(forge lint): do not flag
fn test*
andfn invariant*
(#10607) by @0xrusowsky - chore(lint): correct some spans (#10610) by @DaniPopes
- fix: make sign and verify symmetrical (#10614) by @mattsse
- feat(forge/script): decode execution traces when
--json
is enabled (#10109) by @0xpanoramix
Full Changelog:
Nightly (2025-05-23)
Cast Features
Forge Features
- feat(forge): forge lint (#10405) by @0xrusowsky
Forge Fixes
- fix:
vm.chainId
regression in isolation mode onnightly
postrevm
bump (#10589) by @zerosnacks
Other
- chore(cast): upgrade evmole to 0.8.0 (#10585) by @cdump
- chore(ens): replacing common::ens with the alloy_ens crate. (#10584) by @l1nxy
- chore: update lockfile (#10587) by @mattsse
- fix: refactor
step
andstep_end
for clarity (#10590) by @0xrusowsky
Full Changelog:
Nightly (2025-05-22)
Forge Features
- feat(forge): revert diagnostic inspector (#10446) by @0xrusowsky
Other
- forge(fix): update persistent storage from active db (#10576) by @grandizzy
- chore: replaced anvil DepositTransaction with just op_alloy::TxDeposit (#10480) by @Rimeeeeee
- feat(anvil): add block context overrides for eth_call and eth_estimateGas (#10487) by @mablr