Skip to content

update hardhat-web3 web3 version to 4.x #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

Open
wants to merge 124 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
585eae5
Add Infura Sepolia Faucet #3906
anataliocs May 8, 2023
c6dd8d5
Update docs/src/content/tutorial/deploying-to-a-live-network.md
anataliocs May 8, 2023
90c2f5d
Add new line
anataliocs May 8, 2023
e9c0511
update hardhat-web3 web3 version to 4.x
mpetrunic May 9, 2023
aa900fa
Use alchemy instead of infura in fork tests
fvictorio May 10, 2023
843f788
Fix alchemy url for sepolia
fvictorio May 10, 2023
9ea82c0
Merge pull request #3912 from NomicFoundation/use-alchemy
fvictorio May 10, 2023
1455459
Use node 18.15 in CI
fvictorio May 11, 2023
4106862
Merge pull request #3920 from NomicFoundation/use-node-18-15-in-ci
fvictorio May 11, 2023
ad5d50b
Check that all supported hardforks have a history entry
fvictorio May 12, 2023
a5b0033
Add support for ethers v6
fvictorio May 12, 2023
e994986
Create silly-ghosts-sing.md
fvictorio May 15, 2023
515f305
Merge pull request #3923 from NomicFoundation/check-all-hardforks-his…
fvictorio May 15, 2023
a424039
Merge pull request #3907 from anataliocs/Add-Infura-Sepolia-Faucet-li…
fvictorio May 15, 2023
10e9c72
Rename CustomEthers* to HardhatEthers*
fvictorio May 19, 2023
952dc0e
Rename to @nomicfoundation/hardhat-ethers
fvictorio May 19, 2023
084029f
Respect gas config for all networks
fvictorio May 19, 2023
f0b8a72
gelato w3f plugin
donoso-eth May 20, 2023
a28d5c2
Test hh-ethers with hh node instead of ganache
fvictorio May 22, 2023
fa839f8
prettier
donoso-eth May 23, 2023
6179a32
Merge pull request #3946 from donoso-eth/gelato-plugin
fvictorio May 23, 2023
e87000c
link
donoso-eth May 23, 2023
b087d0f
Respect gas value in hardhat config
fvictorio May 24, 2023
55a6a1c
Merge pull request #3952 from donoso-eth/gelato-plugin
fvictorio May 24, 2023
cb33dac
Add tests for gas price behavior
fvictorio May 25, 2023
008e95e
Use ethers.Contract instead of ethers.BaseContract
fvictorio May 30, 2023
e920f51
Revert chai matchers version change
fvictorio May 30, 2023
b088bbb
Use explicit versions for ethers and hh-chai-matchers
fvictorio May 30, 2023
523235b
Create yellow-suits-fail.md
fvictorio May 30, 2023
3c916ea
Update ethers devDep in core
fvictorio May 30, 2023
dcb9677
Use aliased ethers for v5
fvictorio May 30, 2023
16ea02d
Fix yarn.lock
fvictorio May 30, 2023
a75de2d
Use new hh-ethers in hh-verify
fvictorio May 30, 2023
a62dbfd
Create common with proper hardfork before manipulating the block
fvictorio May 30, 2023
af686fc
Merge pull request #3924 from NomicFoundation/hardhat-ethers-v6
fvictorio May 30, 2023
a367502
Version Packages
github-actions[bot] May 30, 2023
9cd9211
Don't modify the toolbox
fvictorio May 30, 2023
fb3fe0e
Update yarn.lock after publishing
fvictorio May 31, 2023
8626c87
Use more future-proof type imports from ethers
fvictorio May 31, 2023
3ae4a78
Merge pull request #3970 from NomicFoundation/use-better-ethers-import
fvictorio Jun 1, 2023
61feb2c
Update LICENSE
freiremanuel91 Jun 5, 2023
b3d916e
Update LICENSE
freiremanuel91 Jun 5, 2023
7f7114f
Update LICENSE
freiremanuel91 Jun 5, 2023
f1272b3
Update LICENSE
freiremanuel91 Jun 5, 2023
75b1b43
Update LICENSE
freiremanuel91 Jun 5, 2023
aedd460
Update LICENSE
freiremanuel91 Jun 5, 2023
8bf0f10
Update LICENSE
freiremanuel91 Jun 5, 2023
09e71b2
Update LICENSE
freiremanuel91 Jun 5, 2023
2a25743
Update LICENSE
freiremanuel91 Jun 5, 2023
aaf6dce
Update LICENSE
freiremanuel91 Jun 5, 2023
b7b8855
Update LICENSE
freiremanuel91 Jun 5, 2023
56c4a3d
Update LICENSE
freiremanuel91 Jun 5, 2023
32e2935
Update LICENSE
freiremanuel91 Jun 5, 2023
c139831
Update LICENSE
freiremanuel91 Jun 5, 2023
a449527
Merge pull request #3982 from freiremanuel91/patch-6
fvictorio Jun 5, 2023
2002265
Merge pull request #3983 from freiremanuel91/patch-5
fvictorio Jun 5, 2023
5446707
Merge pull request #3984 from freiremanuel91/patch-7
fvictorio Jun 5, 2023
62cb77e
Merge pull request #3985 from freiremanuel91/patch-8
fvictorio Jun 5, 2023
dd5291d
Merge pull request #3986 from freiremanuel91/patch-9
fvictorio Jun 5, 2023
3a64624
Merge pull request #3987 from freiremanuel91/patch-10
fvictorio Jun 5, 2023
aa51b56
Merge pull request #3988 from freiremanuel91/patch-11
fvictorio Jun 5, 2023
9b3fb69
Merge pull request #3990 from freiremanuel91/patch-13
fvictorio Jun 5, 2023
732060c
Merge pull request #3991 from freiremanuel91/patch-14
fvictorio Jun 5, 2023
e6d73a3
Merge pull request #3989 from freiremanuel91/patch-12
fvictorio Jun 5, 2023
e8909a7
Merge pull request #3992 from freiremanuel91/patch-15
fvictorio Jun 5, 2023
7538833
Merge pull request #3993 from freiremanuel91/patch-16
fvictorio Jun 5, 2023
990cbc0
Merge pull request #3994 from freiremanuel91/patch-17
fvictorio Jun 5, 2023
22d51b4
Merge pull request #3995 from freiremanuel91/patch-18
fvictorio Jun 5, 2023
af7ace9
Rename error class & avoid compiling
schaable Jun 6, 2023
40b371b
Add changeset
fvictorio Jun 6, 2023
c16d405
Remove duplicated error
schaable Jun 6, 2023
e8a5d15
fix aurora browser urls
ZumZoom Jun 7, 2023
1fe175f
Update toolbox to use new plugins
fvictorio May 31, 2023
ce4eddc
Use ethers@^6.4.0 in Toolbox
fvictorio May 31, 2023
290b16a
Use correct (tentative, future) version of @typechain/ethers-v6
fvictorio May 31, 2023
726be05
Adapt project initialization to new Toolbox version
fvictorio May 31, 2023
d8056fb
Accept overrides in ethers.deployContract
fvictorio Jun 2, 2023
cbcfb87
Fix typo in sample project
fvictorio Jun 6, 2023
8acc707
Upgrade toolbox dependencies
fvictorio Jun 6, 2023
0902a6a
Update tutorial to use latest toolbox
fvictorio Jun 6, 2023
ec6acb4
Update docs to use ethers v6 and ethers.deployContract
fvictorio Jun 6, 2023
c69540f
Use proper deps versions and fix some links to ethers docs
fvictorio Jun 6, 2023
236c8a2
Update ethers docs URLs
fvictorio Jun 6, 2023
f9382fe
Remove unnecessary dependency in chai matchers
fvictorio Jun 6, 2023
26f240e
Remove commented out code in vendored utils
fvictorio Jun 6, 2023
168e937
Remove remaining BigNumber mentions/usages
fvictorio Jun 6, 2023
cbbd0bd
Undo package.json version change
fvictorio Jun 6, 2023
70c2ccf
Create wet-keys-press.md
fvictorio Jun 6, 2023
399347f
Create twelve-adults-doubt.md
fvictorio Jun 6, 2023
99995d5
Create unlucky-books-love.md
fvictorio Jun 6, 2023
a9c159f
Create nervous-bees-hunt.md
fvictorio Jun 6, 2023
aaf2c92
Fix @typechain/ethers-v6 version in project initialization
fvictorio Jun 6, 2023
7775b5d
Use dual tsconfig in toolbox
fvictorio Jun 7, 2023
e584f6a
Re-export network helpers in toolbox
fvictorio Jun 7, 2023
9d900ce
Use toolbox/network-helpers in docs
fvictorio Jun 7, 2023
64b0fc5
Fix mentions to hh-etherscan
fvictorio Jun 7, 2023
5432aa3
Add explanation about network helpers in the toolbox
fvictorio Jun 7, 2023
9e2554e
Add basic tests for deployContract overrides
fvictorio Jun 7, 2023
1409b0a
Improve implementation of deployContract overrides
fvictorio Jun 7, 2023
1b5e1cf
Fix linter in toolbox
fvictorio Jun 7, 2023
b6b8e98
Run prettier
fvictorio Jun 7, 2023
94b2fd1
Improve changesets descriptions
fvictorio Jun 7, 2023
61727ca
Merge pull request #3996 from NomicFoundation/issue#3969
schaable Jun 7, 2023
adc684d
Merge branch 'toolbox-ethers-v6'
fvictorio Jun 7, 2023
3a1846e
Version Packages
github-actions[bot] Jun 7, 2023
f0aa3c3
Don't bump plugins dependencies on hardhat
fvictorio Jun 7, 2023
83f23a1
Fix import in esm sample project
fvictorio Jun 7, 2023
0039b3b
Pin `web3` version in installation guide of `hardhat-truffle5`
pcaversaccio Jun 8, 2023
b466e49
Pin `web3` version in installation guide of `hardhat-web3`
pcaversaccio Jun 8, 2023
3421439
Use pinned web3 version in installation instructions
fvictorio Jun 8, 2023
a6424ea
Merge pull request #4005 from pcaversaccio/patch-1
fvictorio Jun 8, 2023
8726d0b
Fix waitForDeployment in non-automined networks
fvictorio Jun 8, 2023
eb1ae06
Create fluffy-walls-sip.md
fvictorio Jun 8, 2023
a250555
Merge pull request #4007 from NomicFoundation/fix-wait-for-deployment
fvictorio Jun 8, 2023
eaab9ea
Run pre-release tests in changesets branch
fvictorio Jun 8, 2023
55a15bf
Version Packages
github-actions[bot] Jun 8, 2023
4159589
Adapt existing changeset
fvictorio Jun 9, 2023
66eed36
Merge pull request #3999 from ZumZoom/patch-1
fvictorio Jun 9, 2023
5071ed1
Re-add pre-release-testing-branch to workflow
fvictorio Jun 9, 2023
f56ecab
This removes an useless array
anajuliabit Jun 9, 2023
735671e
Merge pull request #4011 from anajuliabit/main
fvictorio Jun 9, 2023
06d766e
update web3 version
mpetrunic Jun 12, 2023
8e805ff
Merge remote-tracking branch 'origin/main' into update-web3
mpetrunic Jun 12, 2023
d469cef
add changeset
mpetrunic Jun 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/lazy-hornets-clap.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/neat-impalas-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nomiclabs/hardhat-web3": major
---

