@@ -8,73 +8,73 @@ To get started, we’ll uninstall the `hardhat-deploy` plugin and install the Ha
8
8
9
9
1 . Remove the ` hardhat-deploy ` packages from your project:
10
10
11
- :::: tabsgroup { options =" npm,yarn " }
11
+ :::: tabsgroup { options =" npm,yarn " }
12
12
13
- ::: tab { value =" npm " }
13
+ :::tab{value="npm"}
14
14
15
- ``` sh
16
- npm uninstall hardhat-deploy hardhat-deploy-ethers
17
- ```
15
+ ```sh
16
+ npm uninstall hardhat-deploy hardhat-deploy-ethers
17
+ ```
18
18
19
- :::
19
+ :::
20
20
21
- ::: tab { value =yarn }
21
+ :::tab{value=yarn}
22
22
23
- ``` sh
24
- yarn remove hardhat-deploy hardhat-deploy-ethers
25
- ```
23
+ ```sh
24
+ yarn remove hardhat-deploy hardhat-deploy-ethers
25
+ ```
26
26
27
- :::
27
+ :::
28
28
29
- ::::
29
+ ::::
30
30
31
31
2 . Install the Hardhat Ignition package and ` hardhat-network-helpers ` to provide additional testing support as a replacement for ` hardhat-deploy ` functionality like EVM snapshots:
32
32
33
- :::: tabsgroup { options =" npm,yarn " }
33
+ :::: tabsgroup { options =" npm,yarn " }
34
34
35
- ::: tab { value =" npm " }
35
+ :::tab{value="npm"}
36
36
37
- ``` sh
38
- npm install --save-dev @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-network-helpers
39
- ```
37
+ ```sh
38
+ npm install --save-dev @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-network-helpers
39
+ ```
40
40
41
- :::
41
+ :::
42
42
43
- ::: tab { value =yarn }
43
+ :::tab{value=yarn}
44
44
45
- ``` sh
46
- yarn add --dev @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-network-helpers
47
- ```
45
+ ```sh
46
+ yarn add --dev @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-network-helpers
47
+ ```
48
48
49
- :::
49
+ :::
50
50
51
- ::::
51
+ ::::
52
52
53
53
3 . Update the project’s ` hardhat.config ` file to remove ` hardhat-deploy ` and ` hardhat-deploy-ethers ` and instead import Hardhat Ignition:
54
54
55
- :::: tabsgroup { options =" typescript,javascript " }
55
+ :::: tabsgroup { options =" typescript,javascript " }
56
56
57
- ::: tab { value =" typescript " }
57
+ :::tab{value="typescript"}
58
58
59
- ``` git
60
- - import "hardhat-deploy";
61
- - import "hardhat-deploy-ethers";
62
- + import "@nomicfoundation/hardhat-ignition-ethers";
63
- ```
59
+ ```git
60
+ - import "hardhat-deploy";
61
+ - import "hardhat-deploy-ethers";
62
+ + import "@nomicfoundation/hardhat-ignition-ethers";
63
+ ```
64
64
65
- :::
65
+ :::
66
66
67
- ::: tab { value =javascript }
67
+ :::tab{value=javascript}
68
68
69
- ``` git
70
- - require("hardhat-deploy");
71
- - require("hardhat-deploy-ethers");
72
- + require("@nomicfoundation/hardhat-ignition-ethers");
73
- ```
69
+ ```git
70
+ - require("hardhat-deploy");
71
+ - require("hardhat-deploy-ethers");
72
+ + require("@nomicfoundation/hardhat-ignition-ethers");
73
+ ```
74
74
75
- :::
75
+ :::
76
76
77
- ::::
77
+ ::::
78
78
79
79
## Convert deployment scripts to Ignition Modules
80
80
@@ -152,7 +152,7 @@ import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";
152
152
For instance, you can deploy contracts via `m.contract()`.
153
153
*/
154
154
export default buildModule (" TokenModule" , (m ) => {
155
- /*
155
+ /*
156
156
Instead of named accounts, you get access to the configured accounts
157
157
through the `getAccount()` method.
158
158
*/
@@ -193,7 +193,7 @@ const { buildModule } = require("@nomicfoundation/hardhat-ignition/modules");
193
193
For instance, you can deploy contracts via `m.contract()`.
194
194
*/
195
195
module .exports = buildModule (" TokenModule" , (m ) => {
196
- /*
196
+ /*
197
197
Instead of named accounts, you get access to the configured accounts
198
198
through the `getAccount()` method.
199
199
*/
0 commit comments