@@ -126,9 +126,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
126
126
const { deployments, getNamedAccounts } = hre ;
127
127
const { deploy } = deployments ;
128
128
/*
129
- The deploy function uses the hardhat-deploy named accounts feature
130
- to set the deployment's `from` and `args` parameters.
131
- */
129
+ The deploy function uses the hardhat-deploy named accounts feature
130
+ to set the deployment's `from` and `args` parameters.
131
+ */
132
132
const { deployer, tokenOwner } = await getNamedAccounts ();
133
133
await deploy (" Token" , {
134
134
from: deployer ,
@@ -156,28 +156,28 @@ import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";
156
156
*/
157
157
export default buildModule (" TokenModule" , (m ) => {
158
158
/*
159
- Instead of named accounts, you get access to the configured accounts
160
- through the `getAccount()` method.
161
- */
159
+ Instead of named accounts, you get access to the configured accounts
160
+ through the `getAccount()` method.
161
+ */
162
162
const deployer = m .getAccount (0 );
163
163
const tokenOwner = m .getAccount (1 );
164
164
165
165
/*
166
- Deploy `Token` by calling `contract()` with the constructor arguments
167
- as the second argument. The account to use for the deployment transaction
168
- is set through `from` in the third argument, which is an options object.
169
- */
166
+ Deploy `Token` by calling `contract()` with the constructor arguments
167
+ as the second argument. The account to use for the deployment transaction
168
+ is set through `from` in the third argument, which is an options object.
169
+ */
170
170
const token = m .contract (" Token" , [tokenOwner ], {
171
171
from: deployer ,
172
172
});
173
173
174
174
/*
175
- The call to `m.contract()` returns a future that can be used in other `m.contract()`
176
- calls (e.g. as a constructor argument, where the future will resolve to the
177
- deployed address), but it can also be returned from the module. Contract
178
- futures that are returned from the module can be leveraged in Hardhat tests
179
- and scripts, as will be shown later.
180
- */
175
+ The call to `m.contract()` returns a future that can be used in other `m.contract()`
176
+ calls (e.g. as a constructor argument, where the future will resolve to the
177
+ deployed address), but it can also be returned from the module. Contract
178
+ futures that are returned from the module can be leveraged in Hardhat tests
179
+ and scripts, as will be shown later.
180
+ */
181
181
return { token };
182
182
});
183
183
```
@@ -197,28 +197,28 @@ const { buildModule } = require("@nomicfoundation/hardhat-ignition/modules");
197
197
*/
198
198
module .exports = buildModule (" TokenModule" , (m ) => {
199
199
/*
200
- Instead of named accounts, you get access to the configured accounts
201
- through the `getAccount()` method.
202
- */
200
+ Instead of named accounts, you get access to the configured accounts
201
+ through the `getAccount()` method.
202
+ */
203
203
const deployer = m .getAccount (0 );
204
204
const tokenOwner = m .getAccount (1 );
205
205
206
206
/*
207
- Deploy `Token` by calling `contract()` with the constructor arguments
208
- as the second argument. The account to use for the deployment transaction
209
- is set through `from` in the third argument, which is an options object.
210
- */
207
+ Deploy `Token` by calling `contract()` with the constructor arguments
208
+ as the second argument. The account to use for the deployment transaction
209
+ is set through `from` in the third argument, which is an options object.
210
+ */
211
211
const token = m .contract (" Token" , [tokenOwner], {
212
212
from: deployer,
213
213
});
214
214
215
215
/*
216
- The call to `m.contract()` returns a future that can be used in other `m.contract()`
217
- calls (e.g. as a constructor argument, where the future will resolve to the
218
- deployed address), but it can also be returned from the module. Contract
219
- futures that are returned from the module can be leveraged in Hardhat tests
220
- and scripts, as will be shown later.
221
- */
216
+ The call to `m.contract()` returns a future that can be used in other `m.contract()`
217
+ calls (e.g. as a constructor argument, where the future will resolve to the
218
+ deployed address), but it can also be returned from the module. Contract
219
+ futures that are returned from the module can be leveraged in Hardhat tests
220
+ and scripts, as will be shown later.
221
+ */
222
222
return { token };
223
223
});
224
224
```
0 commit comments