Skip to content

Releases: foundry-rs/foundry

Nightly (2025-05-22)

22 May 06:11
4332dc4
Compare
Choose a tag to compare
Nightly (2025-05-22) Pre-release
Pre-release

Forge Features

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

Full Changelog:

nightly...nightly-4332dc48a5f3a3627d152aa2912138e2c9ef4caa

v1.2.1-rc

21 May 17:55
42341d5
Compare
Choose a tag to compare

Foundry v1.2.1

Foundry v1.2.1 is a bugfix release for forge formatter, forked tests and vm.cool cheatcode.

Forge Fixes

Changelog:

v1.2.0...v1.2.1-rc

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

⚠️ At the end of May Etherscan will deprecate its V1 API. With the new V2 API Etherscan enables users to use a single API key for all chains to greatly simplify the management of API keys for multichain Foundry codebases. Any API key created on etherscan.io (mainnet) can be used for all chains. API keys created on deployments of Etherscan on other chains (e.g. BaseScan, Arbiscan, etc..) will likely stop working. Please see the Etherscan v2 documenation for additional details. Whilst Foundry still supports V1 API keys until deprecation it is highly recommended to migrate now as follows in your 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

Anvil Fixes

Cast Features

Cast Fixes

Forge Features

Forge Fixes

Other

Full Changelog:

v1.1.0...v1.2.0-rc

v1.2.1

26 May 04:55
42341d5
Compare
Choose a tag to compare

Foundry v1.2.1

Foundry v1.2.1 is a bugfix release for forge formatter, forked tests and vm.cool cheatcode.

Forge Fixes

Changelog:

v1.2.0...v1.2.1-rc

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

⚠️ At the end of May Etherscan will deprecate its V1 API. With the new V2 API Etherscan enables users to use a single API key for all chains to greatly simplify the management of API keys for multichain Foundry codebases. Any API key created on etherscan.io (mainnet) can be used for all chains. API keys created on deployments of Etherscan on other chains (e.g. BaseScan, Arbiscan, etc..) will likely stop working. Please see the Etherscan v2 documenation for additional details. Whilst Foundry still supports V1 API keys until deprecation it is highly recommended to migrate now as follows in your 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

Anvil Fixes

Cast Features

Cast Fixes

Forge Features

Forge Fixes

Other

Full Changelog:

v1.1.0...v1.2.0-rc

stable

20 Dec 08:57
42341d5
Compare
Choose a tag to compare

Foundry v1.2.1

Foundry v1.2.1 is a bugfix release for forge formatter, forked tests and vm.cool cheatcode.

Forge Fixes

Changelog:

v1.2.0...v1.2.1-rc

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

⚠️ At the end of May Etherscan will deprecate its V1 API. With the new V2 API Etherscan enables users to use a single API key for all chains to greatly simplify the management of API keys for multichain Foundry codebases. Any API key created on etherscan.io (mainnet) can be used for all chains. API keys created on deployments of Etherscan on other chains (e.g. BaseScan, Arbiscan, etc..) will likely stop working. Please see the Etherscan v2 documenation for additional details. Whilst Foundry still supports V1 API keys until deprecation it is highly recommended to migrate now as follows in your 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

Anvil Fixes

Cast Features

Cast Fixes

Forge Features

Forge Fixes

Other

Full Changelog:

v1.1.0...v1.2.0-rc

Nightly (2025-05-21)

21 May 06:11
a93c000
Compare
Choose a tag to compare
Nightly (2025-05-21) Pre-release
Pre-release

Other

  • fix(forge bind): add serde as a dependency to generated Cargo.toml if Serde is being derived in bindings (#10563) by @zerosnacks
  • chore: remove additional EOF leftovers (#10506) by @zerosnacks
  • chore: bump alloy 1.0.5 (#10568) by @mattsse
  • fix(anvil): inject the P256 precompile for --odyssey upon EVM construction and fix NotActivated error for --optimism (#10567) by @zerosnacks
  • chore: Simplifing mined_logs_for_block filter (#10572) by @Ayushdubey86

Full Changelog:

nightly...nightly-a93c000a5f18a57e6c927e45fb088604ad42d656

Nightly (2025-05-20)

20 May 06:12
0ca8dd4
Compare
Choose a tag to compare
Nightly (2025-05-20) Pre-release
Pre-release

Forge Fixes

Other

Full Changelog:

nightly...nightly-0ca8dd47ef6b28aaf2d61837954ca73d4a0b435e

v1.2.0-rc1

19 May 17:59
0c1967f
Compare
Choose a tag to compare

Foundry v1.2.0

This release comes with support for Etherscan's V2 API, forge script execution protection, performance improvement of Anvil block mining, support for transient keyword and custom storage layouts in forge formatter and several fixes for EIP-7702 cheatcodes.

Etherscan v2 API support

⚠️ At the end of May Etherscan will deprecate its V1 API. With the new V2 API Etherscan enables users to use a single API key for all chains to greatly simplify the management of API keys for multichain Foundry codebases. Any API key created on etherscan.io (mainnet) can be used for all chains. API keys created on deployments of Etherscan on other chains (e.g. BaseScan, Arbiscan, etc..) will likely stop working. Please see the Etherscan v2 documenation for additional details. Whilst Foundry still supports V1 API keys until deprecation it is highly recommended to migrate now as follows in your 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

Anvil Fixes

Cast Features

Cast Fixes

Forge Features

Forge Fixes

Other

Full Changelog:

v1.1.0...v1.2.0-rc1

Nightly (2025-05-19)

19 May 06:11
dc6a216
Compare
Choose a tag to compare
Nightly (2025-05-19) Pre-release
Pre-release

Other

Full Changelog:

nightly...nightly-dc6a2160ef1cecf21531eaf6722af9f7f64ca3c7

Nightly (2025-05-18)

18 May 06:13
e775140
Compare
Choose a tag to compare
Nightly (2025-05-18) Pre-release
Pre-release

Other

Full Changelog:

nightly...nightly-e7751408f6b2168ad41952699a194225b57fd729

Nightly (2025-05-17)

17 May 06:11
71f9b8e
Compare
Choose a tag to compare
Nightly (2025-05-17) Pre-release
Pre-release

Cast Fixes

Forge Fixes

  • fix(forge): mark prank applied on contract creation too (#10532) by @grandizzy
  • fix(forge): do not revert if event with count 0 not emitted (#10534) by @grandizzy

Other

Full Changelog:

nightly...nightly-71f9b8e645abc24da099912ce4d4ce481d26ffad