⬆ ️ deps(dev): Bump hardhat from 2.8.4 to 2.9.2
Bumps hardhat from 2.8.4 to 2.9.2.
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
-
4abe9ae
Version Packages -
f7de346
Merge pull request #2530 from NomicFoundation/pato/hh-449 -
27f7292
Update packages/hardhat-core/src/internal/util/hardforks.ts -
c8486d7
Merge pull request #2526 from marcobesier/patch-1 -
bc1ddca
Remove .only -
dd0dc16
Create silver-countries-care.md -
60b3f29
Improve the workaround -
e3bc91a
Workaround isActivatedEIP issue -
2a06389
[chore] Add missing test -
131ca7c
Fix link to console.log section - Additional commits viewable in compare view