github NomicFoundation/hardhat hardhat-core-v2.5.0
Hardhat v2.5.0

latest releases: @nomiclabs/hardhat-vyper@3.0.6, hardhat@2.22.3, @nomicfoundation/hardhat-viem@2.0.1...
2 years ago

This release adds support for the upcoming London hardfork to Hardhat.

Enabling the London support

This version of Hardhat doesn't run Hardhat Network using London by default. To use this hardfork, you need to have these config fields:

networks: {
  hardhat: {
    hardfork: "london",
    gasPrice: "auto"
  } 
}

Base fee selection

The London hardfork includes the long-awaited EIP-1559, which changes how transactions pay to be included in the Ethereum blockchain. This includes a new concept called base fee.

To configure the base fee of the first local block, set the initialBaseFeePerGas property in the Hardhat Network configuration:

module.exports = {
  networks: {
    hardhat: {
      initialBaseFeePerGas: 1_000_000_000
    }
  }
}

You can also change this value at runtime using the new hardhat_setNextBlockBaseFeePerGas JSON-RPC method:

await network.provider.send("hardhat_setNextBlockBaseFeePerGas", ["0x77359400"])

Forking London-enabled networks

This release fixes an issue that prevented Hardhat Network from forking Ropsten, Goerli, Rinkeby, and any other network where London has already been activated.

You can now fork them, even if you are not running London locally.

Minimum gas price and the London Hardfork

Hardhat 2.4.0 introduced two ways of controlling the minimum gas price that transactions needed to pay. These are the minGasPrice Hardhat network config field and the hardhat_setMinGasPrice JSON-RPC method.

This functionality is disabled when using the London hardfork. Trying to set the config field or using the JSON-RPC method will result in an error.

Future release and default config values

Hardhat 2.6.0 will be released on August 4, 2021, when London activates on Mainnet. It will update Hardhat Network's default config values to better reflect Mainnet without any modification. This will make London the default hardfork but other default values might also change.

Don't miss a new hardhat release

NewReleases is sending notifications on new releases.