-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dependency hardhat to v2.22.16 #229
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/hardhat-2.x
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
4 times, most recently
from
July 13, 2022 23:01
5d34ce2
to
4729a63
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.10.0
Update dependency hardhat to v2.10.1
Jul 13, 2022
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
5 times, most recently
from
July 18, 2022 21:16
67fd55b
to
969e6b5
Compare
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
4 times, most recently
from
August 1, 2022 18:57
e7b6b65
to
dd57107
Compare
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
3 times, most recently
from
August 8, 2022 11:00
0ac14dc
to
bd1dba1
Compare
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
5 times, most recently
from
August 15, 2022 23:56
93120da
to
5ceae1c
Compare
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
August 16, 2022 10:26
5ceae1c
to
1282921
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.10.1
Update dependency hardhat to v2.10.2
Aug 16, 2022
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
6 times, most recently
from
August 23, 2022 01:45
7352b4d
to
a08f613
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.1
Update dependency hardhat to v2.22.2
Mar 21, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
April 17, 2024 15:14
d104f64
to
2df11be
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.2
Update dependency hardhat to v2.22.3
Apr 17, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
May 14, 2024 22:46
2df11be
to
948bf3e
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.3
Update dependency hardhat to v2.22.4
May 14, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
June 3, 2024 13:24
948bf3e
to
b3830f9
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.4
Update dependency hardhat to v2.22.5
Jun 3, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
July 1, 2024 22:23
b3830f9
to
1edf195
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.5
Update dependency hardhat to v2.22.6
Jul 1, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
July 30, 2024 10:39
1edf195
to
f362ec2
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.6
Update dependency hardhat to v2.22.7
Jul 30, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
August 7, 2024 11:56
f362ec2
to
54e1752
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.7
Update dependency hardhat to v2.22.8
Aug 7, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
August 21, 2024 10:50
54e1752
to
bda96e4
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.8
Update dependency hardhat to v2.22.9
Aug 21, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
September 2, 2024 14:33
bda96e4
to
c6abf77
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.9
Update dependency hardhat to v2.22.10
Sep 2, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
September 19, 2024 19:58
c6abf77
to
2d30419
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.10
Update dependency hardhat to v2.22.11
Sep 19, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
September 24, 2024 16:42
2d30419
to
0239fda
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.11
Update dependency hardhat to v2.22.12
Sep 24, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
October 8, 2024 19:33
0239fda
to
e9fe013
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.12
Update dependency hardhat to v2.22.13
Oct 8, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
October 22, 2024 11:46
e9fe013
to
53099f5
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.13
Update dependency hardhat to v2.22.14
Oct 22, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
October 24, 2024 19:45
53099f5
to
3d166c5
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.14
Update dependency hardhat to v2.22.15
Oct 24, 2024
renovate
bot
force-pushed
the
renovate/hardhat-2.x
branch
from
November 18, 2024 14:31
3d166c5
to
3813d12
Compare
renovate
bot
changed the title
Update dependency hardhat to v2.22.15
Update dependency hardhat to v2.22.16
Nov 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.9.9
->2.22.16
Release Notes
nomiclabs/hardhat (hardhat)
v2.22.16
: Hardhat v2.22.16Compare Source
This is a small release to replace outdated dependencies.
Changes
fcece65
: Replacedchalk
withpicocolors
,glob
withtinyglob
, and upgradedfind-up
v2.22.15
: Hardhat v2.22.15Compare Source
This is a small bug fix release to fix custom HTTP headers when used in forked configurations.
Changes
ede1cde
: Fixed custom HTTP headers for forked configurationsv2.22.14
: Hardhat v2.22.14Compare Source
This is a small bug fix release to handle Ethereum nodes that are no longer returning total difficulty from the
eth.getBlock
RPC API.Changes
09ead48
: Fixed error when remote nodes are not returning total difficulty from theeth.getBlock
RPC API, by adding a fallback valuev2.22.13
: Hardhat v2.22.13Compare Source
This is a small bug fix release applying corrections to our Solidity tracing logic.
Changes
bf92f4c
: Fixed more bugs in the newly ported Solidity tracing logic3df95d3
: Remove support forconsole.log
selectors that wrongly use "(u)int" type aliases in the selector calculation4c1bcfc
: Fixed minor bugs in the newly ported Solidity tracing logicv2.22.12
: Hardhat v2.22.12Compare Source
This release includes a refactor to our internal solidity tracing logic that should result in a ~10% performance improvement for many workloads.
v2.22.11
: Hardhat v2.22.11Compare Source
This release adds support for the latest solc versions (0.8.25, 0.8.26, and 0.8.27). Additionally, it includes bug fixes, documentation improvements, and dependency updates.
Changes
601d543
: Fixed a problem with provider events whenprovider.init
was explicitly called before the first request.224159e
: Added support for solc versions 0.8.25, 0.8.26, and 0.8.27b43ed78
: Added link to Ignition docs in sample projects07e0a9c
: Hardhat node can now handle large response objects by streaming them.12d1980
: Upgrade chokidarv2.22.10
: Hardhat v2.22.10Compare Source
This is a small bug fix release to improve
debug
logs during Hardhat Network initialization.Changes
409e99f
: Fixeddebug
logs in Hardhat Network initialization process.46cd7a1
: Removed the experimentalAddHardhatNetworkMessageTraceHook APIv2.22.9
: Hardhat v2.22.9Compare Source
This is a small bug fix release remove a warning message against the local Hardhat node when deploying with Hardhat Ignition.
Changes
6771f00
: Do not sendhttp_setLedgerOutputEnabled
messages beyond the HTTP Provider to prevent unwanted warnings in the logs of the local hardhat nodev2.22.8
: Hardhat v2.22.8Compare Source
This is a small bug fix release to resolve a bug with large responses from
debug_traceTransaction
.Changes
f5d5d15
: Fixed an issue withdebug_traceTransaction
when large responses were generated31d9d77
: Upgraded EDR to v0.5.2v2.22.7
: Hardhat v2.22.7Compare Source
This releases add support for RIP-7212 (Precompile for secp256r1 Curve Support). See the Hardhat network reference for details on how to enable the precompile.
Changes
f944cd5
: Added anenableRip7212
optional flag to the Hardhat Network config that enables RIP-7212 (Precompile for secp256r1 Curve Support).f6ddc92
: Adddebug
logs to Hardhat Network initialization process.6c943bb
: Fix message for error HH206, thanks @ItsNickBarry!f944cd5
: Bumped EDR to v0.5.0.v2.22.6
: Hardhat v2.22.6Compare Source
Changes
cdf0160
: Upgrade bundled solcjs3c66da2
: Add support for Node v229fadc22
: Bump EDR to v0.4.1.095faa4
: Added hardfork histories for Optimim and Arbitrum chainsv2.22.5
: Hardhat v2.22.5Compare Source
This release re-enables support for
hardhat-tracer
and adds limited support for blob transactions, along with performance improvements and bug fixes.Changelog
f65dc7c
: Improved the validation of network and forking URLs (thanks @kshyun28!)5d46baa
: Internal changes to allowhardhat-tracer
to be re-enabled with Hardhat after the EDR upgrade6e36f3f
: Bump EDR to v0.4.0. This adds support foreth_maxPriorityFeePerGas
, limited support for blob transactions, improves performance and fixes some bugs. Check out the v0.4.0 EDR release and v0.3.8 EDR release for more details.v2.22.4
: Hardhat v2.22.4Compare Source
This release includes bug fixes, performance enhancements, and an improvement to the task system to support BigInt arguments.
Changelog
22bcbf5
: Added BigInt task argument type.2c533f0
: Bumped EDR dependency to 0.3.7.3203639
: Fixed an issue in the solidity source map decoding module.5d7a604
: Fixed an issue with solc version selection.3c6de8f
: Now solcjs is run in a subprocess, which leads to better error reporting and allows it to run multiple compilation jobs at the same time.6447e80
: Improved performance by reducing back-and-forth with EDR when it's not necessary.v2.22.3
Compare Source
A small bug fix release that improves the error messaging around failed installs of EDR (Hardhat network).
Changelog
6466e3a
: A proper error is now thrown when requiring EDR failsae62841
: Upgrade EDR to version 0.3.5679d8a5
: Report HH18 to Sentry.v2.22.2
: Hardhat v2.22.2Compare Source
This release introduces a small change to the initialization process of Hardhat, which makes the task runner more extensible.
Changelog
7876104
: Initialize the Hardhat Runtime Environment before passing the command line arguments. Thanks @theethernaut!v2.22.1
: Hardhat v2.22.1Compare Source
This release updates the starter projects available through
hardhat init
to include Hardhat Ignition as the default deployment system.v2.22.0
: Hardhat v2.22.0Compare Source
This release sets Cancun as the default hardfork used by the Hardhat Network.
v2.21.0
: Hardhat v2.21.0 — Introducing EDRCompare Source
This version of Hardhat marks the debut of EDR (Ethereum Development Runtime), our new Rust-based runtime that is a complete rewrite of the original TypeScript-based Hardhat Network. This release lays a new long-term foundation for Hardhat's evolution over the coming year.
There are no functional changes, but there are some performance improvements across the board, which we’ll continue to expand in future updates.
Given the significance of this internal change, there’s a possibility of bugs. If you encounter any problems specific to this version, please report them by opening an issue. You should be able to downgrade to v2.20.1 without losing functionality if needed.
solidity-coverage out-of-memory issues
The
solidity-coverage
plugin works by heavily instrumenting the code, which sometimes causes OOM (out-of-memory) issues. This new version of Hardhat can, in certain cases, make those problems more likely.If you run into this, you can fix it by using Node.js’s
--max-old-space-size
flag:NODE_OPTIONS="--max-old-space-size=8192" npx hardhat coverage
Dropping support for Node.js v16
As part of this release, we are dropping support for Node.js v16. This version of Node.js reached its end-of-life in September of last year. You can learn more about our support guarantees here.
v2.20.1
: Hardhat v2.20.1Compare Source
This release fixes a bug when
hardhat_setStorageAt
was used in untouched addresses.v2.20.0
: Hardhat v2.20.0 — CancunCompare Source
This release adds support for the upcoming
cancun
hardfork. This hardfork is not enabled by default; if you want to use it, then you have to enable it in your Hardhat config:Keep in mind that blob transactions are not supported yet. If you need this, please upvote or comment on this issue.
In addition, this release adds support for solc 0.8.24.
v2.19.5
: Hardhat v2.19.5Compare Source
This release includes the following changes:
v2.19.4
: Hardhat v2.19.4Compare Source
This release changes our telemetry to anonymously report the consent response.
v2.19.3
: Hardhat v2.19.3Compare Source
This release adds support for solc 0.8.23. It also includes a temporary informative message about the ongoing 2023 Solidity Survey.
v2.19.2
: Hardhat v2.19.2Compare Source
This release adds experimental support for ESM in typescript projects.
In addition to that, the
hardhat-shorthand
tool (hh) now supports scoped tasks.v2.19.1
: Hardhat v2.19.1Compare Source
This release fixes a couple of issues:
maxPriorityFeePerGas
of 0, which were then rejected by the node.Besides that, the project initialization now uses the latest version of the Hardhat Toolboxes.
v2.19.0
: Hardhat v2.19.0Compare Source
This new version of Hardhat introduces a new feature: Configuration Variables!
Configuration variables let you use values in a configuration file without making them part of your project. They work as a replacement for environment variables and dotenv, but are more flexible and powerful. Read our guide to learn more.
This version also adds support for solc v0.8.22.
v2.18.3
: Hardhat v2.18.3Compare Source
This release adds
ignition deploy
to our telemetry-reported tasks.v2.18.2
: Hardhat v2.18.2Compare Source
This releases fixes a problem with Hardhat's compiler download caused by a fix in the latest version of undici.
v2.18.1
: Hardhat v2.18.1Compare Source
This new version of Hardhat includes a new option when initializing a project: you can now start a project that uses Viem instead of ethers. To learn more about this, check our announcement.
This version also makes a small change to the logs shown during compilation: now the targeted EVM version (or versions) is shown.
v2.18.0
: Hardhat v2.18.0Compare Source
This version of Hardhat adds support for scoped tasks.
You can now create scopes to group multiple tasks that are related in some way:
Thanks to @zemse, who kickstarted the work on this!
v2.17.4
: Hardhat v2.17.4Compare Source
This version of Hardhat adds support for the
debug_traceCall
method.Besides that, Hardhat projects are now initialized with
npx hardhat init
instead ofnpx hardhat
. The latter command still works but it will produce a warning. See https://github.com/NomicFoundation/hardhat/issues/2594 for the rationale behind this change.v2.17.3
: Hardhat v2.17.3Compare Source
This version of Hardhat changes the default
evmVersion
toparis
for solc versions newer than or equal to 0.8.20.Starting from version 0.8.20, solc changed the default target EVM version to Shanghai. Among other things, this meant that the generated bytecode could (and most likely would) contain the new
PUSH0
opcode.Up until this point, Hardhat always delegated to solc the decision of which EVM version to target. But there are two things that are different today: many users develop for non-mainnet chains, and not every chain has adopted the Shanghai hardfork yet. This means it's possible that you develop a contract which works locally (Hardhat's default hardfork is still Shanghai, because we follow the current mainnet hardfork) but that then doesn't work after deploying it.
If you are sure you are going to deploy in a network that supports the Shanghai hardfork, you can change the target EVM like this:
v2.17.2
: Hardhat v2.17.2Compare Source
This release includes several fixes and some new features:
eth_call
RPC methodenableTransientStorage
option to enable EIP-1153 opcodesTASK_COMPILE_TRANSFORM_IMPORT_NAME
subtask, added a newTASK_COMPILE_GET_REMAPPINGS
subtask, and added support for remappings in the resolver.debug_traceTransaction
to return traces where the memory had a lot of empty wordsartifactExists
would throw an error for missing artifactsv2.17.1
: Hardhat v2.17.1Compare Source
This release adds support for solc v0.8.21, allows using
console.log
in pure functions and improves the output of the flatten task (see https://github.com/NomicFoundation/hardhat/issues/1499).Besides that, this version:
abort-controller
) because it's no longer needed in the versions of node.js supported by Hardhat (thanks @orlandoortegajr!)Retry-After
header (thanks @kowalski!)debug_traceTransaction
method is called with a tracer parameter that is not supported.v2.17.0
: Hardhat v2.17.0Compare Source
This new minor version of Hardhat drops support for Node.js v14 and adds support for Node v20. To learn about which versions of Node we support, check our Stability guarantees page.
This version also adds support for solc 0.8.19 and 0.8.20 and fixes two bugs:
v2.16.1
: Hardhat v2.16.1Compare Source
This release fixes an issue in the compiler download that happens when Hardhat is used with node v18.16.x (the latest versions of node v18).
v2.16.0
: Hardhat v2.16.0 - Extendable providersCompare Source
This version of Hardhat adds a new extensibility point: you can now wrap Hardhat's network provider with your own logic.
This is done by using the new
extendProvider
configuration function:Doing this means that all the JSON-RPC calls will go through your custom provider wrapper. You can use this to intercept and handle some requests while forwarding the rest to the original provider.
To learn more about this, read the "Extending the Hardhat provider" section in our docs. If you have questions about how to use this, please open a new discussion.
Other changes
Besides this new feature, this version includes the following changes:
console.sol
is now memory-safe (thanks @ZumZoom!)true
to prevent Hardhat from showing the telemetry consent promptv2.15.0
: Hardhat v2.15.0Compare Source
This new version of Hardhat uses the new ethers v6 based Toolbox when initializing a project. Check the release notes of the Toolbox to learn more.
v2.14.1
: Hardhat v2.14.1Compare Source
This release adds better information to Hardhat about which block numbers correspond to which hardforks. Most users won't be affected by this, but it fixes some issues for certain edge cases.
v2.14.0
: Hardhat v2.14.0 — ShanghaiCompare Source
This release sets Shanghai as the default hardfork used by the Hardhat Network.
If for some reason you want to keep using the previous hardfork, set it explicitly in your config:
v2.13.1
: Hardhat v2.13.1Compare Source
This release adds support for the upcoming Shanghai hardfork. This hardfork is not enabled by default; if you want to use it, then you have to enable it in your Hardhat config:
Besides that, this version fixes a problem when importing scoped packages in a Yarn Berry monorepo that uses PnP (thanks @zouguangxian!)
v2.13.0
: Hardhat v2.13.0 — ES Modules and compiling with viaIRCompare Source
This new version of Hardhat adds two long-awaited features: ES Modules support, and better support for solc’s IR-based compilation pipeline. Besides that, this version includes several other improvements and bug fixes.
Remember to give this repo a star ⭐ if you are enjoying Hardhat!
ES Modules support
Hardhat was designed with CommonJS in mind, but in the last years adoption of ES Modules (ESM) has been growing. This version includes better support for it. You can now write scripts and tests as ESM, but your Hardhat config —and anything imported from it— still needs to use CommonJS.
ES modules let you use
import
/export
and top-level await. This means that instead of writing a script like this:you can now write a less verbose ESM script:
Check our guide about Using ES modules with Hardhat to learn more.
Huge thanks to @phated, who started the work on this and helped us along the way.
IR-based compilation pipeline
The
solc
compiler has a newer, alternative way of generating bytecode through an intermediate representation (IR). Previous versions of Hardhat don’t work well with this compilation mode, especially when the optimizer is fully-enabled.This release adds better support for the IR compilation pipeline, but you might still get some issues if you use the default settings. We recommend enabling the minimal necessary optimization steps when compiling with IR:
You can learn more about Hardhat and IR here.
Other improvements
In addition to ES Modules and compiling with the IR-based pipeline, this version includes these improvements and bug fixes:
resolveJsonModule
compiler option is now enabled by default in the sample tsconfig (thanks @mlshv!)v2.12.7
Compare Source
Changes
e443b36
: Added an option in Hardhat Network to allow mining blocks with the same timestampc23a1ca
: Added support for thehttp_proxy
environment variable. When this variable is set, Hardhat will send its requests through the given proxy for things like JSON-RPC requests, mainnet forking and downloading compilers.We also removed support for the
HTTP_PROXY
andHTTPS_PROXY
environment variables, sincehttp_proxy
is the most commonly used environment variable for this kind of thing. Those variables could only be used for downloading compilers.Finally, we also added support for
no_proxy
, which accepts a comma separated list of hosts or"*"
. Any host included in this list will not be proxied.Note that requests to
"localhost"
or"127.0.0.1"
are never proxied.6954665
: Added support for sending batch requests through WebSocket to the Hardhat node (thanks @tenbits!)6bf1673
: Added a config validation for the number of optimizer runs used (thanks @konarshankar07!)v2.12.6
: Hardhat v2.12.6Compare Source
Features
version
field to the Hardhat Runtime Environment (thanks @konarshankar07!)Bug fixes
Other changes
flatten
taskmocha
and@types/mocha
used by Hardhatcompile
task that will be used by thehardhat-foundry
plugin.v2.12.5
: Hardhat v2.12.5Compare Source
gasPrice
was set to"auto"
, which is the default configuration when connecting to a JSON-RPC network. This bug was preventing the results frometh_feeHistory
from being used when they should.v2.12.4
: Hardhat v2.12.4Compare Source
This release fixes a small issue that was affecting our VSCode extension in some edge cases.
It also includes a non-intrusive message promoting this year's Solidity Developer Survey.
v2.12.3
: Hardhat v2.12.3Compare Source
hardhat_metadata
RPC methodbloom
field (thanks @InoMurko!)getBuildInfoSync
function to thehre.artifacts
object (thanks @emretepedev!)debug_traceTransaction
was used with an OOG transaction sent to a precompilev2.12.2
: Hardhat v2.12.2Compare Source
v2.12.1
: Hardhat v2.12.1Compare Source
Fixed a problem that was preventing Hardhat from being used in Alpine Linux.
v2.12.0
: Hardhat v2.12.0Compare Source
This new minor version sets the
merge
hardfork as the default hardfork used by the Hardhat Network. Most users shouldn't be affected by this change.Besides that, this version fixes a couple of issues related to our compilation pipeline.
v2.11.2
: Hardhat v2.11.2Compare Source
This new version of Hardhat brings several fixes and improvements:
eth_getStorageAt
being too restrictive (thanks @aathan!)v2.11.1
: Hardhat v2.11.1Compare Source
This release fixes a couple of bugs in v2.11.0:
v2.11.0
: Hardhat v2.11.0 — The Merge support and fast compilationCompare Source
We are excited to release this new version of Hardhat, as it makes Hardhat Network compatible with The Merge and makes our compilation much faster. Read on to learn more about these and other improvements.
Support for The Merge
Hardhat Network now has support for The Merge. To try it out, use the new
merge
hardfork setting. This hardfork is not selected by default, but you can enable it in your config:Selecting this new hardfork will introduce a few changes to how Hardhat Network runs, but your contracts should still work without any modification. The rest of this section explains what these changes are.
The
DIFFICULTY
opcode (now renamed toPREVRANDAO
) will return a pseudo-random value. This value is also exposed in the block header asmixHash
.You can use the new
hardhat_setPrevRandao
RPC method to modify the value returned byDIFFICULTY
/PREVRANDAO
in the next block. We recommend using thesetPrevRandao
network helper for this.Hardhat Network’s JSON-RPC now accepts the new
safe
andfinalized
block tags, which in Hardhat Network are just aliases for thelatest
block tag, and correspond to the latest block.Faster compilation
We optimized Hardhat’s compilation pipeline, significantly reducing the overhead it adds on top of
solc
. Compilation takes 40% less in most workflows, with a few taking 90% less!How much of an impact this has depends on the size of your project, setup, and workflow, so we’ll explore two examples here, running the same benchmarks on each.
We’ll focus on a few different workflows:
Open Zeppelin Contracts
This project is an example of a large codebase with a JavaScript setup. We expect most JavaScript projects to see similar or better results.
Uniswap v3-core
This project is an example of a mid-size codebase with TypeScript and TypeChain. The benchmarks include both compilation and TypeChain types generation.
Due to the TypeScript changes described later in this document, we expect these results to be even better than those of Open Zeppelin Contracts. We believe these results will be what most Hardhat users will perceive when upgrading to this new version.
Before running the benchmarks, we replaced the deprecated
typechain-hardhat
plugin with TypeChain’s official plugin. If you are still running the old one, upgrading will lead to better compilation times.These benchmarks were run on an M1 Macbook Pro.
How to get the performance improvements
All you need to do to benefit from these performance improvements is to upgrade Hardhat and its plugins.
TypeScript type-checking is now opt-in
Until this version, if you used TypesScript, Hardhat type-checked your entire codebase every time it was run. While this could be useful to discover type errors quickly, it also meant that Hardhat users were waiting for the TypeScript compiler to run every time, making every Hardhat workflow slower.
Starting with Hardhat v2.11.0 we don’t type check your codebase unless you explicitly ask for it using the new
--typecheck
flag. This means that, by default, every task will run faster. You won’t get typing errors from Hardhat, but you should still get them in your editor.Additionally, running without type-checking means using types from TypeChain in your config and tasks without any problem. If they haven’t been generated yet, Hardhat would still run, generating them after compiling.
We recommend using
--typecheck
in your CI or a similar workflow to ensure that your code is correct.A new
--flamegraph
flag was added to profile Hardhat projectsFlamegraphs are a visualization of hierarchical data created to visualize stack traces of profiled software. While the Node.js ecosystem has excellent tools to create them, they aren’t really useful to profile Hardhat, as they lose track of asynchronous execution, which Hardhat uses extensively.
You can now run Hardhat’s CLI with a
--flamegraph
flag, which will profile the tasks’ execution and construct a flame graph of the stack of Hardhat tasks that were run. Instead of showing the JavaScript functions implementing Hardhat, this flame graph will only show tasks. This leads to a simpler-to-understand graph that can be used to optimize Hardhat, its plugins, and advanced projects overriding tasks.Artifact paths cache
Hardhat now caches the paths to the artifacts it reads within the same process. This leads to tests taking less time to get started, which can be significant in larger projects like OpenZeppelin Contracts.
If you’re the author of a plugin and were depending on the artifact paths not being cached, please look at our updated
Artifacts
interface, which allows you to disable this behavior.v2.10.2
: Hardhat v2.10.2Compare Source
This version adds support for Solidity versions up through 0.8.16. Besides that:
console.log()
prints an empty line instead of printingundefined
.v2.10.1
: Hardhat v2.10.1Compare Source
This version improves how propagated Solidity errors are processed by Hardhat (issue #2546).
v2.10.0
: Hardhat 2.10.0: A refreshed experienceCompare Source
Hardhat 2.10.0 is out, and it marks a change in the product direction that Hardhat has historically taken.
Hardhat’s core values have always been optionality, flexibility and extensibility, enabling it to be used in whatever ways were needed and found to be useful. However, as we described in this thread, the Ethereum and Hardhat development ecosystems grew too large for easy navigation among the many different paths and viable options.
While retaining those core values, Hardhat 2.10.0 now offers a complete and opinionated setup that is ready to start building Ethereum software out-of-the-box. No decisions on plugins, libraries, or dependencies. Just get going.
We’re calling this the Hardhat Toolbox, which is a bundle of plugins and functionality that the Nomic Foundation team considers to be the best way to get started with a new Ethereum project. Read on to learn more about it.
Hardhat Toolbox
You can get our recommended setup by installing the
@nomicfoundation/hardhat-toolbox
plugin.When you use this plugin, you'll be able to:
hardhat-ethers
plugin.You can learn how to migrate to it here.
Hardhat Chai Matchers
@nomicfoundation/hardhat-chai-matchers
is a drop-in replacement of@nomiclabs/hardhat-waffle
that integrates more tightly with Hardhat, adds new functionality and improves its error messages. We recommend migrating to it.Since the very beginning, we’ve recommended that people use Waffle, via hardhat-waffle, and we thank the team at TrueFi for their great work. However, for such a core component of the setup, there were too many recurring issues related to not being integrated deeply enough with Hardhat. For this reason, we decided to fork Waffle and release our own Chai matchers.
Some of its functionality and improvements:
bigint
number
bigint
ethers.BigNumber
BN.js
.revertedWithPanic
,.revertedWithCustomError
,.revertedWithoutReason
.revertedWith
matches the exact string, not a substring.to.emit("A").and.to.emit("B")
was ignoring the first event completelyYou can learn more about it here.
Hardhat Network Helpers
@nomicfoundation/hardhat-network-helpers
is a library that provides a set of utility functions to interact with the Hardhat Network. When using this library you don’t have to deal with low-level JSON-RPC calls. No more encoding parameters in hexadecimal nor hard to understand Hardhat Network errors.It includes utilities for time manipulation, modify contracts and accounts, manipulate the mempool, reuse common testing setups using fixtures, and more.
Using the helpers is as simple as this:
You can learn more about it here.
@nomiclabs/hardhat-ethers
Our
@nomiclabs/hardhat-ethers
has a new helper that makes impersonating accounts easier. Now you can do:Other Hardhat changes
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.