Skip to content

v1.2.2

Compare
Choose a tag to compare
@github-actions github-actions released this 30 May 12:39
· 74 commits to master since this release
73ac79f

Foundry v1.2.2

Foundry v1.2.2 is a bugfix release for forge formatter and cast hash-message command.

Forge Fixes

Cast Fixes

Changelog:

v1.2.1...v1.2.2

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

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