diff --git a/docs/src/content/hardhat-network/docs/guides/forking-other-networks.md b/docs/src/content/hardhat-network/docs/guides/forking-other-networks.md index e987e66e87..af7402898f 100644 --- a/docs/src/content/hardhat-network/docs/guides/forking-other-networks.md +++ b/docs/src/content/hardhat-network/docs/guides/forking-other-networks.md @@ -167,7 +167,7 @@ await impersonatedSigner.sendTransaction(...); Alternatively, you can use the [`impersonateAccount`]() 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); @@ -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`]() network helper: ```js -const helpers = require("@nomicfoundation/hardhat-network-helpers"); +const helpers = require("@nomicfoundation/hardhat-toolbox/network-helpers"); await helpers.reset(url, blockNumber); ``` diff --git a/docs/src/content/hardhat-runner/docs/guides/test-contracts.md b/docs/src/content/hardhat-runner/docs/guides/test-contracts.md index f94565a44e..f967343d76 100644 --- a/docs/src/content/hardhat-runner/docs/guides/test-contracts.md +++ b/docs/src/content/hardhat-runner/docs/guides/test-contracts.md @@ -27,7 +27,7 @@ For our first test we’ll deploy the `Lock` contract and assert that the unlock ```tsx import { expect } from "chai"; import hre from "hardhat"; -import { time } from "@nomicfoundation/hardhat-network-helpers"; +import { time } from "@nomicfoundation/hardhat-toolbox/network-helpers"; describe("Lock", function () { it("Should set the right unlockTime", async function () { @@ -54,7 +54,7 @@ describe("Lock", function () { ```js const { expect } = require("chai"); const hre = require("hardhat"); -const { time } = require("@nomicfoundation/hardhat-network-helpers"); +const { time } = require("@nomicfoundation/hardhat-toolbox/network-helpers"); describe("Lock", function () { it("Should set the right unlockTime", async function () { @@ -228,7 +228,7 @@ const hre = require("hardhat"); const { loadFixture, time, -} = require("@nomicfoundation/hardhat-network-helpers"); +} = require("@nomicfoundation/hardhat-toolbox/network-helpers"); describe("Lock", function () { async function deployOneYearLockFixture() { diff --git a/docs/src/content/tutorial/testing-contracts.md b/docs/src/content/tutorial/testing-contracts.md index 30d21f75a3..bb05e7e5e8 100644 --- a/docs/src/content/tutorial/testing-contracts.md +++ b/docs/src/content/tutorial/testing-contracts.md @@ -114,7 +114,7 @@ The two tests that we wrote begin with their setup, which in this case means dep You can avoid code duplication and improve the performance of your test suite by using **fixtures**. A fixture is a setup function that is run only the first time it's invoked. On subsequent invocations, instead of re-running it, Hardhat will reset the state of the network to what it was at the point after the fixture was initially executed. ```js -const { loadFixture } = require("@nomicfoundation/hardhat-network-helpers"); +const { loadFixture } = require("@nomicfoundation/hardhat-toolbox/network-helpers"); const { expect } = require("chai"); describe("Token contract", function () { @@ -171,7 +171,7 @@ const { expect } = require("chai"); // We use `loadFixture` to share common setups (or fixtures) between tests. // Using this simplifies your tests and makes them run faster, by taking // advantage of Hardhat Network's snapshot functionality. -const { loadFixture } = require("@nomicfoundation/hardhat-network-helpers"); +const { loadFixture } = require("@nomicfoundation/hardhat-toolbox/network-helpers"); // `describe` is a Mocha function that allows you to organize your tests. // Having your tests organized makes debugging them easier. All Mocha diff --git a/packages/hardhat-core/sample-projects/javascript-esm/test/Lock.js b/packages/hardhat-core/sample-projects/javascript-esm/test/Lock.js index 1d192fe850..e5ba3d8fcd 100644 --- a/packages/hardhat-core/sample-projects/javascript-esm/test/Lock.js +++ b/packages/hardhat-core/sample-projects/javascript-esm/test/Lock.js @@ -1,4 +1,7 @@ -import { time, loadFixture } from "@nomicfoundation/hardhat-network-helpers"; +import { + time, + loadFixture, +} from "@nomicfoundation/hardhat-toolbox/network-helpers"; import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs.js"; import { expect } from "chai"; diff --git a/packages/hardhat-core/sample-projects/javascript/test/Lock.js b/packages/hardhat-core/sample-projects/javascript/test/Lock.js index ce4a74e4f1..f0e6ba1b2c 100644 --- a/packages/hardhat-core/sample-projects/javascript/test/Lock.js +++ b/packages/hardhat-core/sample-projects/javascript/test/Lock.js @@ -1,7 +1,7 @@ const { time, loadFixture, -} = require("@nomicfoundation/hardhat-network-helpers"); +} = require("@nomicfoundation/hardhat-toolbox/network-helpers"); const { anyValue } = require("@nomicfoundation/hardhat-chai-matchers/withArgs"); const { expect } = require("chai"); diff --git a/packages/hardhat-core/sample-projects/typescript/test/Lock.ts b/packages/hardhat-core/sample-projects/typescript/test/Lock.ts index 6e0300bf24..a6e866b400 100644 --- a/packages/hardhat-core/sample-projects/typescript/test/Lock.ts +++ b/packages/hardhat-core/sample-projects/typescript/test/Lock.ts @@ -1,4 +1,7 @@ -import { time, loadFixture } from "@nomicfoundation/hardhat-network-helpers"; +import { + time, + loadFixture, +} from "@nomicfoundation/hardhat-toolbox/network-helpers"; import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; import { expect } from "chai"; import { ethers } from "hardhat";