Updates web3 to latest 4.x version.
4 changes: 2 additions & 2 deletions .changeset/polite-mugs-cry.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@nomiclabs/hardhat-etherscan": patch
"@nomiclabs/hardhat-verify": patch
---

Fix URLs for the Aurora networks (thanks @zZoMROT!)
Fix URLs for the Aurora networks (thanks @zZoMROT and @ZumZoom!)
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-chai-matchers-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-core-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-ethers-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-foundry-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-network-helpers-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-network-tracing-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-shorthand-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-solhint-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-solpp-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/hardhat-toolbox-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- "packages/hardhat-chai-matchers/**"
- "packages/hardhat-network-helpers/**"
- "packages/hardhat-ethers/**"
- "packages/hardhat-etherscan/**"
- "packages/hardhat-verify/**"
- "packages/hardhat-common/**"
- "config/**"
pull_request:
Expand All @@ -21,7 +21,7 @@ on:
- "packages/hardhat-chai-matchers/**"
- "packages/hardhat-network-helpers/**"
- "packages/hardhat-ethers/**"
- "packages/hardhat-etherscan/**"
- "packages/hardhat-verify/**"
- "packages/hardhat-common/**"
- "config/**"

Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-truffle4-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-truffle5-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-verify-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-vyper-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-web3-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardhat-web3-legacy-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
node: [14, 16, 18.15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Pre-release tests

on:
push:
branches: [pre-release-testing-branch]
branches:
- pre-release-testing-branch
- changeset-release/main
workflow_dispatch:

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-recent-mainnet-block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: yarn build
- name: Run test
env:
INFURA_URL: ${{ secrets.INFURA_URL }}
ALCHEMY_URL: ${{ secrets.ALCHEMY_URL }}
run: yarn ts-node scripts/test-recent-mainnet-block.ts
- name: Notify failures
if: failure()
Expand Down
2 changes: 1 addition & 1 deletion config/eslint/eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ module.exports = {
"no-cond-assign": "error",
"no-debugger": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"@typescript-eslint/no-duplicate-imports": "error",
"no-eval": "error",
"no-extra-bind": "error",
"no-new-func": "error",
Expand Down
6 changes: 3 additions & 3 deletions docs/src/content/hardhat-chai-matchers/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ This package provides the predicates `anyValue` and `anyUint`, but you can easil

<!-- prettier-ignore -->
```js
function isEven(x: BigNumber): boolean {
return x.mod(2).isZero();
function isEven(x: bigint): boolean {
return x % 2n === 0n;
}

await expect(contract.emitUint(2))
Expand Down Expand Up @@ -175,7 +175,7 @@ This package enhances the standard numerical equality matchers (`equal`, `above`
expect(await token.balanceOf(someAddress)).to.equal(1);
```

These matchers support not just [ethers' `BigNumber`](https://docs.ethers.io/v5/single-page/#/v5/api/utils/bignumber/) and the native JavaScript `Number`, but also [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt), [bn.js](https://github.com/indutny/bn.js/), and [bignumber.js](https://github.com/MikeMcl/bignumber.js/).
These matchers support not just the native JavaScript `Number`, but also [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt), [bn.js](https://github.com/indutny/bn.js/), and [bignumber.js](https://github.com/MikeMcl/bignumber.js/).

### Balance Changes

Expand Down
7 changes: 3 additions & 4 deletions docs/src/content/hardhat-chai-matchers/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ When `@nomicfoundation/hardhat-chai-matchers` is used, equality comparisons of n
expect(await token.totalSupply()).to.equal(1_000_000);
```

will work. These assertions don't normally work because the value returned by `totalSupply()` is an [ethers BigNumber](https://docs.ethers.io/v5/single-page/#/v5/api/utils/bignumber/), and an instance of a `BigNumber` will always be different than a plain number.
will work. These assertions don't normally work because the value returned by `totalSupply()` is a [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt), and a bigint value will always be different than a plain number.

The supported types are:

- Plain javascript numbers
- [BigInts](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)
- [Ethers BigNumbers](https://docs.ethers.io/v5/single-page/#/v5/api/utils/bignumber/)
- [`bn.js`](https://github.com/indutny/bn.js/) instances
- [`bignumber.js`](https://github.com/MikeMcl/bignumber.js/) instances

Expand Down Expand Up @@ -226,8 +225,8 @@ await expect(factory.create(9999))
Predicates are just functions that return true if the value is correct, and return false if it isn't, so you can create your own predicates:

```ts
function isEven(x: BigNumber): boolean {
return x.mod(2).isZero();
function isEven(x: bigint): boolean {
return x % 2n === 0n;
}

await expect(token.transfer(100)).to.emit(token, "Transfer").withArgs(isEven);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ await impersonatedSigner.sendTransaction(...);
Alternatively, you can use the [`impersonateAccount`](</hardhat-network-helpers/docs/reference#impersonateaccount(address)>) helper and then obtain the signer for that address:

```js
const helpers = require("@nomicfoundation/hardhat-network-helpers");
const helpers = require("@nomicfoundation/hardhat-toolbox/network-helpers");

const address = "0x1234567890123456789012345678901234567890";
await helpers.impersonateAccount(address);
Expand All @@ -183,7 +183,7 @@ Once you've got a local instance of the mainnet chain state, setting that state
You can reset the network with the [`reset`](</hardhat-network-helpers/docs/reference#reset([url],-[blocknumber])>) network helper:

```js
const helpers = require("@nomicfoundation/hardhat-network-helpers");
const helpers = require("@nomicfoundation/hardhat-toolbox/network-helpers");

await helpers.reset(url, blockNumber);
```
Expand Down
6 changes: 3 additions & 3 deletions docs/src/content/hardhat-runner/docs/advanced/create-task.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Let’s go through the process of creating one to interact with a smart contract

Tasks in Hardhat are asynchronous JavaScript functions that get access to the [Hardhat Runtime Environment](../advanced/hardhat-runtime-environment.md), which exposes its configuration and parameters, as well as programmatic access to other tasks and any plugin objects that may have been injected.

For our example, we will use the [`@nomicfoundation/hardhat-toolbox`](/hardhat-runner/plugins/nomicfoundation-hardhat-toolbox), which includes the [ethers.js](https://docs.ethers.io/v5/) library to interact with our contracts.
For our example, we will use the [`@nomicfoundation/hardhat-toolbox`](/hardhat-runner/plugins/nomicfoundation-hardhat-toolbox), which includes the [ethers.js](https://docs.ethers.org/v6/) library to interact with our contracts.

::::tabsgroup{options="npm 7+,npm 6,yarn"}

Expand All @@ -63,15 +63,15 @@ npm install --save-dev @nomicfoundation/hardhat-toolbox
:::tab{value="npm 6"}

```
npm install --save-dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers @nomiclabs/hardhat-ethers @nomiclabs/hardhat-etherscan chai ethers hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v5 @ethersproject/abi @ethersproject/providers
npm install --save-dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers @nomicfoundation/hardhat-ethers @nomicfoundation/hardhat-verify chai ethers hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v6
```

:::

:::tab{value="yarn"}

```
yarn add --dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers @nomiclabs/hardhat-ethers @nomiclabs/hardhat-etherscan chai ethers hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v5 @ethersproject/abi @ethersproject/providers
yarn add --dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers @nomicfoundation/hardhat-ethers @nomicfoundation/hardhat-verify chai ethers hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v6
```

:::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This way, tests written for Hardhat are just normal Mocha tests. This enables yo

The HRE only provides the core functionality that users and plugin developers need to start building on top of Hardhat. Using it to interface directly with Ethereum in your project can be somewhat harder than expected.

Everything gets easier when you use higher-level libraries, like [Ethers.js](https://docs.ethers.io/) or [ethereum-waffle](https://www.npmjs.com/package/ethereum-waffle), but these libraries need some initialization to work, and that could get repetitive.
Everything gets easier when you use higher-level libraries, like [Ethers.js](https://docs.ethers.org/v6/) or [ethereum-waffle](https://www.npmjs.com/package/ethereum-waffle), but these libraries need some initialization to work, and that could get repetitive.

Hardhat lets you hook into the HRE construction, and extend it with new functionality. This way, you only have to initialize everything once, and your new features or libraries will be available everywhere the HRE is used.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/hardhat-runner/docs/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ If you created a TypeScript project, this task will also generate TypeScript bin

### Testing your contracts

Your project comes with tests that use [Mocha](https://mochajs.org), [Chai](https://www.chaijs.com), and [Ethers.js](https://docs.ethers.io/v5).
Your project comes with tests that use [Mocha](https://mochajs.org), [Chai](https://www.chaijs.com), and [Ethers.js](https://docs.ethers.org/v6/).

If you take a look in the `test/` folder, you'll see a test file:

Expand Down Expand Up @@ -178,7 +178,7 @@ You can run your tests with `npx hardhat test`:

```
$ npx hardhat test
Generating typings for: 2 artifacts in dir: typechain-types for target: ethers-v5
Generating typings for: 2 artifacts in dir: typechain-types for target: ethers-v6
Successfully generated 6 typings!
Compiled 2 Solidity files successfully

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For example, you'll have access in the global scope to the `config` object:
>
```

And if you followed the [Getting started guide](../getting-started) or installed `@nomiclabs/hardhat-ethers`, the `ethers` object:
And if you followed the [Getting started guide](../getting-started) or installed `@nomicfoundation/hardhat-ethers`, the `ethers` object:

```
> ethers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ Follow these steps to migrate your project to Hardhat Toolbox.
:::tab{value="npm 6"}

```
npm install --save-dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers @nomiclabs/hardhat-ethers @nomiclabs/hardhat-etherscan chai ethers hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v5 @ethersproject/abi @ethersproject/providers
npm install --save-dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers @nomicfoundation/hardhat-ethers @nomicfoundation/hardhat-verify chai ethers hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v6
```

:::

:::tab{value="yarn"}

```
yarn add --dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers @nomiclabs/hardhat-ethers @nomiclabs/hardhat-etherscan chai ethers hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v5 @ethersproject/abi @ethersproject/providers
yarn add --dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers@1 @nomiclabs/hardhat-ethers @nomiclabs/hardhat-etherscan chai ethers@5 hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v6
```

:::
Expand Down Expand Up @@ -96,8 +96,8 @@ Follow these steps to migrate your project to Hardhat Toolbox.

Adding the Toolbox will make many other imports redundant, so you can remove any of these if you want:

- `@nomiclabs/hardhat-ethers`
- `@nomiclabs/hardhat-etherscan`
- `@nomicfoundation/hardhat-ethers`
- `@nomicfoundation/hardhat-verify`
- `hardhat-gas-reporter`
- `solidity-coverage`
- `@typechain/hardhat`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ When it comes to testing your contracts, the sample project comes with some usef

- The built-in [Hardhat Network](/hardhat-network/docs) as the development network to test on, along with the [Hardhat Network Helpers](/hardhat-network-helpers) library to manipulate this network.
- [Mocha](https://mochajs.org/) as the test runner, [Chai](https://chaijs.com/) as the assertion library, and the [Hardhat Chai Matchers](/hardhat-chai-matchers) to extend Chai with contracts-related functionality.
- The [`ethers.js`](https://docs.ethers.io/v5/) library to interact with the network and with contracts.
- The [`ethers.js`](https://docs.ethers.org/v6/) library to interact with the network and with contracts.

As well as other useful plugins. You can learn more about this in the [Testing contracts guide](./test-contracts.md).

Expand Down
Loading