⬆ ️ deps(dev): Bump hardhat from 2.8.4 to 2.9.1
Bumps hardhat from 2.8.4 to 2.9.1.
Release notes
Sourced from hardhat's releases.
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 callevm_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 thebaseFeePerGas
will be incorrect.Also note that blocks created via
hardhat_mine
may not trigger new-block events, such as filters created viaeth_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.
Running tests in parallel
The
test
task now supports three new options:--parallel
,--bail
and--grep
.
... (truncated)
Commits
-
48df7d3
Version Packages -
50cd354
Merge pull request #2456 from NomicFoundation/eth_feeHistory-fix -
a9f7ca6
Small fix in jsonrpc client -
03122aa
Fix unrelated linter error -
69a6434
Add changeset -
fd416dd
Temporary fix to #2380 -
4e35c92
Bump hardhat-etherscan version -
fe51dad
Merge branch 'release-preparation' -
3940009
Merge pull request #2440 from krruzic/master -
e09af74
Merge pull request #2444 from NomicFoundation/fix/2437 - Additional commits viewable in compare view