Skip to content

️ deps(dev): Bump hardhat from 2.8.4 to 2.9.3

Yogi Bot requested to merge dependabot-npm_and_yarn-hardhat-2.9.3 into main

Bumps hardhat from 2.8.4 to 2.9.3.

Release notes

Sourced from hardhat's releases.

Hardhat v2.9.3

This release fixes a bug (#2551) that was causing the output of hh node to not work by default. It also adds a new entry to the HRE, hre.userConfig, which contains the original user config before it's resolved.

Hardhat v2.9.1: MetaMask-related hang fix

This patch version contains a fix to an issue that made Hardhat Network hang and eventually crash when connecting MetaMask to it (#2380)

Changelog

  • Fix a bug that made Hardhat Network hang when connecting MetaMask (#2380)

Hardhat v2.9.0: performance improvements

This release of Hardhat is packed with performance improvements:

  • Hardhat Network got a new RPC method that lets you mine large amounts of blocks instantly (hardhat_mine).
  • Tests can be run in parallel now thanks to a newer version of Mocha.
  • Forking mainnet and other remote networks is faster — We saw a 2x improvement in our tests!
  • Contracts are now compiled in parallel, decreasing compilation times.

Read on to learn more about these and other changes

Instantly mining multiple blocks with hardhat_mine

This release adds a heavily requested feature: the possibility of mining multiple blocks in constant time.

Hardhat has always let you mine a new block using the evm_mine RPC method. This is useful in several scenarios, but sometimes you want to mine a large number of blocks and the only way to do it is to call evm_mine that many times. For thousands of blocks, this can be prohibitively slow.

Starting from Hardhat v2.9.0, you can use the hardhat_mine instead, which instantly mines any number of blocks:

// mine 256 blocks
await hre.network.provider.send("hardhat_mine", ["0x100"]);

You can also pass a second, optional parameter to specify the interval in seconds between the timestamps of each block:

// mine 1000 blocks with an interval of 1 minute
await hre.network.provider.send("hardhat_mine", ["0x3e8", "0x3c"]);

You can rely on the first and last block of the sequence produced by hardhat_mine being valid blocks, but most of the rest may not technically be so. Specifically, they can have an invalid parent hash, the coinbase account will not have been credited with block rewards, and the baseFeePerGas will be incorrect.

Also note that blocks created via hardhat_mine may not trigger new-block events, such as filters created via eth_newBlockFilter and WebSocket subscriptions to new-block events.

Faster remote network forking

We’ve optimized how we query data from remote nodes when forking from them. This led to mainnet forking working significantly faster.

You don't need to do anything to benefit from this improvement.

... (truncated)

Commits

Merge request reports