Skip to content

Commit d436252

Browse files
committed
feat: update viem toolbox
1 parent 12ac01d commit d436252

File tree

10 files changed

+15
-10
lines changed

10 files changed

+15
-10
lines changed

packages/hardhat-core/sample-projects/typescript/ignition/modules/LockModule.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { buildModule } from "@nomicfoundation/hardhat-toolbox";
1+
import { buildModule } from "@nomicfoundation/ignition/modules";
22

33
const currentTimestampInSeconds = Math.round(
44
new Date(2023, 0, 1).valueOf() / 1000

packages/hardhat-core/sample-projects/typescript/test/Lock.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
} from "@nomicfoundation/hardhat-toolbox/network-helpers";
55
import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs";
66
import { expect } from "chai";
7-
import { ethers } from "hardhat";
7+
import { ethers, ignition } from "hardhat";
88

99
import LockModule from "../ignition/modules/LockModule";
1010

packages/hardhat-toolbox-viem/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ The `@nomicfoundation/hardhat-toolbox-viem` plugin bundles all the commonly used
66

77
When you use this plugin, you'll be able to:
88

9-
- Deploy and interact with your contracts using [Viem](https://viem.sh/) and the [`hardhat-viem`](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-viem) plugin.
9+
- Interact with your contracts using [Viem](https://viem.sh/) and the [`hardhat-viem`](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-viem) plugin.
1010
- Test your contracts with [Mocha](https://mochajs.org/), [Chai](https://chaijs.com/) and [Chai as Promised](https://github.com/domenic/chai-as-promised#chai-assertions-for-promises). Note: the plugin Hardhat Chai Matchers is currently not available for Viem.
11+
- Deploy your contracts with [Hardhat Ignition](https://hardhat.org/ignition).
1112
- Interact with Hardhat Network with our [Hardhat Network Helpers](https://hardhat.org/hardhat-network-helpers).
1213
- Verify the source code of your contracts with the [hardhat-verify](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify) plugin.
1314
- Get metrics on the gas used by your contracts with the [hardhat-gas-reporter](https://github.com/cgewecke/hardhat-gas-reporter) plugin.

packages/hardhat-toolbox-viem/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"devDependencies": {
4646
"@nomicfoundation/eslint-plugin-hardhat-internal-rules": "workspace:^",
4747
"@nomicfoundation/eslint-plugin-slow-imports": "workspace:^",
48+
"@nomicfoundation/hardhat-ignition-viem": "^0.13.0",
4849
"@nomicfoundation/hardhat-network-helpers": "workspace:^1.0.0",
4950
"@nomicfoundation/hardhat-verify": "workspace:^2.0.0",
5051
"@nomicfoundation/hardhat-viem": "workspace:^1.0.0",
@@ -71,6 +72,7 @@
7172
"viem": "^1.15.1"
7273
},
7374
"peerDependencies": {
75+
"@nomicfoundation/hardhat-ignition-viem": "^0.13.0",
7476
"@nomicfoundation/hardhat-network-helpers": "^1.0.0",
7577
"@nomicfoundation/hardhat-verify": "^2.0.0",
7678
"@nomicfoundation/hardhat-viem": "^1.0.0",

packages/hardhat-toolbox-viem/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import "@nomicfoundation/hardhat-verify";
22
import "@nomicfoundation/hardhat-viem";
3+
import "@nomicfoundation/hardhat-ignition-viem";
34
import "hardhat-gas-reporter";
45
import "solidity-coverage";
56
import "./internal/chai-setup";

packages/hardhat-toolbox-viem/test/test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe("hardhat-toolbox-viem", function () {
2020
useEnvironment("with-gas-reporter-config");
2121

2222
it("Should not crash while loading the HRE", async function () {
23-
assert.isDefined(this.env);
23+
assert.isTrue(this.env !== undefined && this.env !== null);
2424
});
2525
});
2626
});

packages/hardhat-toolbox/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"@nomicfoundation/eslint-plugin-slow-imports": "workspace:^",
4545
"@nomicfoundation/hardhat-chai-matchers": "workspace:^2.0.0",
4646
"@nomicfoundation/hardhat-ethers": "workspace:^3.0.0",
47-
"@nomicfoundation/hardhat-ignition": "^0.13.0",
4847
"@nomicfoundation/hardhat-ignition-ethers": "^0.13.0",
4948
"@nomicfoundation/hardhat-network-helpers": "workspace:^1.0.0",
5049
"@nomicfoundation/hardhat-verify": "workspace:^2.0.0",
@@ -75,7 +74,6 @@
7574
"peerDependencies": {
7675
"@nomicfoundation/hardhat-chai-matchers": "^2.0.0",
7776
"@nomicfoundation/hardhat-ethers": "^3.0.0",
78-
"@nomicfoundation/hardhat-ignition": "^0.13.0",
7977
"@nomicfoundation/hardhat-ignition-ethers": "^0.13.0",
8078
"@nomicfoundation/hardhat-network-helpers": "^1.0.0",
8179
"@nomicfoundation/hardhat-verify": "^2.0.0",

packages/hardhat-toolbox/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import "@nomicfoundation/hardhat-chai-matchers";
22
import "@nomicfoundation/hardhat-ethers";
3-
import "@nomicfoundation/hardhat-ignition-ethers";
43
import "@nomicfoundation/hardhat-verify";
54
import "@typechain/hardhat";
65
import "hardhat-gas-reporter";
76
import "solidity-coverage";
7+
import "@nomicfoundation/hardhat-ignition-ethers";
8+
89
/**
910
* If a new official plugin is added, make sure to update:
1011
* - The tsconfig.json file

packages/hardhat-toolbox/test/fixture-projects/only-toolbox/script.js

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ async function main() {
99
assert(taskNames.includes("verify"));
1010
assert(taskNames.includes("coverage"));
1111
assert(taskNames.includes("typechain"));
12+
// TODO: bring back
13+
// assert(taskNames.includes("ignition"));
1214
}
1315

1416
main()

packages/hardhat-toolbox/test/test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ describe("hardhat-toolbox", function () {
1919
describe("hardhat-gas-reporter-config", function () {
2020
useEnvironment("with-gas-reporter-config");
2121

22-
it("Should not crash while loading the HRE", async function () {
23-
assert.isDefined(this.env);
22+
it("Should not crash while loading the HRE", function () {
23+
assert.isTrue(this.env !== undefined && this.env !== null);
2424
});
2525
});
2626

2727
describe("typechain config", function () {
2828
useEnvironment("typechain-config");
2929

30-
it("should disable typechain overrides for js projects", async function () {
30+
it("should disable typechain overrides for js projects", function () {
3131
assert.isTrue(this.env.config.typechain.dontOverrideCompile);
3232
});
3333
});

0 commit comments

Comments
 (0)