github NomicFoundation/hardhat hardhat-core-v2.2.0
Hardhat v2.2.0: Berlin support

latest releases: hardhat@2.22.15, hardhat@2.22.14, hardhat@2.22.13...
3 years ago

Hardhat v2.2.0, which includes support for the new Berlin hard fork, has been released.

This version also includes some small fixes, most notably, it fixed some problems when downloading solc on MacOS.

Known issues

To workaround a recently discovered bug in @ethereumjs/vm, this release saves the EVM state in a non-standard way which can't produce valid state roots.

What this means in practice is that the state root in block headers is not valid. If your tests don't depend on it, they should work correctly.

Note that this same limitation is always present when forking from another network, so if you are using this feature, you can ignore this section.

As soon as this issue is fixed upstream, we'll publish a new version which will compute valid state roots again.

Default config changes

This version changes Hardhat Network's default config to match Mainnet's behavior:

  • The default hardfork is now "berlin".
  • The default blockGasLimit is now 12450000 (a reasonable value for Mainnet blocks at the time of the release).
  • The default gas matches the block gas limit value.

Complete list of changes

  • Add support for the Berlin hardfork (#1376 #1383 #1381 #1379)
  • Update Hardhat Network's default config to match Mainnet (#1387)
  • Make Hardhat Network's default gas match the block gas limit (#1390)
  • Fix the Solidity compiler downloader, which was failing on MacOS (#1392)
  • Fix our implementation of EIP-1898 so it matches Geth's (#1366)
  • Fix a bug in eth_estimateGas that was triggered when running it with an old block (#1366)
  • Make the params of eth_sendTransaction, eth_estimateGas, and eth_call match those of Geth. eth_estimateGas now ignores the nonce field. (#1366)
  • Upgrade to @ethereumjs/vm v5 (#1337 #1370 #1394)
  • Workaround an issue in @etheruemjs/vm's DefaultStateManager (#1406)

Don't miss a new hardhat release

NewReleases is sending notifications on new releases.