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:
Deploy and interact with your contracts using ethers.js and the hardhat-ethers plugin.
Test your contracts with Mocha, Chai and our own Hardhat Chai Matchers plugin.
Interact with Hardhat Network with our Hardhat Network Helpers.
Verify the source code of your contracts with the hardhat-etherscan plugin.
Get metrics on the gas used by your contracts with the hardhat-gas-reporter plugin.
@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:
All of hardhat-waffle’s matchers are supported
Great support for BigNumber and native bigint
No need to think about them anymore
Our matchers can compare any combination of
number
Native bigint
ethers.BigNumber
BN.js
Better revert matchers
New matchers for reverted transactions: .revertedWithPanic, .revertedWithCustomError, .revertedWithoutReason
.revertedWith matches the exact string, not a substring
Better matching of events
Fixed a bug where .to.emit("A").and.to.emit("B") was ignoring the first event completely
Better matching of event arguments
You can ignore some argument and only check the rest
You can write an arbitrary predicate for each argument
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps hardhat from 2.9.3 to 2.10.0.
Release notes
Sourced from hardhat's releases.
... (truncated)
Commits
c6c547b
Update package.jsonfd11202
Version Packagesbcd3225
Merge pull request #2905 from NomicFoundation/next-version5896e60
Bump network helpers to v1.0.2ced9c94
Bump network helpers to v1.0.15b29b0e
Add changeset714225d
Fix isValidAddress36786b5
Merge pull request #2903 from NomicFoundation/pato/hh-8868e8ee38
Update packages/hardhat-core/src/internal/cli/project-creation.tsba4a188
Update packages/hardhat-core/src/internal/cli/project-creation.tsDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)