@nomicfoundation/hardhat-errors 3.0.0-next.3 → 3.0.0-next.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/src/descriptors.d.ts +1908 -1203
- package/dist/src/descriptors.d.ts.map +1 -1
- package/dist/src/descriptors.js +2339 -1280
- package/dist/src/descriptors.js.map +1 -1
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/errors.js +10 -3
- package/dist/src/errors.js.map +1 -1
- package/package.json +6 -14
- package/src/descriptors.ts +2527 -1404
- package/src/errors.ts +13 -3
package/dist/src/descriptors.js
CHANGED
|
@@ -1,1469 +1,2528 @@
|
|
|
1
1
|
export const ERROR_CATEGORIES = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
CORE: {
|
|
3
|
+
min: 1,
|
|
4
|
+
max: 9999,
|
|
5
|
+
pluginId: undefined,
|
|
6
|
+
websiteTitle: "Hardhat 3",
|
|
7
|
+
CATEGORIES: {
|
|
8
|
+
GENERAL: {
|
|
9
|
+
min: 1,
|
|
10
|
+
max: 99,
|
|
11
|
+
websiteSubTitle: "General errors",
|
|
12
|
+
},
|
|
13
|
+
INTERNAL: {
|
|
14
|
+
min: 100,
|
|
15
|
+
max: 199,
|
|
16
|
+
websiteSubTitle: "Internal errors",
|
|
17
|
+
},
|
|
18
|
+
PLUGINS: {
|
|
19
|
+
min: 200,
|
|
20
|
+
max: 299,
|
|
21
|
+
websiteSubTitle: "Plugin errors",
|
|
22
|
+
},
|
|
23
|
+
HOOKS: {
|
|
24
|
+
min: 300,
|
|
25
|
+
max: 399,
|
|
26
|
+
websiteSubTitle: "Hooks errors",
|
|
27
|
+
},
|
|
28
|
+
TASK_DEFINITIONS: {
|
|
29
|
+
min: 400,
|
|
30
|
+
max: 499,
|
|
31
|
+
websiteSubTitle: "Task definition errors",
|
|
32
|
+
},
|
|
33
|
+
ARGUMENTS: {
|
|
34
|
+
min: 500,
|
|
35
|
+
max: 599,
|
|
36
|
+
websiteSubTitle: "Arguments related errors",
|
|
37
|
+
},
|
|
38
|
+
BUILTIN_TASKS: {
|
|
39
|
+
min: 600,
|
|
40
|
+
max: 699,
|
|
41
|
+
websiteSubTitle: "Built-in tasks errors",
|
|
42
|
+
},
|
|
43
|
+
NETWORK: {
|
|
44
|
+
min: 700,
|
|
45
|
+
max: 799,
|
|
46
|
+
websiteSubTitle: "Network errors",
|
|
47
|
+
},
|
|
48
|
+
SOLIDITY_TESTS: {
|
|
49
|
+
min: 800,
|
|
50
|
+
max: 899,
|
|
51
|
+
websiteSubTitle: "Solidity tests errors",
|
|
52
|
+
},
|
|
53
|
+
SOLIDITY: {
|
|
54
|
+
min: 900,
|
|
55
|
+
max: 999,
|
|
56
|
+
websiteSubTitle: "Solidity errors",
|
|
57
|
+
},
|
|
58
|
+
ARTIFACTS: {
|
|
59
|
+
min: 1000,
|
|
60
|
+
max: 1099,
|
|
61
|
+
websiteSubTitle: "Compilation artifacts related errors",
|
|
62
|
+
},
|
|
63
|
+
NODE: {
|
|
64
|
+
min: 1100,
|
|
65
|
+
max: 1199,
|
|
66
|
+
websiteSubTitle: "Hardhat node errors",
|
|
67
|
+
},
|
|
68
|
+
TEST_PLUGIN: {
|
|
69
|
+
min: 1200,
|
|
70
|
+
max: 1299,
|
|
71
|
+
websiteSubTitle: "Hardhat test plugin errors",
|
|
72
|
+
},
|
|
73
|
+
COVERAGE: {
|
|
74
|
+
min: 1300,
|
|
75
|
+
max: 1399,
|
|
76
|
+
websiteSubTitle: "Hardhat coverage errors",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
8
79
|
},
|
|
9
|
-
|
|
10
|
-
min:
|
|
11
|
-
max:
|
|
12
|
-
|
|
80
|
+
IGNITION: {
|
|
81
|
+
min: 10000,
|
|
82
|
+
max: 19999,
|
|
83
|
+
pluginId: "hardhat-ignition",
|
|
84
|
+
websiteTitle: "Hardhat Ignition",
|
|
85
|
+
CATEGORIES: {
|
|
86
|
+
GENERAL: {
|
|
87
|
+
min: 10000,
|
|
88
|
+
max: 10099,
|
|
89
|
+
websiteSubTitle: "General errors",
|
|
90
|
+
},
|
|
91
|
+
INTERNAL: {
|
|
92
|
+
min: 10100,
|
|
93
|
+
max: 10199,
|
|
94
|
+
websiteSubTitle: "Internal errors",
|
|
95
|
+
},
|
|
96
|
+
MODULE: {
|
|
97
|
+
min: 10200,
|
|
98
|
+
max: 10299,
|
|
99
|
+
websiteSubTitle: "Module errors",
|
|
100
|
+
},
|
|
101
|
+
SERIALIZATION: {
|
|
102
|
+
min: 10300,
|
|
103
|
+
max: 10399,
|
|
104
|
+
websiteSubTitle: "Serialization errors",
|
|
105
|
+
},
|
|
106
|
+
EXECUTION: {
|
|
107
|
+
min: 10400,
|
|
108
|
+
max: 10499,
|
|
109
|
+
websiteSubTitle: "Execution errors",
|
|
110
|
+
},
|
|
111
|
+
RECONCILIATION: {
|
|
112
|
+
min: 10500,
|
|
113
|
+
max: 10599,
|
|
114
|
+
websiteSubTitle: "Reconciliation errors",
|
|
115
|
+
},
|
|
116
|
+
WIPE: {
|
|
117
|
+
min: 10600,
|
|
118
|
+
max: 10699,
|
|
119
|
+
websiteSubTitle: "Wipe errors",
|
|
120
|
+
},
|
|
121
|
+
VALIDATION: {
|
|
122
|
+
min: 10700,
|
|
123
|
+
max: 10799,
|
|
124
|
+
websiteSubTitle: "Validation errors",
|
|
125
|
+
},
|
|
126
|
+
STATUS: {
|
|
127
|
+
min: 10800,
|
|
128
|
+
max: 10899,
|
|
129
|
+
websiteSubTitle: "Status errors",
|
|
130
|
+
},
|
|
131
|
+
DEPLOY: {
|
|
132
|
+
min: 10900,
|
|
133
|
+
max: 10999,
|
|
134
|
+
websiteSubTitle: "Deploy errors",
|
|
135
|
+
},
|
|
136
|
+
VERIFY: {
|
|
137
|
+
min: 11000,
|
|
138
|
+
max: 11099,
|
|
139
|
+
websiteSubTitle: "Verify errors",
|
|
140
|
+
},
|
|
141
|
+
STRATEGIES: {
|
|
142
|
+
min: 11100,
|
|
143
|
+
max: 11199,
|
|
144
|
+
websiteSubTitle: "Strategies errors",
|
|
145
|
+
},
|
|
146
|
+
LIST_TRANSACTIONS: {
|
|
147
|
+
min: 11200,
|
|
148
|
+
max: 11299,
|
|
149
|
+
websiteSubTitle: "List transactions errors",
|
|
150
|
+
},
|
|
151
|
+
TRACK_TRANSACTIONS: {
|
|
152
|
+
min: 11300,
|
|
153
|
+
max: 11399,
|
|
154
|
+
websiteSubTitle: "Track transactions errors",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
13
157
|
},
|
|
14
|
-
|
|
15
|
-
min:
|
|
16
|
-
max:
|
|
17
|
-
|
|
158
|
+
HARDHAT_ETHERS: {
|
|
159
|
+
min: 20000,
|
|
160
|
+
max: 29999,
|
|
161
|
+
pluginId: "hardhat-ethers",
|
|
162
|
+
websiteTitle: "Hardhat Ethers",
|
|
163
|
+
CATEGORIES: {
|
|
164
|
+
GENERAL: {
|
|
165
|
+
min: 20000,
|
|
166
|
+
max: 20099,
|
|
167
|
+
websiteSubTitle: "General errors",
|
|
168
|
+
},
|
|
169
|
+
},
|
|
18
170
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
171
|
+
HARDHAT_MOCHA: {
|
|
172
|
+
min: 30000,
|
|
173
|
+
max: 39999,
|
|
174
|
+
pluginId: "hardhat-mocha",
|
|
175
|
+
websiteTitle: "Hardhat Mocha",
|
|
176
|
+
CATEGORIES: {
|
|
177
|
+
GENERAL: {
|
|
178
|
+
min: 30000,
|
|
179
|
+
max: 30099,
|
|
180
|
+
websiteSubTitle: "General errors",
|
|
181
|
+
},
|
|
182
|
+
},
|
|
27
183
|
},
|
|
28
|
-
|
|
29
|
-
min:
|
|
30
|
-
max:
|
|
31
|
-
|
|
184
|
+
HARDHAT_VIEM: {
|
|
185
|
+
min: 40000,
|
|
186
|
+
max: 49999,
|
|
187
|
+
pluginId: "hardhat-viem",
|
|
188
|
+
websiteTitle: "Hardhat Viem",
|
|
189
|
+
CATEGORIES: {
|
|
190
|
+
GENERAL: {
|
|
191
|
+
min: 40000,
|
|
192
|
+
max: 40099,
|
|
193
|
+
websiteSubTitle: "General errors",
|
|
194
|
+
},
|
|
195
|
+
},
|
|
32
196
|
},
|
|
33
|
-
|
|
34
|
-
min:
|
|
35
|
-
max:
|
|
36
|
-
|
|
197
|
+
HARDHAT_KEYSTORE: {
|
|
198
|
+
min: 50000,
|
|
199
|
+
max: 59999,
|
|
200
|
+
pluginId: "hardhat-keystore",
|
|
201
|
+
websiteTitle: "Hardhat Keystore",
|
|
202
|
+
CATEGORIES: {
|
|
203
|
+
GENERAL: {
|
|
204
|
+
min: 50000,
|
|
205
|
+
max: 50099,
|
|
206
|
+
websiteSubTitle: "General errors",
|
|
207
|
+
},
|
|
208
|
+
},
|
|
37
209
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
210
|
+
NETWORK_HELPERS: {
|
|
211
|
+
min: 60000,
|
|
212
|
+
max: 69999,
|
|
213
|
+
pluginId: "hardhat-network-helpers",
|
|
214
|
+
websiteTitle: "Hardhat Network Helpers",
|
|
215
|
+
CATEGORIES: {
|
|
216
|
+
GENERAL: {
|
|
217
|
+
min: 60000,
|
|
218
|
+
max: 60099,
|
|
219
|
+
websiteSubTitle: "General errors",
|
|
220
|
+
},
|
|
221
|
+
},
|
|
45
222
|
},
|
|
46
|
-
|
|
47
|
-
min:
|
|
48
|
-
max:
|
|
49
|
-
|
|
223
|
+
CHAI_MATCHERS: {
|
|
224
|
+
min: 70000,
|
|
225
|
+
max: 79999,
|
|
226
|
+
pluginId: "hardhat-ethers-chai-matchers",
|
|
227
|
+
websiteTitle: "Hardhat Chai Matchers",
|
|
228
|
+
CATEGORIES: {
|
|
229
|
+
GENERAL: {
|
|
230
|
+
min: 70000,
|
|
231
|
+
max: 70099,
|
|
232
|
+
websiteSubTitle: "General errors",
|
|
233
|
+
},
|
|
234
|
+
},
|
|
50
235
|
},
|
|
51
|
-
|
|
52
|
-
min:
|
|
53
|
-
max:
|
|
54
|
-
|
|
236
|
+
HARDHAT_VERIFY: {
|
|
237
|
+
min: 80000,
|
|
238
|
+
max: 89999,
|
|
239
|
+
pluginId: "hardhat-verify",
|
|
240
|
+
websiteTitle: "Hardhat Verify",
|
|
241
|
+
CATEGORIES: {
|
|
242
|
+
GENERAL: {
|
|
243
|
+
min: 80000,
|
|
244
|
+
max: 80099,
|
|
245
|
+
websiteSubTitle: "General errors",
|
|
246
|
+
},
|
|
247
|
+
VALIDATION: {
|
|
248
|
+
min: 80100,
|
|
249
|
+
max: 80199,
|
|
250
|
+
websiteSubTitle: "Validation errors",
|
|
251
|
+
},
|
|
252
|
+
},
|
|
55
253
|
},
|
|
56
254
|
};
|
|
57
255
|
export const ERRORS = {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
256
|
+
CORE: {
|
|
257
|
+
GENERAL: {
|
|
258
|
+
NOT_INSIDE_PROJECT: {
|
|
259
|
+
number: 1,
|
|
260
|
+
messageTemplate: "You are not inside a Hardhat project.",
|
|
261
|
+
websiteTitle: "You are not inside a Hardhat project",
|
|
262
|
+
websiteDescription: `You are trying to run Hardhat outside of a Hardhat project.
|
|
64
263
|
|
|
65
264
|
You can learn how to use Hardhat by reading the [Getting Started guide](/hardhat-runner/docs/getting-started).`,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
265
|
+
},
|
|
266
|
+
DUPLICATED_PLUGIN_ID: {
|
|
267
|
+
number: 2,
|
|
268
|
+
shouldBeReported: true,
|
|
269
|
+
messageTemplate: 'Duplicated plugin id "{id}" found. Did you install multiple versions of the same plugin?',
|
|
270
|
+
websiteTitle: "Duplicated plugin id",
|
|
271
|
+
websiteDescription: `While loading the plugins, two different plugins where found with the same id.
|
|
73
272
|
|
|
74
273
|
Please double check whether you have multiple versions of the same plugin installed.`,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
274
|
+
},
|
|
275
|
+
NO_CONFIG_FILE_FOUND: {
|
|
276
|
+
number: 3,
|
|
277
|
+
messageTemplate: "No Hardhat config file found.\n\nYou can initialize a new project by running Hardhat with --init",
|
|
278
|
+
websiteTitle: "No Hardhat config file found",
|
|
279
|
+
websiteDescription: "Hardhat couldn't find a config file in the current directory or any of its parents.",
|
|
280
|
+
},
|
|
281
|
+
INVALID_CONFIG_PATH: {
|
|
282
|
+
number: 4,
|
|
283
|
+
messageTemplate: "Config file {configPath} not found",
|
|
284
|
+
websiteTitle: "Invalid config path",
|
|
285
|
+
websiteDescription: "The config file doesn't exist at the provided path.",
|
|
286
|
+
},
|
|
287
|
+
NO_CONFIG_EXPORTED: {
|
|
288
|
+
number: 5,
|
|
289
|
+
messageTemplate: "No config exported in {configPath}",
|
|
290
|
+
websiteTitle: "No config exported",
|
|
291
|
+
websiteDescription: "There is nothing exported from the config file.",
|
|
292
|
+
},
|
|
293
|
+
INVALID_CONFIG_OBJECT: {
|
|
294
|
+
number: 6,
|
|
295
|
+
messageTemplate: "Invalid config exported in {configPath}",
|
|
296
|
+
websiteTitle: "Invalid config object",
|
|
297
|
+
websiteDescription: "The config file doesn't export a valid configuration object.",
|
|
298
|
+
},
|
|
299
|
+
ENV_VAR_NOT_FOUND: {
|
|
300
|
+
number: 7,
|
|
301
|
+
messageTemplate: `Configuration Variable "{name}" not found.
|
|
103
302
|
|
|
104
303
|
You can define it using a plugin like hardhat-keystore, or set it as an environment variable.`,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
304
|
+
websiteTitle: "Configuration variable not found",
|
|
305
|
+
websiteDescription: `A configuration variable was expected to be set as an environment variable, but it wasn't.`,
|
|
306
|
+
},
|
|
307
|
+
INVALID_URL: {
|
|
308
|
+
number: 8,
|
|
309
|
+
messageTemplate: "Invalid URL: {url}",
|
|
310
|
+
websiteTitle: "Invalid URL",
|
|
311
|
+
websiteDescription: `Given value was not a valid URL.`,
|
|
312
|
+
},
|
|
313
|
+
INVALID_BIGINT: {
|
|
314
|
+
number: 9,
|
|
315
|
+
messageTemplate: "Invalid BigInt: {value}",
|
|
316
|
+
websiteTitle: "Invalid BigInt",
|
|
317
|
+
websiteDescription: `Given value was not a valid BigInt.`,
|
|
318
|
+
},
|
|
319
|
+
HARDHAT_PROJECT_ALREADY_CREATED: {
|
|
320
|
+
number: 10,
|
|
321
|
+
messageTemplate: "You are trying to initialize a project inside an existing Hardhat project. The path to the project's configuration file is: {hardhatProjectRootPath}.",
|
|
322
|
+
websiteTitle: "Hardhat project already created",
|
|
323
|
+
websiteDescription: `Cannot create a new Hardhat project, the current folder is already associated with a project.`,
|
|
324
|
+
},
|
|
325
|
+
NOT_IN_INTERACTIVE_SHELL: {
|
|
326
|
+
number: 11,
|
|
327
|
+
messageTemplate: "You are trying to initialize a project but you are not in an interactive shell.",
|
|
328
|
+
websiteTitle: "Not inside an interactive shell",
|
|
329
|
+
websiteDescription: `You are trying to initialize a project but you are not in an interactive shell.
|
|
131
330
|
|
|
132
331
|
Please re-run the command inside an interactive shell.`,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
332
|
+
},
|
|
333
|
+
UNSUPPORTED_OPERATION: {
|
|
334
|
+
number: 12,
|
|
335
|
+
messageTemplate: "{operation} is not supported in Hardhat.",
|
|
336
|
+
websiteTitle: "Unsupported operation",
|
|
337
|
+
websiteDescription: `You are trying to perform an unsupported operation.
|
|
139
338
|
|
|
140
339
|
Unless you are creating a task or plugin, this is probably a bug.
|
|
141
340
|
|
|
142
341
|
Please [report it](https://github.com/nomiclabs/hardhat/issues/new) to help us improve Hardhat.`,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
342
|
+
},
|
|
343
|
+
ONLY_ESM_SUPPORTED: {
|
|
344
|
+
number: 13,
|
|
345
|
+
messageTemplate: `Hardhat only supports ESM projects. Please be sure to specify "'type': 'module'" in your package.json`,
|
|
346
|
+
websiteTitle: "Only ESM projects are supported",
|
|
347
|
+
websiteDescription: `You are trying to initialize a new Hardhat project, but your package.json does not have the property "type" set to "module".
|
|
149
348
|
|
|
150
349
|
Currently, Hardhat only supports ESM projects.
|
|
151
350
|
|
|
152
351
|
Please add the property "type" with the value "module" in your package.json to ensure that your project is recognized as an ESM project.`,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
352
|
+
},
|
|
353
|
+
GLOBAL_OPTION_ALREADY_DEFINED: {
|
|
354
|
+
number: 14,
|
|
355
|
+
messageTemplate: 'Plugin "{plugin}"" is trying to define the global option "{globalOption}" but it is already defined by plugin "{definedByPlugin}"',
|
|
356
|
+
websiteTitle: "Global option already defined",
|
|
357
|
+
websiteDescription: "The global option is already defined by another plugin. Please ensure that global options are uniquely named to avoid conflicts.",
|
|
358
|
+
},
|
|
359
|
+
INVALID_CONFIG: {
|
|
360
|
+
number: 15,
|
|
361
|
+
messageTemplate: `Invalid config:
|
|
163
362
|
{errors}`,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
363
|
+
websiteTitle: "Invalid config",
|
|
364
|
+
websiteDescription: `The configuration you provided is invalid. Please check the documentation to learn how to configure Hardhat correctly.`,
|
|
365
|
+
},
|
|
366
|
+
TEMPLATE_NOT_FOUND: {
|
|
367
|
+
number: 16,
|
|
368
|
+
messageTemplate: `Template "{template}" not found`,
|
|
369
|
+
websiteTitle: "Template not found",
|
|
370
|
+
websiteDescription: `The template you provided is not found. Please check the documentation to learn which templates are available.`,
|
|
371
|
+
},
|
|
372
|
+
WORKSPACE_MUST_BE_A_DIRECTORY: {
|
|
373
|
+
number: 17,
|
|
374
|
+
messageTemplate: `Workspace "{workspace}" must be a directory`,
|
|
375
|
+
websiteTitle: "Workspace must be a directory",
|
|
376
|
+
websiteDescription: `The workspace you provided is not a directory. Please ensure that the workspace is a directory and try again.`,
|
|
377
|
+
},
|
|
378
|
+
INVALID_HEX_STRING: {
|
|
379
|
+
number: 18,
|
|
380
|
+
messageTemplate: `Invalid hex string "{value}"`,
|
|
381
|
+
websiteTitle: "Invalid hex string",
|
|
382
|
+
websiteDescription: `Given value was not a valid hex string.`,
|
|
383
|
+
},
|
|
384
|
+
CONFIG_VARIABLE_FORMAT_MUST_INCLUDE_VARIABLE: {
|
|
385
|
+
number: 19,
|
|
386
|
+
messageTemplate: `The format string "{format}" must include {marker} marker`,
|
|
387
|
+
websiteTitle: "Config variable format must include \\{variable\\}",
|
|
388
|
+
websiteDescription: `The config variable format must include the string "\\{variable\\}", which will be replaced with the actual value of the variable.`,
|
|
389
|
+
},
|
|
390
|
+
INVALID_FULLY_QUALIFIED_NAME: {
|
|
391
|
+
number: 20,
|
|
392
|
+
messageTemplate: `Invalid fully qualified contract name "{name}"`,
|
|
393
|
+
websiteTitle: "Invalid fully qualified contract name",
|
|
394
|
+
websiteDescription: `A contract name was expected to be in fully qualified form, but it's not.
|
|
395
|
+
|
|
396
|
+
A fully qualified name should look like file.sol:Contract`,
|
|
397
|
+
},
|
|
398
|
+
INVALID_CONFIG_FILE: {
|
|
399
|
+
number: 21,
|
|
400
|
+
messageTemplate: `Invalid Hardhat config file at {configPath}:
|
|
401
|
+
{errors}`,
|
|
402
|
+
websiteTitle: "Invalid Hardhat config file",
|
|
403
|
+
websiteDescription: `The config file has JS/TS errors.
|
|
404
|
+
|
|
405
|
+
Please resolve the errors before rerunning the command.`,
|
|
406
|
+
},
|
|
184
407
|
},
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
websiteDescription: `An internal invariant was violated. This is probably caused by a programming error in Hardhat or in one of the used plugins.
|
|
408
|
+
INTERNAL: {
|
|
409
|
+
ASSERTION_ERROR: {
|
|
410
|
+
number: 100,
|
|
411
|
+
messageTemplate: "An internal invariant was violated: {message}",
|
|
412
|
+
websiteTitle: "Invariant violation",
|
|
413
|
+
websiteDescription: `An internal invariant was violated. This is probably caused by a programming error in Hardhat or in one of the used plugins.
|
|
192
414
|
|
|
193
415
|
Please [report it](https://github.com/nomiclabs/hardhat/issues/new) to help us improve Hardhat.`,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
416
|
+
shouldBeReported: true,
|
|
417
|
+
},
|
|
418
|
+
NOT_IMPLEMENTED_ERROR: {
|
|
419
|
+
number: 101,
|
|
420
|
+
messageTemplate: "Not implemented: {message}",
|
|
421
|
+
websiteTitle: "Not implemented",
|
|
422
|
+
websiteDescription: `A code path that has not been implemented was unexpectedly triggered.
|
|
201
423
|
|
|
202
424
|
Please [report it](https://github.com/nomiclabs/hardhat/issues/new) to help us improve Hardhat.`,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
425
|
+
shouldBeReported: true,
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
PLUGINS: {
|
|
429
|
+
PLUGIN_NOT_INSTALLED: {
|
|
430
|
+
number: 200,
|
|
431
|
+
messageTemplate: 'Plugin "{pluginId}" is not installed.',
|
|
432
|
+
websiteTitle: "Plugin not installed",
|
|
433
|
+
websiteDescription: `A plugin was included in the Hardhat config but has not been installed into "node_modules".`,
|
|
434
|
+
},
|
|
435
|
+
PLUGIN_MISSING_DEPENDENCY: {
|
|
436
|
+
number: 201,
|
|
437
|
+
messageTemplate: 'Plugin "{pluginId}" is missing a peer dependency "{peerDependencyName}".',
|
|
438
|
+
websiteTitle: "Plugin missing peer dependency",
|
|
439
|
+
websiteDescription: `A plugin's peer dependency has not been installed.`,
|
|
440
|
+
},
|
|
441
|
+
DEPENDENCY_VERSION_MISMATCH: {
|
|
442
|
+
number: 202,
|
|
443
|
+
messageTemplate: 'Plugin "{pluginId}" has a peer dependency "{peerDependencyName}" with expected version "{expectedVersion}" but the installed version is "{installedVersion}".',
|
|
444
|
+
websiteTitle: "Dependency version mismatch",
|
|
445
|
+
websiteDescription: `A plugin's peer dependency expected version does not match the version of the installed package.
|
|
224
446
|
|
|
225
447
|
Please install a version of the peer dependency that meets the plugin's requirements.`,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
448
|
+
},
|
|
449
|
+
PLUGIN_DEPENDENCY_FAILED_LOAD: {
|
|
450
|
+
number: 203,
|
|
451
|
+
messageTemplate: 'Plugin "{pluginId}" dependency could not be loaded.',
|
|
452
|
+
websiteTitle: "Plugin dependency could not be loaded",
|
|
453
|
+
websiteDescription: `The loading of a plugin's dependent plugin failed.`,
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
HOOKS: {
|
|
457
|
+
INVALID_HOOK_FACTORY_PATH: {
|
|
458
|
+
number: 300,
|
|
459
|
+
messageTemplate: 'Plugin "{pluginId}" hook factory for "{hookCategoryName}" is not a valid file:// URL: {path}.',
|
|
460
|
+
websiteTitle: "Plugin hook factory is not a valid file URL",
|
|
461
|
+
websiteDescription: `The loading of a plugin's hook factory failed as the import path is not a valid file:// URL.`,
|
|
462
|
+
},
|
|
463
|
+
UNEXPECTED_HOOK_PARAM_MODIFICATION: {
|
|
464
|
+
number: 301,
|
|
465
|
+
messageTemplate: `Parameter "{paramName}" of hook "{hookCategoryName}#{hookName}" is not allowed to be modified`,
|
|
466
|
+
websiteTitle: "Unexpected hook parameter modification",
|
|
467
|
+
websiteDescription: `The parameter is not allowed to be modified`,
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
TASK_DEFINITIONS: {
|
|
471
|
+
INVALID_FILE_ACTION: {
|
|
472
|
+
number: 400,
|
|
473
|
+
messageTemplate: "Invalid file action: {action} is not a valid file URL",
|
|
474
|
+
websiteTitle: "Invalid file action",
|
|
475
|
+
websiteDescription: `The setAction function was called with a string parameter that is not a valid file URL. A valid file URL must start with 'file://'.
|
|
248
476
|
|
|
249
477
|
Please ensure that you are providing a correct file URL.`,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
478
|
+
},
|
|
479
|
+
NO_ACTION: {
|
|
480
|
+
number: 401,
|
|
481
|
+
messageTemplate: `The task "{task}" doesn't have an action`,
|
|
482
|
+
websiteTitle: "Task missing action",
|
|
483
|
+
websiteDescription: `A task was defined without an action.
|
|
256
484
|
|
|
257
485
|
Please ensure that an action is defined for each task.`,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
486
|
+
},
|
|
487
|
+
POSITIONAL_ARG_AFTER_VARIADIC: {
|
|
488
|
+
number: 402,
|
|
489
|
+
messageTemplate: 'Cannot add the positional argument "{name}" after a variadic one',
|
|
490
|
+
websiteTitle: "Invalid task definition",
|
|
491
|
+
websiteDescription: "A variadic argument must always be the last positional argument in a task definition.",
|
|
492
|
+
},
|
|
493
|
+
REQUIRED_ARG_AFTER_OPTIONAL: {
|
|
494
|
+
number: 403,
|
|
495
|
+
messageTemplate: 'Cannot add required positional argument "{name}" after an optional one',
|
|
496
|
+
websiteTitle: "Invalid task definition",
|
|
497
|
+
websiteDescription: "Required positional arguments must be defined before optional ones in a task definition.",
|
|
498
|
+
},
|
|
499
|
+
TASK_NOT_FOUND: {
|
|
500
|
+
number: 404,
|
|
501
|
+
messageTemplate: 'Task "{task}" not found',
|
|
502
|
+
websiteTitle: "Task not found",
|
|
503
|
+
websiteDescription: "The provided task name does not match any task.",
|
|
504
|
+
},
|
|
505
|
+
SUBTASK_WITHOUT_PARENT: {
|
|
506
|
+
number: 405,
|
|
507
|
+
messageTemplate: 'Task "{task}" not found when attempting to define subtask "{subtask}". If you intend to only define subtasks, please first define "{task}" as an empty task',
|
|
508
|
+
websiteTitle: "Subtask without parent",
|
|
509
|
+
websiteDescription: "The parent task of the subtask being defined was not found. If you intend to only define subtasks, please first define the parent task as an empty task.",
|
|
510
|
+
},
|
|
511
|
+
TASK_ALREADY_DEFINED: {
|
|
512
|
+
number: 406,
|
|
513
|
+
messageTemplate: '{actorFragment} trying to define the task "{task}" but it is already defined{definedByFragment}',
|
|
514
|
+
websiteTitle: "Task already defined",
|
|
515
|
+
websiteDescription: "The task is already defined. Please ensure that tasks are uniquely named to avoid conflicts.",
|
|
516
|
+
},
|
|
517
|
+
EMPTY_TASK_ID: {
|
|
518
|
+
number: 407,
|
|
519
|
+
messageTemplate: "Task id cannot be an empty string or an empty array",
|
|
520
|
+
websiteTitle: "Empty task id",
|
|
521
|
+
websiteDescription: "The task id cannot be an empty string or an empty array. Please ensure that the array of task names is not empty.",
|
|
522
|
+
},
|
|
523
|
+
TASK_OPTION_ALREADY_DEFINED: {
|
|
524
|
+
number: 408,
|
|
525
|
+
messageTemplate: '{actorFragment} trying to define task "{task}" with the option "{option}" but it is already defined as a global option by plugin "{globalOptionPluginId}"',
|
|
526
|
+
websiteTitle: "Task option already defined",
|
|
527
|
+
websiteDescription: "The task option is already defined as a global option by another plugin. Please ensure that task options are uniquely named to avoid conflicts.",
|
|
528
|
+
},
|
|
529
|
+
TASK_OVERRIDE_OPTION_ALREADY_DEFINED: {
|
|
530
|
+
number: 409,
|
|
531
|
+
messageTemplate: '{actorFragment} trying to override the option "{option}" of the task "{task}" but it is already defined',
|
|
532
|
+
websiteTitle: "Task override option already defined",
|
|
533
|
+
websiteDescription: "An attempt is being made to override an option that has already been defined. Please ensure that the option is not defined before trying to override it.",
|
|
534
|
+
},
|
|
535
|
+
EMPTY_TASK: {
|
|
536
|
+
number: 410,
|
|
537
|
+
messageTemplate: `Can't run the empty task "{task}"`,
|
|
538
|
+
websiteTitle: "Empty task",
|
|
539
|
+
websiteDescription: "The task is empty. Please ensure that tasks have at least one action.",
|
|
540
|
+
},
|
|
541
|
+
INVALID_ACTION_IMPORT: {
|
|
542
|
+
number: 411,
|
|
543
|
+
messageTemplate: 'Unable to import the action for task "{task}".',
|
|
544
|
+
websiteTitle: "Unable to import action for task",
|
|
545
|
+
websiteDescription: "Unable to import action for task. Please verify that the the file exists and that it provides a default function export.",
|
|
546
|
+
},
|
|
547
|
+
INVALID_ACTION: {
|
|
548
|
+
number: 412,
|
|
549
|
+
messageTemplate: 'The action resolved in task "{task}" is not a function',
|
|
550
|
+
websiteTitle: "Invalid action",
|
|
551
|
+
websiteDescription: "The action of the task is not a function. Make sure that the file pointed to by the action URL exports a function as the default export.",
|
|
552
|
+
},
|
|
553
|
+
MISSING_VALUE_FOR_TASK_ARGUMENT: {
|
|
554
|
+
number: 413,
|
|
555
|
+
messageTemplate: 'Missing value for the argument named "{argument}" in the task "{task}"',
|
|
556
|
+
websiteTitle: "Missing value for the task argument",
|
|
557
|
+
websiteDescription: `You tried to run a task, but one of the values of its arguments was missing.
|
|
330
558
|
|
|
331
559
|
Please double check how you invoked Hardhat or ran your task.`,
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
560
|
+
},
|
|
561
|
+
INVALID_VALUE_FOR_TYPE: {
|
|
562
|
+
number: 414,
|
|
563
|
+
messageTemplate: 'Invalid value "{value}" for argument "{name}" of type "{type}" in the task "{task}"',
|
|
564
|
+
websiteTitle: "Invalid argument type",
|
|
565
|
+
websiteDescription: `One of your task arguments has an invalid type.
|
|
338
566
|
|
|
339
567
|
Please double check your task arguments.`,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
568
|
+
},
|
|
569
|
+
UNRECOGNIZED_TASK_OPTION: {
|
|
570
|
+
number: 415,
|
|
571
|
+
messageTemplate: 'Invalid option "{option}" for the task "{task}"',
|
|
572
|
+
websiteTitle: "Invalid option value",
|
|
573
|
+
websiteDescription: `One of the options for your task is invalid.
|
|
346
574
|
|
|
347
575
|
Please double check your arguments.`,
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
576
|
+
},
|
|
577
|
+
UNRECOGNIZED_SUBTASK: {
|
|
578
|
+
number: 416,
|
|
579
|
+
messageTemplate: 'Unrecognized subtask "{invalidSubtask}" for the task "{task}"',
|
|
580
|
+
websiteTitle: "Unrecognized subtask",
|
|
581
|
+
websiteDescription: `The subtask for the task you provided is not recognized.
|
|
354
582
|
|
|
355
583
|
Please check you have the correct subtask.`,
|
|
584
|
+
},
|
|
356
585
|
},
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
websiteDescription: `One of your Hardhat or task arguments has an invalid type.
|
|
586
|
+
ARGUMENTS: {
|
|
587
|
+
INVALID_VALUE_FOR_TYPE: {
|
|
588
|
+
number: 500,
|
|
589
|
+
messageTemplate: 'Invalid value "{value}" for argument "{name}" of type "{type}"',
|
|
590
|
+
websiteTitle: "Invalid argument type",
|
|
591
|
+
websiteDescription: `One of your Hardhat or task arguments has an invalid type.
|
|
364
592
|
|
|
365
593
|
Please double check your arguments.`,
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
594
|
+
},
|
|
595
|
+
RESERVED_NAME: {
|
|
596
|
+
number: 501,
|
|
597
|
+
messageTemplate: 'Argument name "{name}" is reserved',
|
|
598
|
+
websiteTitle: "Reserved argument name",
|
|
599
|
+
websiteDescription: `One of your Hardhat or task arguments has a reserved name.
|
|
372
600
|
|
|
373
601
|
Please double check your arguments.`,
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
602
|
+
},
|
|
603
|
+
DUPLICATED_NAME: {
|
|
604
|
+
number: 502,
|
|
605
|
+
messageTemplate: 'Argument name "{name}" is already in use',
|
|
606
|
+
websiteTitle: "Argument name already in use",
|
|
607
|
+
websiteDescription: `One of your Hardhat or task argument names is already in use.
|
|
380
608
|
|
|
381
609
|
Please double check your arguments.`,
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
610
|
+
},
|
|
611
|
+
INVALID_NAME: {
|
|
612
|
+
number: 503,
|
|
613
|
+
messageTemplate: `Argument name "{name}" is invalid. It must consist only of alphanumeric characters and cannot start with a number.`,
|
|
614
|
+
websiteTitle: "Invalid argument name",
|
|
615
|
+
websiteDescription: `One of your Hardhat or task argument names is invalid.
|
|
388
616
|
|
|
389
617
|
Please double check your arguments.`,
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
618
|
+
},
|
|
619
|
+
UNRECOGNIZED_OPTION: {
|
|
620
|
+
number: 504,
|
|
621
|
+
messageTemplate: 'Invalid option "{option}". It is neither a valid global option nor associated with any task. Did you forget to add the task first, or did you misspell it?',
|
|
622
|
+
websiteTitle: "Invalid option value",
|
|
623
|
+
websiteDescription: `One of your Hardhat options is invalid.
|
|
396
624
|
|
|
397
625
|
Please double check your arguments.`,
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
626
|
+
},
|
|
627
|
+
MISSING_VALUE_FOR_ARGUMENT: {
|
|
628
|
+
number: 505,
|
|
629
|
+
messageTemplate: 'Missing value for the task argument named "{argument}"',
|
|
630
|
+
websiteTitle: "Missing value for the task argument",
|
|
631
|
+
websiteDescription: `You tried to run a task, but one of the values of its arguments was missing.
|
|
404
632
|
|
|
405
633
|
Please double check how you invoked Hardhat or ran your task.`,
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
634
|
+
},
|
|
635
|
+
UNUSED_ARGUMENT: {
|
|
636
|
+
number: 506,
|
|
637
|
+
messageTemplate: 'The argument with value "{value}" was not consumed because it is not associated with any task.',
|
|
638
|
+
websiteTitle: "Argument was not consumed",
|
|
639
|
+
websiteDescription: `You tried to run a task, but one of your arguments was not consumed.
|
|
412
640
|
|
|
413
641
|
Please double check how you invoked Hardhat or ran your task.`,
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
642
|
+
},
|
|
643
|
+
MISSING_CONFIG_FILE: {
|
|
644
|
+
number: 507,
|
|
645
|
+
messageTemplate: 'The global option "--config" was passed, but no file path was provided.',
|
|
646
|
+
websiteTitle: "Missing configuration file path",
|
|
647
|
+
websiteDescription: `A path to the configuration file is expected after the global option "--config", but none was provided.
|
|
420
648
|
|
|
421
649
|
Please double check your arguments.`,
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
650
|
+
},
|
|
651
|
+
CANNOT_COMBINE_INIT_AND_CONFIG_PATH: {
|
|
652
|
+
number: 508,
|
|
653
|
+
messageTemplate: 'The global option "--config" cannot be used with the "init" command',
|
|
654
|
+
websiteTitle: 'The global option "--config" cannot be used with the "init" command',
|
|
655
|
+
websiteDescription: `The global option "--config" cannot be used with the "init" command.
|
|
428
656
|
|
|
429
657
|
Please double check your arguments.`,
|
|
658
|
+
},
|
|
659
|
+
CANNOT_GROUP_OPTIONS: {
|
|
660
|
+
number: 509,
|
|
661
|
+
messageTemplate: 'Invalid option "{option}". Options cannot be grouped together. Try providing the options separately.',
|
|
662
|
+
websiteTitle: "Options grouping is not supported",
|
|
663
|
+
websiteDescription: `Options cannot be grouped together.
|
|
664
|
+
|
|
665
|
+
Please double check your arguments, and try providing the options separately.`,
|
|
666
|
+
},
|
|
667
|
+
CANNOT_REPEAT_OPTIONS: {
|
|
668
|
+
number: 510,
|
|
669
|
+
messageTemplate: 'Invalid option "{option}". Options of type "{type}" cannot be repeated.',
|
|
670
|
+
websiteTitle: "Options repetition is not supported",
|
|
671
|
+
websiteDescription: `Some options cannot be repeated.
|
|
672
|
+
|
|
673
|
+
Please double check your arguments.`,
|
|
674
|
+
},
|
|
675
|
+
INVALID_SHORT_NAME: {
|
|
676
|
+
number: 511,
|
|
677
|
+
messageTemplate: `Argument short name "{name}" is invalid. It must consist of exactly one letter.`,
|
|
678
|
+
websiteTitle: "Invalid short argument name",
|
|
679
|
+
websiteDescription: `One of your Hardhat or task short argument names is invalid.
|
|
680
|
+
|
|
681
|
+
Please double check your arguments.`,
|
|
682
|
+
},
|
|
430
683
|
},
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
websiteDescription: `Tried to use \`hardhat run\` to execute a nonexistent script.
|
|
684
|
+
BUILTIN_TASKS: {
|
|
685
|
+
RUN_FILE_NOT_FOUND: {
|
|
686
|
+
number: 600,
|
|
687
|
+
messageTemplate: `Script "{script}" doesn't exist`,
|
|
688
|
+
websiteTitle: "Script doesn't exist",
|
|
689
|
+
websiteDescription: `Tried to use \`hardhat run\` to execute a nonexistent script.
|
|
438
690
|
|
|
439
691
|
Please double check your script's path.`,
|
|
692
|
+
},
|
|
440
693
|
},
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
},
|
|
448
|
-
NETWORK: {
|
|
449
|
-
INVALID_URL: {
|
|
450
|
-
number: 700,
|
|
451
|
-
messageTemplate: 'Invalid URL "{value}" for network or forking.',
|
|
452
|
-
websiteTitle: "Invalid URL for network or forking",
|
|
453
|
-
websiteDescription: `You are trying to connect to a network with an invalid network or forking URL.
|
|
694
|
+
NETWORK: {
|
|
695
|
+
INVALID_URL: {
|
|
696
|
+
number: 700,
|
|
697
|
+
messageTemplate: 'Invalid URL "{value}" for network or forking.',
|
|
698
|
+
websiteTitle: "Invalid URL for network or forking",
|
|
699
|
+
websiteDescription: `You are trying to connect to a network with an invalid network or forking URL.
|
|
454
700
|
|
|
455
701
|
Please check that you are sending a valid URL string for the network or forking \`URL\` parameter.`,
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
702
|
+
},
|
|
703
|
+
INVALID_REQUEST_PARAMS: {
|
|
704
|
+
number: 701,
|
|
705
|
+
messageTemplate: "Invalid request arguments: only array parameters are supported.",
|
|
706
|
+
websiteTitle: "Invalid method parameters",
|
|
707
|
+
websiteDescription: "The JSON-RPC request parameters are invalid. You are trying to make an EIP-1193 request with object parameters, but only array parameters are supported. Ensure that the 'params' parameter is correctly specified as an array in your JSON-RPC request.",
|
|
708
|
+
},
|
|
709
|
+
INVALID_JSON_RESPONSE: {
|
|
710
|
+
number: 702,
|
|
711
|
+
messageTemplate: "Invalid JSON-RPC response received: {response}",
|
|
712
|
+
websiteTitle: "Invalid JSON-RPC response",
|
|
713
|
+
websiteDescription: `One of your JSON-RPC requests received an invalid response.
|
|
468
714
|
|
|
469
715
|
Please make sure your node is running, and check your internet connection and networks config.`,
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
716
|
+
},
|
|
717
|
+
CONNECTION_REFUSED: {
|
|
718
|
+
number: 703,
|
|
719
|
+
messageTemplate: `Cannot connect to the network "{network}".
|
|
474
720
|
Please make sure your node is running, and check your internet connection and networks config`,
|
|
475
|
-
|
|
476
|
-
|
|
721
|
+
websiteTitle: "Cannot connect to the network",
|
|
722
|
+
websiteDescription: `Cannot connect to the network.
|
|
477
723
|
|
|
478
724
|
Please make sure your node is running, and check your internet connection and networks config.`,
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
725
|
+
},
|
|
726
|
+
NETWORK_TIMEOUT: {
|
|
727
|
+
number: 704,
|
|
728
|
+
messageTemplate: `Network connection timed out.
|
|
483
729
|
Please check your internet connection and networks config`,
|
|
484
|
-
|
|
485
|
-
|
|
730
|
+
websiteTitle: "Network timeout",
|
|
731
|
+
websiteDescription: `One of your JSON-RPC requests timed out.
|
|
486
732
|
|
|
487
733
|
Please make sure your node is running, and check your internet connection and networks config.`,
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
734
|
+
},
|
|
735
|
+
NETWORK_NOT_FOUND: {
|
|
736
|
+
number: 705,
|
|
737
|
+
messageTemplate: `The network "{networkName}" is not defined in your networks config.`,
|
|
738
|
+
websiteTitle: "Network not found",
|
|
739
|
+
websiteDescription: `The network you are trying to connect to is not found.
|
|
494
740
|
|
|
495
741
|
Please double check that the network is correctly defined in your networks config.`,
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
742
|
+
},
|
|
743
|
+
INVALID_CHAIN_TYPE: {
|
|
744
|
+
number: 706,
|
|
745
|
+
messageTemplate: `The provided chain type "{chainType}" does not match the network's chain type "{networkChainType}" for network "{networkName}".`,
|
|
746
|
+
websiteTitle: "Invalid chain type",
|
|
747
|
+
websiteDescription: `The chain type does not match the network's chain type.
|
|
502
748
|
|
|
503
749
|
If you want to use a different chain type, please update your networks config.`,
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
750
|
+
},
|
|
751
|
+
INVALID_CONFIG_OVERRIDE: {
|
|
752
|
+
number: 707,
|
|
753
|
+
messageTemplate: `Invalid config override:
|
|
508
754
|
{errors}`,
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
755
|
+
websiteTitle: "Invalid config override",
|
|
756
|
+
websiteDescription: `The configuration override you provided is invalid.`,
|
|
757
|
+
},
|
|
758
|
+
INVALID_GLOBAL_CHAIN_ID: {
|
|
759
|
+
number: 708,
|
|
760
|
+
messageTemplate: 'Hardhat was set to use chain id "{configChainId}", but connected to a chain with id "{connectionChainId}".',
|
|
761
|
+
websiteTitle: "Invalid global chain id",
|
|
762
|
+
websiteDescription: `Hardhat was set to use a chain id but connected to a chain with a different id`,
|
|
763
|
+
},
|
|
764
|
+
NO_REMOTE_ACCOUNT_AVAILABLE: {
|
|
765
|
+
number: 709,
|
|
766
|
+
messageTemplate: "No local account was set and there are accounts in the remote node.",
|
|
767
|
+
websiteTitle: "No remote account available",
|
|
768
|
+
websiteDescription: "No local account was set and there are accounts in the remote node",
|
|
769
|
+
},
|
|
770
|
+
ETHSIGN_MISSING_DATA_PARAM: {
|
|
771
|
+
number: 710,
|
|
772
|
+
messageTemplate: `Missing "data" param when calling eth_sign.`,
|
|
773
|
+
websiteTitle: `Missing "data" param when calling eth_sign`,
|
|
774
|
+
websiteDescription: `You called "eth_sign" with incorrect parameters.
|
|
529
775
|
|
|
530
776
|
Please check that you are sending a "data" parameter.`,
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
777
|
+
},
|
|
778
|
+
PERSONALSIGN_MISSING_ADDRESS_PARAM: {
|
|
779
|
+
number: 711,
|
|
780
|
+
messageTemplate: `Missing "address" param when calling personal_sign.`,
|
|
781
|
+
websiteTitle: `Missing "address" param when calling personal_sign`,
|
|
782
|
+
websiteDescription: `You called "personal_sign" with incorrect parameters.
|
|
537
783
|
|
|
538
784
|
Please check that you are sending an "address" parameter.`,
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
785
|
+
},
|
|
786
|
+
ETHSIGN_TYPED_DATA_V4_INVALID_DATA_PARAM: {
|
|
787
|
+
number: 712,
|
|
788
|
+
messageTemplate: `Invalid "data" param when calling eth_signTypedData_v4.`,
|
|
789
|
+
websiteTitle: `Invalid "data" param when calling eth_signTypedData_v4`,
|
|
790
|
+
websiteDescription: `You called "eth_signTypedData_v4" with incorrect parameters.
|
|
545
791
|
|
|
546
792
|
Please check that you are sending a "data" parameter with a JSON string or object conforming to EIP712 TypedData schema.`,
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
793
|
+
},
|
|
794
|
+
MISSING_TX_PARAM_TO_SIGN_LOCALLY: {
|
|
795
|
+
number: 713,
|
|
796
|
+
messageTemplate: `Missing param "{param}" from a tx being signed locally.`,
|
|
797
|
+
websiteTitle: "Missing transaction parameter",
|
|
798
|
+
websiteDescription: `You are trying to send a transaction with a locally managed account, and some parameters are missing.
|
|
553
799
|
|
|
554
800
|
Please double check your transactions' parameters.`,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
801
|
+
},
|
|
802
|
+
MISSING_FEE_PRICE_FIELDS: {
|
|
803
|
+
number: 714,
|
|
804
|
+
messageTemplate: "Tried to sign a transaction locally, but gasPrice, maxFeePerGas, and maxPriorityFeePerGas were missing.",
|
|
805
|
+
websiteTitle: "Missing fee price parameters",
|
|
806
|
+
websiteDescription: `You are trying to send a transaction with a locally managed account, and no fee price parameters were provided. You need to send gasPrice, or maxFeePerGas and maxPriorityFeePerGas.
|
|
561
807
|
|
|
562
808
|
Please double check your transactions' parameters.`,
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
809
|
+
},
|
|
810
|
+
INCOMPATIBLE_FEE_PRICE_FIELDS: {
|
|
811
|
+
number: 715,
|
|
812
|
+
messageTemplate: "An incompatible transaction with gasPrice and EIP-1559 fee price fields.",
|
|
813
|
+
websiteTitle: "Incompatible fee price parameters",
|
|
814
|
+
websiteDescription: `You are trying to send a transaction with a locally managed account, and its parameters are incompatible. You sent both gasPrice, and maxFeePerGas or maxPriorityFeePerGas.
|
|
569
815
|
|
|
570
816
|
Please double check your transactions' parameters.`,
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
817
|
+
},
|
|
818
|
+
NOT_LOCAL_ACCOUNT: {
|
|
819
|
+
number: 716,
|
|
820
|
+
messageTemplate: `Account "{account}" is not managed by the node you are connected to.`,
|
|
821
|
+
websiteTitle: "Unrecognized account",
|
|
822
|
+
websiteDescription: `You are trying to send a transaction or sign some data with an account not managed by your Ethereum node nor Hardhat.
|
|
577
823
|
|
|
578
824
|
Please double check your accounts and the "from" parameter in your RPC calls.`,
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
825
|
+
},
|
|
826
|
+
INVALID_HD_PATH: {
|
|
827
|
+
number: 717,
|
|
828
|
+
messageTemplate: `HD path "{path}" is invalid. Read about BIP32 to know about the valid forms.`,
|
|
829
|
+
websiteTitle: "Invalid HD path",
|
|
830
|
+
websiteDescription: `An invalid HD/BIP32 derivation path was provided in your config.
|
|
585
831
|
|
|
586
832
|
Read the [documentation](https://hardhat.org/hardhat-runner/docs/config#hd-wallet-config) to learn how to define HD accounts correctly.`,
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
833
|
+
},
|
|
834
|
+
CANT_DERIVE_KEY: {
|
|
835
|
+
number: 718,
|
|
836
|
+
messageTemplate: `Cannot derive key "{path}" from mnemonic "{mnemonic}". Try using another mnemonic or deriving fewer keys.`,
|
|
837
|
+
websiteTitle: "Could not derive an HD key",
|
|
838
|
+
websiteDescription: `One of your HD keys could not be derived.
|
|
593
839
|
|
|
594
840
|
Try using another mnemonic or deriving less keys.`,
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
websiteDescription: "The password you provided is incorrect or the keystore file is corrupted.",
|
|
627
|
-
},
|
|
628
|
-
},
|
|
629
|
-
NETWORK_HELPERS: {
|
|
630
|
-
ONLY_ALLOW_0X_PREFIXED_STRINGS: {
|
|
631
|
-
number: 900,
|
|
632
|
-
messageTemplate: `Only hex-encoded strings prefixed with "0x" are accepted`,
|
|
633
|
-
websiteTitle: `Only hex-encoded strings prefixed with "0x" are accepted`,
|
|
634
|
-
websiteDescription: `Only hex-encoded strings prefixed with "0x" are accepted`,
|
|
635
|
-
},
|
|
636
|
-
CANNOT_CONVERT_TO_RPC_QUANTITY: {
|
|
637
|
-
number: 901,
|
|
638
|
-
messageTemplate: `The value "{value}" cannot be converted into an RPC quantity`,
|
|
639
|
-
websiteTitle: "Cannot converted into an RPC quantity",
|
|
640
|
-
websiteDescription: "The value cannot be converted into an RPC quantity",
|
|
641
|
-
},
|
|
642
|
-
INVALID_HEX_STRING: {
|
|
643
|
-
number: 902,
|
|
644
|
-
messageTemplate: `"{value}" is not a valid hex string`,
|
|
645
|
-
websiteTitle: "Invalid hex string",
|
|
646
|
-
websiteDescription: "The value is not a valid hex string",
|
|
647
|
-
},
|
|
648
|
-
INVALID_TX_HASH: {
|
|
649
|
-
number: 903,
|
|
650
|
-
messageTemplate: `"{value}" is not a valid transaction hash`,
|
|
651
|
-
websiteTitle: "Invalid transaction hash",
|
|
652
|
-
websiteDescription: "The value is not a valid transaction hash",
|
|
653
|
-
},
|
|
654
|
-
INVALID_ADDRESS: {
|
|
655
|
-
number: 904,
|
|
656
|
-
messageTemplate: `"{value}" is not a valid address`,
|
|
657
|
-
websiteTitle: "Invalid address",
|
|
658
|
-
websiteDescription: "The value is not a valid address",
|
|
659
|
-
},
|
|
660
|
-
INVALID_CHECKSUM_ADDRESS: {
|
|
661
|
-
number: 905,
|
|
662
|
-
messageTemplate: `Address "{value}" has an invalid checksum`,
|
|
663
|
-
websiteTitle: "Invalid checksum address",
|
|
664
|
-
websiteDescription: "The address has an invalid checksum",
|
|
665
|
-
},
|
|
666
|
-
BLOCK_NUMBER_SMALLER_THAN_CURRENT: {
|
|
667
|
-
number: 906,
|
|
668
|
-
messageTemplate: `The block number "{newValue}" is smaller than the current block number "{currentValue}"`,
|
|
669
|
-
websiteTitle: "Block number smaller than the current block number",
|
|
670
|
-
websiteDescription: "The block number is smaller than the current block number",
|
|
671
|
-
},
|
|
672
|
-
EVM_SNAPSHOT_VALUE_NOT_A_STRING: {
|
|
673
|
-
number: 907,
|
|
674
|
-
messageTemplate: `The value returned by evm_snapshot should be a string`,
|
|
675
|
-
websiteTitle: "The evm_snapshot value should be a string",
|
|
676
|
-
websiteDescription: "The value returned by evm_snapshot should be a string",
|
|
677
|
-
},
|
|
678
|
-
EVM_REVERT_VALUE_NOT_A_BOOLEAN: {
|
|
679
|
-
number: 908,
|
|
680
|
-
messageTemplate: `The value returned by evm_revert should be a boolean`,
|
|
681
|
-
websiteTitle: "The evm_revert value should be a boolean",
|
|
682
|
-
websiteDescription: "The value returned by evm_revert should be a boolean",
|
|
683
|
-
},
|
|
684
|
-
INVALID_SNAPSHOT: {
|
|
685
|
-
number: 909,
|
|
686
|
-
messageTemplate: `Trying to restore an invalid snapshot.`,
|
|
687
|
-
websiteTitle: "Trying to restore an invalid snapshot.",
|
|
688
|
-
websiteDescription: "Trying to restore an invalid snapshot.",
|
|
689
|
-
},
|
|
690
|
-
EXPECTED_NON_NEGATIVE_NUMBER: {
|
|
691
|
-
number: 910,
|
|
692
|
-
messageTemplate: `Invalid input: expected a non-negative number but "{value}" was given.`,
|
|
693
|
-
websiteTitle: "Invalid input, expected a non-negative number",
|
|
694
|
-
websiteDescription: "Invalid input, expected a non-negative number",
|
|
695
|
-
},
|
|
696
|
-
CANNOT_CONVERT_NEGATIVE_NUMBER_TO_RPC_QUANTITY: {
|
|
697
|
-
number: 911,
|
|
698
|
-
messageTemplate: `Cannot convert negative number "{value}" to RPC quantity`,
|
|
699
|
-
websiteTitle: "Cannot convert negative number to RPC quantity",
|
|
700
|
-
websiteDescription: "Cannot convert negative number to RPC quantity",
|
|
701
|
-
},
|
|
702
|
-
FIXTURE_ANONYMOUS_FUNCTION_ERROR: {
|
|
703
|
-
number: 912,
|
|
704
|
-
messageTemplate: `Anonymous functions cannot be used as fixtures.
|
|
705
|
-
|
|
706
|
-
You probably did something like this:
|
|
707
|
-
|
|
708
|
-
loadFixture(async () => ... );
|
|
709
|
-
|
|
710
|
-
Instead, define a fixture function and refer to that same function in each call to loadFixture.
|
|
841
|
+
},
|
|
842
|
+
WRONG_VALIDATION_PARAMS: {
|
|
843
|
+
number: 719,
|
|
844
|
+
messageTemplate: "Validation of parameters against the schemas failed for the following reason: {reason}",
|
|
845
|
+
websiteTitle: "Invalid validation parameters",
|
|
846
|
+
websiteDescription: "The validation of parameters against the schemas failed.",
|
|
847
|
+
},
|
|
848
|
+
INVALID_NETWORK_TYPE: {
|
|
849
|
+
number: 720,
|
|
850
|
+
messageTemplate: 'The provided network type "{networkType}" for network "{networkName}" is not recognized, only `http` and `edr` are supported.',
|
|
851
|
+
websiteTitle: "Invalid network type",
|
|
852
|
+
websiteDescription: `The network manager only supports the network types 'http' and 'edr-simulated'.`,
|
|
853
|
+
},
|
|
854
|
+
DATA_FIELD_CANNOT_BE_NULL_WITH_NULL_ADDRESS: {
|
|
855
|
+
number: 721,
|
|
856
|
+
messageTemplate: `The "to" field is undefined, and the "data" field is also undefined; however, a transaction to the null address cannot have an undefined "data" field.`,
|
|
857
|
+
websiteTitle: "Transaction to null address cannot have undefined data",
|
|
858
|
+
websiteDescription: "The transaction to the null address cannot have undefined data",
|
|
859
|
+
},
|
|
860
|
+
PROVIDER_CLOSED: {
|
|
861
|
+
number: 722,
|
|
862
|
+
messageTemplate: "The provider has been closed.",
|
|
863
|
+
websiteTitle: "Provider closed",
|
|
864
|
+
websiteDescription: "The provider your are trying to use has been closed. Please create a new one using hre.network.connect() and try again.",
|
|
865
|
+
},
|
|
866
|
+
INCOMPATIBLE_EIP7702_FIELDS: {
|
|
867
|
+
number: 723,
|
|
868
|
+
messageTemplate: "An incompatible transaction with gasPrice and EIP-7702 fields.",
|
|
869
|
+
websiteTitle: "Incompatible EIP-7702 parameters",
|
|
870
|
+
websiteDescription: `You are trying to send a transaction with a locally managed
|
|
871
|
+
account, and its parameters are incompatible. You sent both gasPrice and authorizationList.
|
|
711
872
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
messageTemplate: `This helper can only be used with the Hardhat Network. You are connected to "{networkName}".`,
|
|
727
|
-
websiteTitle: "Hardhat network helpers can only be used with the Hardhat Network",
|
|
728
|
-
websiteDescription: "Hardhat network helpers can only be used with the Hardhat Network",
|
|
729
|
-
},
|
|
730
|
-
CAN_ONLY_BE_USED_WITH_HARDHAT_NETWORK_VERSIONED: {
|
|
731
|
-
number: 915,
|
|
732
|
-
messageTemplate: `This helper can only be used with the Hardhat Network. You are connected to "{networkName}", whose identifier is "{version}".`,
|
|
733
|
-
websiteTitle: "Hardhat network helpers can only be used with the Hardhat Network - version info",
|
|
734
|
-
websiteDescription: "Hardhat network helpers can only be used with the Hardhat Network",
|
|
735
|
-
},
|
|
736
|
-
},
|
|
737
|
-
SOLIDITY_TESTS: {
|
|
738
|
-
BUILD_INFO_NOT_FOUND_FOR_CONTRACT: {
|
|
739
|
-
number: 1000,
|
|
740
|
-
shouldBeReported: true,
|
|
741
|
-
messageTemplate: `Build info not found for contract "{fqn}"`,
|
|
742
|
-
websiteTitle: `Build info not found for contract`,
|
|
743
|
-
websiteDescription: `Build info not found for contract while compiling Solidity test contracts.`,
|
|
744
|
-
},
|
|
745
|
-
RUNNER_TIMEOUT: {
|
|
746
|
-
number: 1001,
|
|
747
|
-
messageTemplate: `Runner timed out after {duration} ms.
|
|
873
|
+
Please double check your transactions' parameters.`,
|
|
874
|
+
},
|
|
875
|
+
},
|
|
876
|
+
SOLIDITY_TESTS: {
|
|
877
|
+
BUILD_INFO_NOT_FOUND_FOR_CONTRACT: {
|
|
878
|
+
number: 800,
|
|
879
|
+
shouldBeReported: true,
|
|
880
|
+
messageTemplate: `Build info not found for contract "{fqn}"`,
|
|
881
|
+
websiteTitle: `Build info not found for contract`,
|
|
882
|
+
websiteDescription: `Build info not found for contract while compiling Solidity test contracts.`,
|
|
883
|
+
},
|
|
884
|
+
RUNNER_TIMEOUT: {
|
|
885
|
+
number: 801,
|
|
886
|
+
messageTemplate: `Runner timed out after {duration} ms.
|
|
748
887
|
|
|
749
888
|
Remaining test suites: {suites}`,
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
},
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
websiteDescription: "Event not supported",
|
|
766
|
-
},
|
|
767
|
-
ACCOUNT_INDEX_OUT_OF_RANGE: {
|
|
768
|
-
number: 1102,
|
|
769
|
-
messageTemplate: `Tried to get account with index {accountIndex} but there are only {accountsLength} accounts`,
|
|
770
|
-
websiteTitle: "Account index out of range",
|
|
771
|
-
websiteDescription: "Account index out of range",
|
|
772
|
-
},
|
|
773
|
-
BROADCASTED_TX_DIFFERENT_HASH: {
|
|
774
|
-
number: 1103,
|
|
775
|
-
messageTemplate: `Expected broadcasted transaction to have hash "{txHash}", but got "{broadcastedTxHash}"`,
|
|
776
|
-
websiteTitle: "Broadcasted transaction hash mismatch",
|
|
777
|
-
websiteDescription: "Broadcasted transaction hash mismatch",
|
|
778
|
-
},
|
|
779
|
-
CANNOT_GET_ACCOUNT: {
|
|
780
|
-
number: 1104,
|
|
781
|
-
messageTemplate: `Cannot get account with address "{address}"`,
|
|
782
|
-
websiteTitle: "Cannot get account",
|
|
783
|
-
websiteDescription: "Cannot get account",
|
|
784
|
-
},
|
|
785
|
-
INVALID_BLOCK_TAG: {
|
|
786
|
-
number: 1105,
|
|
787
|
-
messageTemplate: `Invalid block tag "{blockTag}"`,
|
|
788
|
-
websiteTitle: "Invalid block tag",
|
|
789
|
-
websiteDescription: "Invalid block tag",
|
|
790
|
-
},
|
|
791
|
-
INVALID_ARTIFACT_FOR_FACTORY: {
|
|
792
|
-
number: 1106,
|
|
793
|
-
messageTemplate: "You are trying to create a contract factory from an artifact, but you have not passed a valid artifact parameter.",
|
|
794
|
-
websiteTitle: "Invalid artifact for contract factory creation",
|
|
795
|
-
websiteDescription: "Invalid artifact for contract factory creation",
|
|
796
|
-
},
|
|
797
|
-
INVALID_ABSTRACT_CONTRACT_FOR_FACTORY: {
|
|
798
|
-
number: 1107,
|
|
799
|
-
messageTemplate: `You are trying to create a contract factory for the contract "{contractName}", which is abstract and can't be deployed. If you want to call a contract using "{contractName}" as its interface use the "getContractAt" function instead.`,
|
|
800
|
-
websiteTitle: "Invalid abstract contract for contract factory creation",
|
|
801
|
-
websiteDescription: "Invalid abstract contract for contract factory creation",
|
|
802
|
-
},
|
|
803
|
-
INVALID_ADDRESS_TO_LINK_CONTRACT_TO_LIBRARY: {
|
|
804
|
-
number: 1108,
|
|
805
|
-
messageTemplate: `You tried to link the contract "{contractName}" with the library "{linkedLibraryName}", but you provided this invalid address: {resolvedAddress}`,
|
|
806
|
-
websiteTitle: "Invalid address to link contract",
|
|
807
|
-
websiteDescription: "Invalid address to link contract",
|
|
808
|
-
},
|
|
809
|
-
LIBRARY_NOT_AMONG_CONTRACT_LIBRARIES: {
|
|
810
|
-
number: 1109,
|
|
811
|
-
messageTemplate: `You tried to link the contract "{contractName}" with the library "{linkedLibraryName}", which is not one of its libraries. Detailed message: {detailedMessage}`,
|
|
812
|
-
websiteTitle: "Library is not one of the contract libraries",
|
|
813
|
-
websiteDescription: "Library is not one of the contract libraries",
|
|
814
|
-
},
|
|
815
|
-
AMBIGUOUS_LIBRARY_NAME: {
|
|
816
|
-
number: 1110,
|
|
817
|
-
messageTemplate: `The library name "{linkedLibraryName}" is ambiguous for the contract "{contractName}". It may resolve to one of the following libraries: "{matchingNeededLibrariesFQNs}". To fix this, choose one of these fully qualified library names and replace where appropriate.`,
|
|
818
|
-
websiteTitle: "Ambiguous library name",
|
|
819
|
-
websiteDescription: "Ambiguous library name",
|
|
820
|
-
},
|
|
821
|
-
REFERENCE_TO_SAME_LIBRARY: {
|
|
822
|
-
number: 1111,
|
|
823
|
-
messageTemplate: `The library names "{linkedLibraryName1}" and "{linkedLibraryName2}" refer to the same library and were given as two separate library links. Remove one of them and review your library links before proceeding.`,
|
|
824
|
-
websiteTitle: "Reference to same library",
|
|
825
|
-
websiteDescription: "Reference to same library",
|
|
826
|
-
},
|
|
827
|
-
MISSING_LINK_FOR_LIBRARY: {
|
|
828
|
-
number: 1112,
|
|
829
|
-
messageTemplate: `The contract "{contractName}" is missing links for the following libraries: "{missingLibraries}". Learn more about linking contracts at (https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-ethers#library-linking).`,
|
|
830
|
-
websiteTitle: "Missing links for library",
|
|
831
|
-
websiteDescription: "Missing links for library",
|
|
832
|
-
},
|
|
833
|
-
UNSUPPORTED_TYPE_FOR_DEEP_COPY: {
|
|
834
|
-
number: 1113,
|
|
835
|
-
messageTemplate: `The value "{value}" with type "{type}" is not supported by the deepCopy function.`,
|
|
836
|
-
websiteTitle: "Unsupported type for deep copy",
|
|
837
|
-
websiteDescription: "Unsupported type for deep copy",
|
|
838
|
-
},
|
|
839
|
-
},
|
|
840
|
-
SOLIDITY: {
|
|
841
|
-
RESOLVING_INCORRECT_FILE_AS_PROJECT_FILE: {
|
|
842
|
-
number: 1200,
|
|
843
|
-
shouldBeReported: true,
|
|
844
|
-
messageTemplate: `File "{file}" is being resolved as a project file, but it's not part of the project.`,
|
|
845
|
-
websiteTitle: "Solidity project file is outside the project",
|
|
846
|
-
websiteDescription: `Tried to resolve a file as a project file, but it's not part of the project.`,
|
|
847
|
-
},
|
|
848
|
-
RESOLVING_NONEXISTENT_PROJECT_FILE: {
|
|
849
|
-
number: 1201,
|
|
850
|
-
shouldBeReported: true,
|
|
851
|
-
messageTemplate: `File "{file}" is being resolved as a project file, but it doesn't exist.`,
|
|
852
|
-
websiteTitle: "Solidity project file doesn't exist",
|
|
853
|
-
websiteDescription: `Tried to resolve a file as a project file, but it doesn't exist.`,
|
|
854
|
-
},
|
|
855
|
-
IMPORTED_FILE_DOESNT_EXIST: {
|
|
856
|
-
number: 1202,
|
|
857
|
-
messageTemplate: `The import "{importPath} from "{from}" doesn't exist.`,
|
|
858
|
-
websiteTitle: "Imported file doesn't exist",
|
|
859
|
-
websiteDescription: `An imported file doesn't exist.`,
|
|
860
|
-
},
|
|
861
|
-
IMPORTED_FILE_WITH_INCORRECT_CASING: {
|
|
862
|
-
number: 1203,
|
|
863
|
-
messageTemplate: 'The import "{importPath} from "{from}" exists, but its casing is incorrect. The correct casing is "{correctCasing}".',
|
|
864
|
-
websiteTitle: "Imported file with incorrect casing",
|
|
865
|
-
websiteDescription: `Hardhat enforces that you import your files with the correct casing (as stored in the filesystem).
|
|
889
|
+
websiteTitle: `Runner timed out`,
|
|
890
|
+
websiteDescription: `Runner timed out while running Solidity tests.`,
|
|
891
|
+
},
|
|
892
|
+
UNHANDLED_EDR_ERROR_SOLIDITY_TESTS: {
|
|
893
|
+
number: 802,
|
|
894
|
+
shouldBeReported: true,
|
|
895
|
+
messageTemplate: "Unhandled EDR error while running Solidity tests: {error}",
|
|
896
|
+
websiteTitle: "Unhandled EDR error in Solidity tests",
|
|
897
|
+
websiteDescription: "Unhandled EDR error while running Solidity tests.",
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
SOLIDITY: {
|
|
901
|
+
PROJECT_ROOT_RESOLUTION_ERROR: {
|
|
902
|
+
number: 900,
|
|
903
|
+
messageTemplate: `There was an error while resolving the project file "{filePath}":
|
|
866
904
|
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
number: 1204,
|
|
871
|
-
messageTemplate: 'The import "{importPath} from "{from}" exists, but its casing is incorrect.',
|
|
872
|
-
websiteTitle: "Imported file with incorrect casing",
|
|
873
|
-
websiteDescription: `Hardhat enforces that you import your files with the correct casing (as stored in the filesystem).
|
|
874
|
-
|
|
875
|
-
This error is thrown when you import a file with the wrong casing under a case insensitve filesystem.`,
|
|
876
|
-
},
|
|
877
|
-
NPM_DEPEDNDENCY_NOT_INSTALLED: {
|
|
878
|
-
number: 1205,
|
|
879
|
-
messageTemplate: 'The npm package "{packageName}" isn\'t installed in the {from}.',
|
|
880
|
-
websiteTitle: "Uninstalled npm dependency",
|
|
881
|
-
websiteDescription: `Trying to use an npm package as a solidity dependency, but it's not installed.`,
|
|
882
|
-
},
|
|
883
|
-
IMPORTED_NPM_DEPENDENCY_NOT_INSTALLED: {
|
|
884
|
-
number: 1206,
|
|
885
|
-
messageTemplate: 'The import "{importPath}" from "{from}" is trying to use an uninstalled npm dependency.',
|
|
886
|
-
websiteTitle: "Uninstalled npm solidity dependency",
|
|
887
|
-
websiteDescription: `One of your files is traying to import a dependency using npm, but it hasn't been installed`,
|
|
888
|
-
},
|
|
889
|
-
USER_REMAPPING_WITH_NPM_CONTEXT: {
|
|
890
|
-
number: 1207,
|
|
891
|
-
messageTemplate: 'The remapping "{remapping}" has a context starting with "npm/", which is forbidden. Hardhat doesn\'t allow changing the behaviour of npm package\'s imports.',
|
|
892
|
-
websiteTitle: "Remapping imports in npm packages is not allowed",
|
|
893
|
-
websiteDescription: `This error happened because you are trying to change how the imports within an npm package, which is not allowed.
|
|
905
|
+
{error}`,
|
|
906
|
+
websiteTitle: "Project file resolution error",
|
|
907
|
+
websiteDescription: `There was an error while resolving the project file.
|
|
894
908
|
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
websiteTitle: "Invalid remapping",
|
|
901
|
-
websiteDescription: `You are trying to set a user remapping, but it's syntax is invalid.
|
|
909
|
+
Please double-check your configuration. If it keeps happening, please report it.`,
|
|
910
|
+
},
|
|
911
|
+
NPM_ROOT_RESOLUTION_ERROR: {
|
|
912
|
+
number: 901,
|
|
913
|
+
messageTemplate: `There was an error while resolving the npm module "{npmModule}" when trying to compile it:
|
|
902
914
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
number: 1209,
|
|
907
|
-
messageTemplate: `The remapping "{remapping}" is trying to use the npm package "{package}", which is not installed`,
|
|
908
|
-
websiteTitle: "Remapping into an uninstaleld npm package",
|
|
909
|
-
websiteDescription: `You are trying to set a user remapping that uses an npm pacakge as target, but it's not installed.
|
|
910
|
-
|
|
911
|
-
Please make sure to install the package or fix the remapping.`,
|
|
912
|
-
},
|
|
913
|
-
REMAPPING_NPM_PACKAGE_AS_MONOREPO: {
|
|
914
|
-
number: 1210,
|
|
915
|
-
messageTemplate: `The remapping "{remapping}" targets the npm pacakge "{pacakge}" as if it were part of this repository, but version "{version}" is installed instead`,
|
|
916
|
-
websiteTitle: "Remapping into a monorepo package but found an npm package instead",
|
|
917
|
-
websiteDescription: `You are trying to set a remapping setting a monorepo package as target, but Hardhat found the pacakge to be installed from the npm regristry instead.`,
|
|
918
|
-
},
|
|
919
|
-
REMAPPING_HARDHAT_PROJECT_AS_MONOREPO_PACKAGE: {
|
|
920
|
-
number: 1211,
|
|
921
|
-
messageTemplate: `The remapping "{remapping}" is trying to set the npm package "{package}" as target, but that's the project is the Hardhat project, so it shouldn't be remapped through npm/, but as internal project remappings.`,
|
|
922
|
-
websiteTitle: `Remapping into the project using npm`,
|
|
923
|
-
websiteDescription: `You are trying to set a remapping whose target uses the npm/ syntax, but is within your Hardhat project.
|
|
915
|
+
{error}`,
|
|
916
|
+
websiteTitle: "Npm file resolution error",
|
|
917
|
+
websiteDescription: `There was an error while resolving an npm module that you are trying to compile and generate artifacts for.
|
|
924
918
|
|
|
925
|
-
Please
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
websiteTitle: `Remapping into incorrect npm package version`,
|
|
931
|
-
websiteDescription: `You are trying to set a remapping into an npm package, but the version that you are using is not the currently installed one.
|
|
919
|
+
Please double-check your configuration. If it keeps happening, please report it.`,
|
|
920
|
+
},
|
|
921
|
+
IMPORT_RESOLUTION_ERROR: {
|
|
922
|
+
number: 902,
|
|
923
|
+
messageTemplate: `There was an error while resolving the import "{importPath}" from "{filePath}":
|
|
932
924
|
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
number: 1213,
|
|
937
|
-
messageTemplate: `The import "{importPath}" in "{from}" is treated as an npm import as it's first directory doesn't exist in your project, but it's syntax is not that of a valid npm import either.`,
|
|
938
|
-
websiteTitle: `Invalid npm import`,
|
|
939
|
-
websiteDescription: `You are trying to import a file that is not a valid npm import. Please double check that you are using the correct syntax.`,
|
|
940
|
-
},
|
|
941
|
-
ILLEGAL_PACKAGE_IMPORT: {
|
|
942
|
-
number: 1214,
|
|
943
|
-
messageTemplate: `The import "{importPath}" in "{from}" is not a legal import as it's trying to import a file outside of its package.`,
|
|
944
|
-
websiteTitle: `Illegal package import`,
|
|
945
|
-
websiteDescription: `One of your npm packages has a Solidity file that is trying to import a file outside of its package using a relative import. This is disabled for security reasons.`,
|
|
946
|
-
},
|
|
947
|
-
ILEGALL_PROJECT_IMPORT: {
|
|
948
|
-
number: 1215,
|
|
949
|
-
messageTemplate: `The import "{importPath}" in "{from}" is not a legal import as it's trying to import a file outside of the project.`,
|
|
950
|
-
websiteTitle: `Illegal project import`,
|
|
951
|
-
websiteDescription: `One of your Solidity files is trying to import a file outside of the Hardhat project using a relative import. This is disabled for security reasons.`,
|
|
952
|
-
},
|
|
953
|
-
ILLEGAL_PROJECT_IMPORT_AFTER_REMAPPING: {
|
|
954
|
-
number: 1216,
|
|
955
|
-
messageTemplate: `Applying the remapping "{remapping}" to the import "{importPath}" from "{from}" results in an invalid import "{remappedDirectImport}", as it's not a local file. If you are trying to remap into an npm module use the npm/ syntax instead.`,
|
|
956
|
-
websiteTitle: `Illegal project import after remapping`,
|
|
957
|
-
websiteDescription: `One of your Solidity files has an import which after applying a user remapping becomes an illegal import, as it tries to import a file outside of the project. This is disabled for security reasons.
|
|
925
|
+
{error}`,
|
|
926
|
+
websiteTitle: "Import resolution error",
|
|
927
|
+
websiteDescription: `There was an error while resolving an import.
|
|
958
928
|
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
websiteTitle: `Import path with Windows path separator`,
|
|
965
|
-
websiteDescription: `One of your Solidity files is trying to import a file with a Windows path separator, and this is not supported. Please use a Unix-style path instead.`,
|
|
966
|
-
},
|
|
967
|
-
INVALID_SOLC_VERSION: {
|
|
968
|
-
number: 1218,
|
|
969
|
-
messageTemplate: `Solidity version {version} is invalid or hasn't been released yet.
|
|
929
|
+
Please double-check your import`,
|
|
930
|
+
},
|
|
931
|
+
INVALID_SOLC_VERSION: {
|
|
932
|
+
number: 903,
|
|
933
|
+
messageTemplate: `Solidity version {version} is invalid or hasn't been released yet.
|
|
970
934
|
|
|
971
935
|
If you are certain it has been released, run "npx hardhat clean --global" and try again`,
|
|
972
|
-
|
|
973
|
-
|
|
936
|
+
websiteTitle: "Invalid or unreleased `solc` version",
|
|
937
|
+
websiteDescription: `The Solidity version in your config is invalid or hasn't been released yet.
|
|
974
938
|
|
|
975
939
|
If you are certain it has been released, run \`npx hardhat clean --global\` and try again.`,
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
websiteTitle: "Resolving invalid npm file",
|
|
983
|
-
websiteDescription: `Tried to resolve an npm file directly (i.e. not imported by another file) but its format is invalid.
|
|
984
|
-
|
|
985
|
-
This can happen if you setting npm files to be compiled as local files, with invalid file paths, or by misusing the solidity build system.`,
|
|
986
|
-
},
|
|
987
|
-
RESOLVE_NPM_FILE_CLASHES_WITH_LOCAL_FILES: {
|
|
988
|
-
number: 1220,
|
|
989
|
-
shouldBeReported: true,
|
|
990
|
-
messageTemplate: `You are tying to resolve the npm file "{module}", for example to compile it as a local one, but it can clash with your project as the "{directory}" directory is present in your project.
|
|
991
|
-
|
|
992
|
-
Please try renaming the directory.`,
|
|
993
|
-
websiteTitle: "Resolution of npm file clashes with local files",
|
|
994
|
-
websiteDescription: `You are tying to resolve an npm file, for example to compile it as a local one, but it can clash with your project files.`,
|
|
995
|
-
},
|
|
996
|
-
RESOLVE_NON_EXISTENT_NPM_ROOT: {
|
|
997
|
-
number: 1221,
|
|
998
|
-
messageTemplate: `You are tying to compile the npm file "{module}", but it doesn't exist within its package.`,
|
|
999
|
-
websiteTitle: "Resolution of non-existent npm file",
|
|
1000
|
-
websiteDescription: `You are tying to resolve an npm file that doesn't exist within its package.`,
|
|
1001
|
-
},
|
|
1002
|
-
RESOLVE_WRONG_CASING_NPM_ROOT: {
|
|
1003
|
-
number: 1222,
|
|
1004
|
-
messageTemplate: `You are tying to compile the npm file "{module}", its casing is incorrect. Please double check it in your config.`,
|
|
1005
|
-
websiteTitle: "Resolution of npm file with incorrect casing",
|
|
1006
|
-
websiteDescription: `You are tying to resolve an npm file whose casing is incorrect.`,
|
|
1007
|
-
},
|
|
1008
|
-
DOWNLOAD_FAILED: {
|
|
1009
|
-
number: 1223,
|
|
1010
|
-
messageTemplate: "Couldn't download compiler version {remoteVersion}. Please check your internet connection and try again.",
|
|
1011
|
-
websiteTitle: "`solc` download failed",
|
|
1012
|
-
websiteDescription: `Couldn't download \`solc\`.
|
|
940
|
+
},
|
|
941
|
+
DOWNLOAD_FAILED: {
|
|
942
|
+
number: 904,
|
|
943
|
+
messageTemplate: "Couldn't download compiler version {remoteVersion}. Please check your internet connection and try again.",
|
|
944
|
+
websiteTitle: "`solc` download failed",
|
|
945
|
+
websiteDescription: `Couldn't download \`solc\`.
|
|
1013
946
|
|
|
1014
947
|
Please check your internet connection and try again.`,
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
948
|
+
},
|
|
949
|
+
VERSION_LIST_DOWNLOAD_FAILED: {
|
|
950
|
+
number: 905,
|
|
951
|
+
messageTemplate: "Couldn't download compiler version list. Please check your internet connection and try again.",
|
|
952
|
+
websiteTitle: "Couldn't obtain `solc` version list",
|
|
953
|
+
websiteDescription: `Couldn't download \`solc\`'s version list.
|
|
1021
954
|
|
|
1022
955
|
Please check your internet connection and try again.`,
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
956
|
+
},
|
|
957
|
+
INVALID_DOWNLOAD: {
|
|
958
|
+
number: 906,
|
|
959
|
+
messageTemplate: `Couldn't download compiler version {remoteVersion}: Checksum verification failed.
|
|
1027
960
|
|
|
1028
961
|
Please check your internet connection and try again.
|
|
1029
962
|
|
|
1030
963
|
If this error persists, run "npx hardhat clean --global".`,
|
|
1031
|
-
|
|
1032
|
-
|
|
964
|
+
websiteTitle: "Downloaded `solc` checksum verification failed",
|
|
965
|
+
websiteDescription: `Hardhat downloaded a version of the Solidity compiler, and its checksum verification failed.
|
|
1033
966
|
|
|
1034
967
|
Please check your internet connection and try again.
|
|
1035
968
|
|
|
1036
969
|
If this error persists, run \`npx hardhat clean --global\`.`,
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
970
|
+
},
|
|
971
|
+
CANT_RUN_NATIVE_COMPILER: {
|
|
972
|
+
number: 907,
|
|
973
|
+
messageTemplate: `A native version of solc failed to run.
|
|
1041
974
|
|
|
1042
975
|
If you are running MacOS, try installing Apple Rosetta.
|
|
1043
976
|
|
|
1044
977
|
If this error persists, run "npx hardhat clean --global".`,
|
|
1045
|
-
|
|
1046
|
-
|
|
978
|
+
websiteTitle: "Failed to run native solc",
|
|
979
|
+
websiteDescription: `Hardhat successfully downloaded a native version of solc but it doesn't run.
|
|
1047
980
|
|
|
1048
981
|
If you are running MacOS, try installing Apple Rosetta.
|
|
1049
982
|
|
|
1050
983
|
If this error persists, run "npx hardhat clean --global".`,
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
984
|
+
},
|
|
985
|
+
CANT_RUN_SOLCJS_COMPILER: {
|
|
986
|
+
number: 908,
|
|
987
|
+
messageTemplate: `A wasm version of solc failed to run.
|
|
1055
988
|
|
|
1056
989
|
If this error persists, run "npx hardhat clean --global".`,
|
|
1057
|
-
|
|
1058
|
-
|
|
990
|
+
websiteTitle: "Failed to run solcjs",
|
|
991
|
+
websiteDescription: `Hardhat successfully downloaded a WASM version of solc but it doesn't run.
|
|
1059
992
|
|
|
1060
993
|
If you are running MacOS, try installing Apple Rosetta.
|
|
1061
994
|
|
|
1062
995
|
If this error persists, run "npx hardhat clean --global".`,
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
996
|
+
},
|
|
997
|
+
COMPILATION_JOB_CREATION_ERROR: {
|
|
998
|
+
number: 909,
|
|
999
|
+
messageTemplate: `Failed to create compilation job for file "{rootFilePath}" using the build profile "{buildProfile}".
|
|
1067
1000
|
|
|
1068
1001
|
{reason}`,
|
|
1069
|
-
|
|
1070
|
-
|
|
1002
|
+
websiteTitle: "Failed to create compilation job",
|
|
1003
|
+
websiteDescription: `Hardhat failed to create a compilation job for a file in your project.
|
|
1071
1004
|
|
|
1072
1005
|
This happens when your files require incompatible versions of solc or you haven't configured a version that works with them`,
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1006
|
+
},
|
|
1007
|
+
BUILD_FAILED: {
|
|
1008
|
+
number: 910,
|
|
1009
|
+
messageTemplate: "Compilation failed",
|
|
1010
|
+
websiteTitle: "Compilation failed",
|
|
1011
|
+
websiteDescription: `Your smart contracts failed to compile.
|
|
1079
1012
|
|
|
1080
1013
|
Please check Hardhat's output for more details.`,
|
|
1014
|
+
},
|
|
1015
|
+
INVALID_SOLCJS_COMPILER: {
|
|
1016
|
+
number: 911,
|
|
1017
|
+
messageTemplate: `A wasm version of solc {version} is invalid. The compile function is not available.`,
|
|
1018
|
+
websiteTitle: "Invalid solcjs compiler",
|
|
1019
|
+
websiteDescription: `Hardhat successfully downloaded a WASM version of solc but it is invalid. The compile function is missing.`,
|
|
1020
|
+
},
|
|
1021
|
+
BUILD_PROFILE_NOT_FOUND: {
|
|
1022
|
+
number: 912,
|
|
1023
|
+
messageTemplate: `The build profile "{buildProfileName}" is not defined in your Hardhat config`,
|
|
1024
|
+
websiteTitle: "Build profile not defined",
|
|
1025
|
+
websiteDescription: `The build profile you are trying to use is not defined in your Hardhat config.`,
|
|
1026
|
+
},
|
|
1027
|
+
},
|
|
1028
|
+
ARTIFACTS: {
|
|
1029
|
+
NOT_FOUND: {
|
|
1030
|
+
number: 1000,
|
|
1031
|
+
messageTemplate: 'Artifact for contract "{contractName}" not found. {suggestion}',
|
|
1032
|
+
websiteTitle: "Artifact not found",
|
|
1033
|
+
websiteDescription: `Tried to read a nonexistent artifact.
|
|
1034
|
+
|
|
1035
|
+
Please double check that your contracts have been compiled and double check your artifact's name.`,
|
|
1036
|
+
},
|
|
1037
|
+
MULTIPLE_FOUND: {
|
|
1038
|
+
number: 1001,
|
|
1039
|
+
messageTemplate: `There are multiple artifacts for contract "{contractName}", please use a fully qualified name.
|
|
1040
|
+
|
|
1041
|
+
Please replace "{contractName}" for one of these options wherever you are trying to read its artifact:
|
|
1042
|
+
|
|
1043
|
+
{candidates}
|
|
1044
|
+
`,
|
|
1045
|
+
websiteTitle: "Multiple artifacts found",
|
|
1046
|
+
websiteDescription: `There are multiple artifacts that match the given contract name, and Hardhat doesn't know which one to use.
|
|
1047
|
+
|
|
1048
|
+
Please use the fully qualified name of the contract to disambiguate it.`,
|
|
1049
|
+
},
|
|
1050
|
+
},
|
|
1051
|
+
NODE: {
|
|
1052
|
+
INVALID_NETWORK_TYPE: {
|
|
1053
|
+
number: 1100,
|
|
1054
|
+
messageTemplate: `The provided node network type "{networkType}" for network "{networkName}" is not recognized, only 'edr-simulated' is supported.`,
|
|
1055
|
+
websiteTitle: "Invalid node network type",
|
|
1056
|
+
websiteDescription: `The node only supports the 'edr-simulated' network type.`,
|
|
1057
|
+
},
|
|
1058
|
+
},
|
|
1059
|
+
TEST_PLUGIN: {
|
|
1060
|
+
CANNOT_DETERMINE_TEST_RUNNER: {
|
|
1061
|
+
number: 1200,
|
|
1062
|
+
messageTemplate: `Cannot determine a test runner for the following files: {files}. Please check whether these files are correctly included in the test paths defined by your test plugins in the Hardhat configuration. If they are, this likely indicates an issue with a plugin not correctly detecting the files.`,
|
|
1063
|
+
websiteTitle: "Cannot determine a test runner for files",
|
|
1064
|
+
websiteDescription: `Cannot determine a test runner for the test files. This may be because the files are not correctly included in the test paths defined by the test plugins in the Hardhat configuration. If they are correctly included, this likely indicates an issue with a plugin failing to detect the files.`,
|
|
1065
|
+
},
|
|
1066
|
+
},
|
|
1067
|
+
COVERAGE: {
|
|
1068
|
+
SOURCE_NOT_INSTRUMENTED: {
|
|
1069
|
+
number: 1300,
|
|
1070
|
+
messageTemplate: `The source file "{sourceName}" could not be instrumented for coverage.`,
|
|
1071
|
+
websiteTitle: "Source file not instrumented for coverage",
|
|
1072
|
+
websiteDescription: `The source file could not be instrumented for coverage.`,
|
|
1073
|
+
},
|
|
1074
|
+
IMPORT_PATH_ALREADY_DEFINED: {
|
|
1075
|
+
number: 1301,
|
|
1076
|
+
messageTemplate: `The import path "{importPath}" is already defined in the compilation sources`,
|
|
1077
|
+
websiteTitle: "Import path already defined in compilation sources",
|
|
1078
|
+
websiteDescription: `The import path is already defined in the compilation sources`,
|
|
1079
|
+
},
|
|
1081
1080
|
},
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1081
|
+
},
|
|
1082
|
+
IGNITION: {
|
|
1083
|
+
GENERAL: {
|
|
1084
|
+
ASSERTION_ERROR: {
|
|
1085
|
+
number: 10000,
|
|
1086
|
+
messageTemplate: "Internal Hardhat Ignition invariant was violated: {description}",
|
|
1087
|
+
websiteTitle: "Internal Hardhat Ignition invariant was violated",
|
|
1088
|
+
websiteDescription: `An internal Hardhat Ignition invariant was violated.`,
|
|
1089
|
+
},
|
|
1090
|
+
UNSUPPORTED_DECODE: {
|
|
1091
|
+
number: 10001,
|
|
1092
|
+
messageTemplate: "Hardhat Ignition can't decode ethers.js value of type {type}: {value}",
|
|
1093
|
+
websiteTitle: "Unsupported ethers.js value",
|
|
1094
|
+
websiteDescription: "Unsupported ethers.js value",
|
|
1095
|
+
},
|
|
1096
|
+
ARTIFACT_MIGRATION_NEEDED: {
|
|
1097
|
+
number: 10002,
|
|
1098
|
+
messageTemplate: "Hardhat Ignition needs to migrate this deployments artifacts to the new format. Please run `npx hardhat ignition migrate {deploymentId}`",
|
|
1099
|
+
websiteTitle: "Artifact migration needed",
|
|
1100
|
+
websiteDescription: "Hardhat Ignition needs to migrate the artifacts to the new format. Please run `npx hardhat ignition migrate {deploymentId}`",
|
|
1101
|
+
},
|
|
1102
|
+
},
|
|
1103
|
+
INTERNAL: {
|
|
1104
|
+
INTERNAL_ERROR: {
|
|
1105
|
+
number: 10100,
|
|
1106
|
+
shouldBeReported: true,
|
|
1107
|
+
messageTemplate: "Hardhat Ignition Internal Error",
|
|
1108
|
+
websiteTitle: "An internal error to Hardhat Ignition has occurred",
|
|
1109
|
+
websiteDescription: `An internal error to Hardhat Ignition has occurred`,
|
|
1110
|
+
},
|
|
1111
|
+
TEMPLATE_INVALID_VARIABLE_NAME: {
|
|
1112
|
+
number: 10101,
|
|
1113
|
+
messageTemplate: "Variable names can only include ascii letters and numbers, and start with a letter, but got {variable}",
|
|
1114
|
+
websiteTitle: "Invalid variable name",
|
|
1115
|
+
websiteDescription: `One of your Hardhat Ignition template variables has an invalid name`,
|
|
1116
|
+
},
|
|
1117
|
+
TEMPLATE_VARIABLE_NOT_FOUND: {
|
|
1118
|
+
number: 10102,
|
|
1119
|
+
messageTemplate: "Variable {variable}'s tag not present in the template",
|
|
1120
|
+
websiteTitle: "Variable tag not found in template",
|
|
1121
|
+
websiteDescription: `One of your Hardhat Ignition template variables has a tag that is not present in the template`,
|
|
1122
|
+
},
|
|
1123
|
+
TEMPLATE_VALUE_CONTAINS_VARIABLE_TAG: {
|
|
1124
|
+
number: 10103,
|
|
1125
|
+
messageTemplate: "Template values can't include variable tags, but {variable}'s value includes one",
|
|
1126
|
+
websiteTitle: "Template value includes variable tag",
|
|
1127
|
+
websiteDescription: `One of your Hardhat Ignition template variables has a value that includes a variable tag`,
|
|
1128
|
+
},
|
|
1129
|
+
ETHERSCAN_API_KEY_NOT_CONFIGURED: {
|
|
1130
|
+
number: 10104,
|
|
1131
|
+
messageTemplate: "No etherscan API key configured",
|
|
1132
|
+
websiteTitle: "No etherscan API key configured",
|
|
1133
|
+
websiteDescription: `You are trying to run verification during a Hardhat Ignition deploy, but there is no Etherscan API Key set.`,
|
|
1134
|
+
},
|
|
1135
|
+
CANNOT_RESET_EPHEMERAL_NETWORK: {
|
|
1136
|
+
number: 10105,
|
|
1137
|
+
messageTemplate: "Deploy cancelled: Cannot reset deployment on ephemeral Hardhat network",
|
|
1138
|
+
websiteTitle: "Cannot reset deployment on ephemeral Hardhat network",
|
|
1139
|
+
websiteDescription: `The reset flag can only used against a persistent network. You are trying to reset a deployment against an in-memory network.`,
|
|
1140
|
+
},
|
|
1141
|
+
NO_MODULES_FOUND: {
|
|
1142
|
+
number: 10106,
|
|
1143
|
+
messageTemplate: "No Ignition modules found",
|
|
1144
|
+
websiteTitle: "No Ignition modules found",
|
|
1145
|
+
websiteDescription: "Ignition was unable to find the module requested for deployment.",
|
|
1146
|
+
},
|
|
1147
|
+
FAILED_TO_PARSE_JSON: {
|
|
1148
|
+
number: 10107,
|
|
1149
|
+
messageTemplate: "Could not parse JSON parameters",
|
|
1150
|
+
websiteTitle: "Could not parse JSON parameters",
|
|
1151
|
+
websiteDescription: "Ignition failed to parse the JSON parameters for deployment. Review the JSON and try again.",
|
|
1152
|
+
},
|
|
1153
|
+
INVALID_DEPLOYMENT_ID: {
|
|
1154
|
+
number: 10108,
|
|
1155
|
+
messageTemplate: `The deployment-id "{deploymentId}" contains banned characters, ids can only contain alphanumerics, dashes or underscores`,
|
|
1156
|
+
websiteTitle: "The deployment-id contains banned characters",
|
|
1157
|
+
websiteDescription: "The deployment-id being used for the Hardhat Ignition deployment contains banned characters. Deployment ids can only contain alphanumerics, dashes or underscores.",
|
|
1158
|
+
},
|
|
1159
|
+
IGNITION_CLIENT_EXTENSION_NOT_INSTALLED: {
|
|
1160
|
+
number: 10109,
|
|
1161
|
+
messageTemplate: "Please install either `@nomicfoundation/hardhat-ignition-viem` or `@nomicfoundation/hardhat-ignition-ethers` to use Ignition in your Hardhat tests",
|
|
1162
|
+
websiteTitle: "Neither the `viem` or `ethers` Ignition extension plugin is installed.",
|
|
1163
|
+
websiteDescription: "Please install either `@nomicfoundation/hardhat-ignition-viem` or `@nomicfoundation/hardhat-ignition-ethers` to use Ignition in your Hardhat tests",
|
|
1164
|
+
},
|
|
1165
|
+
UNKNOWN_TRANSACTION_TYPE: {
|
|
1166
|
+
number: 10110,
|
|
1167
|
+
shouldBeReported: true,
|
|
1168
|
+
messageTemplate: `Unknown transaction type: "{type}"`,
|
|
1169
|
+
websiteTitle: "Hardhat Ignition was unable to display an unknown transaction type",
|
|
1170
|
+
websiteDescription: "Hardhat Ignition was unable to display an unknown transaction type",
|
|
1171
|
+
},
|
|
1172
|
+
PARAMETER_EXCEEDS_MAXIMUM_SAFE_INTEGER: {
|
|
1173
|
+
number: 10111,
|
|
1174
|
+
messageTemplate: `Parameter "{parameter}" exceeds maximum safe integer size. Encode the value as a string using bigint notation: "{value}n"`,
|
|
1175
|
+
websiteTitle: "Parameter exceeds maximum safe integer size",
|
|
1176
|
+
websiteDescription: "Parameter exceeds maximum safe integer size",
|
|
1177
|
+
},
|
|
1178
|
+
MODULE_VALIDATION_FAILED: {
|
|
1179
|
+
number: 10112,
|
|
1180
|
+
messageTemplate: "Module validation failed. Check the stack trace above to identify the issue and its source code location.",
|
|
1181
|
+
websiteTitle: "Module validation failed.",
|
|
1182
|
+
websiteDescription: "Hardhat Ignition found problems while validating the module. Please review the module and try again.",
|
|
1183
|
+
},
|
|
1184
|
+
FAILED_TO_PARSE_DEPLOYMENT_PARAMETERS: {
|
|
1185
|
+
number: 10113,
|
|
1186
|
+
messageTemplate: `Could not parse parameters from "{filepath}"`,
|
|
1187
|
+
websiteTitle: "Parsing of deployment parameters failed.",
|
|
1188
|
+
websiteDescription: "Parsing of deployment parameters failed.",
|
|
1189
|
+
},
|
|
1190
|
+
VISUALIZATION_TEMPLATE_DIR_NOT_FOUND: {
|
|
1191
|
+
number: 10114,
|
|
1192
|
+
shouldBeReported: true,
|
|
1193
|
+
messageTemplate: `Unable to find template directory: "{templateDir}"`,
|
|
1194
|
+
websiteTitle: "Visualization template directory not found",
|
|
1195
|
+
websiteDescription: "Visualization template directory not found",
|
|
1196
|
+
},
|
|
1197
|
+
MODULE_NOT_FOUND_AT_PATH: {
|
|
1198
|
+
number: 10115,
|
|
1199
|
+
messageTemplate: `Could not find a module file at the path: "{modulePath}"`,
|
|
1200
|
+
websiteTitle: "Ignition module not found",
|
|
1201
|
+
websiteDescription: "Hardhat Ignition was not able to find an Ignition Module at the given path.",
|
|
1202
|
+
},
|
|
1203
|
+
MODULE_OUTSIDE_MODULE_DIRECTORY: {
|
|
1204
|
+
number: 10116,
|
|
1205
|
+
messageTemplate: `The referenced module file "{modulePath}" is outside the module directory "{shortModulesDirectoryName}"`,
|
|
1206
|
+
websiteTitle: "Ignition module outside of module directory",
|
|
1207
|
+
websiteDescription: "Ignition modules must be located within the module directory.",
|
|
1208
|
+
},
|
|
1209
|
+
VIEM_TEST_HELPER_ERROR: {
|
|
1210
|
+
number: 10117,
|
|
1211
|
+
messageTemplate: `Hardhat Ignition Viem Test Error: {message}`,
|
|
1212
|
+
websiteTitle: "Test error in Hardhat Ignition Viem's test helper",
|
|
1213
|
+
websiteDescription: "Test error in Hardhat Ignition Viem's test helper.",
|
|
1214
|
+
},
|
|
1215
|
+
ARTIFACT_PATH_NOT_FOUND: {
|
|
1216
|
+
number: 10118,
|
|
1217
|
+
messageTemplate: `Artifact path not found for "{contractName}"`,
|
|
1218
|
+
websiteTitle: "Hardhat Ignition unable to find artifact path for the contract name",
|
|
1219
|
+
websiteDescription: "Hardhat Ignition unable to find artifact path for the contract name",
|
|
1220
|
+
},
|
|
1221
|
+
ONLY_ONE_IGNITION_EXTENSION_PLUGIN_ALLOWED: {
|
|
1222
|
+
number: 10119,
|
|
1223
|
+
messageTemplate: "Found ethers and viem, but only one Hardhat Ignition extension plugin can be used at a time",
|
|
1224
|
+
websiteTitle: "Only one Ignition extension plugin allowed",
|
|
1225
|
+
websiteDescription: `Both the ethers and viem Ignition extension plugins were found, but only one can be used at a time.
|
|
1226
|
+
|
|
1227
|
+
Please only include one of the plugins in your Hardhat configuration.`,
|
|
1228
|
+
},
|
|
1229
|
+
DEPLOYMENT_ERROR: {
|
|
1230
|
+
number: 10120,
|
|
1231
|
+
messageTemplate: "Hardhat Ignition deployment error: {message}",
|
|
1232
|
+
websiteTitle: "Hardhat Ignition deployment error",
|
|
1233
|
+
websiteDescription: `Hardhat Ignition was not able to successfully complete a deployment.
|
|
1234
|
+
|
|
1235
|
+
Please review the error message and try again.`,
|
|
1236
|
+
},
|
|
1237
|
+
NO_DEFAULT_VIEM_WALLET_CLIENT: {
|
|
1238
|
+
number: 10121,
|
|
1239
|
+
messageTemplate: "No default wallet client found while creating Viem contract instances for deployed contracts",
|
|
1240
|
+
websiteTitle: "No default Viem wallet client found",
|
|
1241
|
+
websiteDescription: `Hardhat Ignition will use the default wallet client to create Viem contract instances for deployed contracts. No wallet clients were found.`,
|
|
1242
|
+
},
|
|
1243
|
+
},
|
|
1244
|
+
MODULE: {
|
|
1245
|
+
INVALID_MODULE_ID: {
|
|
1246
|
+
number: 10200,
|
|
1247
|
+
messageTemplate: "Module id must be a string",
|
|
1248
|
+
websiteTitle: "Invalid module id type",
|
|
1249
|
+
websiteDescription: `Module id must be a string`,
|
|
1250
|
+
},
|
|
1251
|
+
INVALID_MODULE_ID_CHARACTERS: {
|
|
1252
|
+
number: 10201,
|
|
1253
|
+
messageTemplate: 'The moduleId "{moduleId}" is invalid. Module ids can only have alphanumerics and underscore, and they must start with an alphanumeric.',
|
|
1254
|
+
websiteTitle: "Invalid module id",
|
|
1255
|
+
websiteDescription: `Module ids can only have alphanumerics and underscore, and they must start with an alphanumeric.`,
|
|
1256
|
+
},
|
|
1257
|
+
INVALID_MODULE_DEFINITION_FUNCTION: {
|
|
1258
|
+
number: 10202,
|
|
1259
|
+
messageTemplate: "Module definition function must be a function.",
|
|
1260
|
+
websiteTitle: "Invalid module definition function",
|
|
1261
|
+
websiteDescription: `Module definition function must be a function.`,
|
|
1262
|
+
},
|
|
1263
|
+
ASYNC_MODULE_DEFINITION_FUNCTION: {
|
|
1264
|
+
number: 10203,
|
|
1265
|
+
messageTemplate: "The callback passed to 'buildModule' for {moduleDefinitionId} returns a Promise; async callbacks are not allowed in 'buildModule'.",
|
|
1266
|
+
websiteTitle: "Async module definition function",
|
|
1267
|
+
websiteDescription: `Async callbacks are not allowed in 'buildModule'.`,
|
|
1268
|
+
},
|
|
1269
|
+
DUPLICATE_MODULE_ID: {
|
|
1270
|
+
number: 10204,
|
|
1271
|
+
messageTemplate: "The following module ids are duplicated: {duplicateModuleIds}. Please make sure all module ids are unique.",
|
|
1272
|
+
websiteTitle: "Duplicate module ids",
|
|
1273
|
+
websiteDescription: `Please make sure all module ids are unique.`,
|
|
1274
|
+
},
|
|
1275
|
+
},
|
|
1276
|
+
SERIALIZATION: {
|
|
1277
|
+
INVALID_FUTURE_ID: {
|
|
1278
|
+
number: 10300,
|
|
1279
|
+
messageTemplate: "Unable to lookup future during deserialization: {futureId}",
|
|
1280
|
+
websiteTitle: "Invalid future id",
|
|
1281
|
+
websiteDescription: `Unable to lookup future during deserialization`,
|
|
1282
|
+
},
|
|
1283
|
+
INVALID_FUTURE_TYPE: {
|
|
1284
|
+
number: 10301,
|
|
1285
|
+
messageTemplate: "Invalid FutureType {type} as serialized argument",
|
|
1286
|
+
websiteTitle: "Invalid future type",
|
|
1287
|
+
websiteDescription: `Invalid FutureType as serialized argument`,
|
|
1288
|
+
},
|
|
1289
|
+
LOOKAHEAD_NOT_FOUND: {
|
|
1290
|
+
number: 10302,
|
|
1291
|
+
messageTemplate: "Lookahead value {key} missing",
|
|
1292
|
+
websiteTitle: "Lookahead value not found",
|
|
1293
|
+
websiteDescription: `Lookahead value missing`,
|
|
1294
|
+
},
|
|
1295
|
+
},
|
|
1296
|
+
EXECUTION: {
|
|
1297
|
+
DROPPED_TRANSACTION: {
|
|
1298
|
+
number: 10400,
|
|
1299
|
+
messageTemplate: "Error while executing {futureId}: all the transactions of its network interaction {networkInteractionId} were dropped. Please try rerunning Hardhat Ignition.",
|
|
1300
|
+
websiteTitle: "Dropped transaction",
|
|
1301
|
+
websiteDescription: `One of the transactions sent by Hardhat Ignition was dropped`,
|
|
1302
|
+
},
|
|
1303
|
+
INVALID_JSON_RPC_RESPONSE: {
|
|
1304
|
+
number: 10401,
|
|
1305
|
+
messageTemplate: "Invalid JSON-RPC response for {method}: {response}",
|
|
1306
|
+
websiteTitle: "Invalid JSON-RPC response",
|
|
1307
|
+
websiteDescription: `Hardhat Ignition received an invalid JSON-RPC response for the given method`,
|
|
1308
|
+
},
|
|
1309
|
+
WAITING_FOR_CONFIRMATIONS: {
|
|
1310
|
+
number: 10402,
|
|
1311
|
+
messageTemplate: "You have sent transactions from {sender} and they interfere with Hardhat Ignition. Please wait until they get {requiredConfirmations} confirmations before running Hardhat Ignition again.",
|
|
1312
|
+
websiteTitle: "Waiting for confirmations",
|
|
1313
|
+
websiteDescription: `Waiting for confirmations for transactions sent from the sender`,
|
|
1314
|
+
},
|
|
1315
|
+
WAITING_FOR_NONCE: {
|
|
1316
|
+
number: 10403,
|
|
1317
|
+
messageTemplate: "You have sent transactions from {sender} with nonce {nonce} and it interferes with Hardhat Ignition. Please wait until they get {requiredConfirmations} confirmations before running Hardhat Ignition again.",
|
|
1318
|
+
websiteTitle: "Waiting for nonce",
|
|
1319
|
+
websiteDescription: `Waiting for confirmations for transactions sent from the sender`,
|
|
1320
|
+
},
|
|
1321
|
+
INVALID_NONCE: {
|
|
1322
|
+
number: 10404,
|
|
1323
|
+
messageTemplate: "The next nonce for {sender} should be {expectedNonce}, but is {pendingCount}. Please make sure not to send transactions from {sender} while running this deployment and try again.",
|
|
1324
|
+
websiteTitle: "Invalid nonce",
|
|
1325
|
+
websiteDescription: `The next nonce for the sender is not what Hardhat Ignition expected`,
|
|
1326
|
+
},
|
|
1327
|
+
BASE_FEE_EXCEEDS_GAS_LIMIT: {
|
|
1328
|
+
number: 10405,
|
|
1329
|
+
messageTemplate: "The configured base fee exceeds the block gas limit. Please reduce the configured base fee or increase the block gas limit.",
|
|
1330
|
+
websiteTitle: "Base fee exceeds gas limit",
|
|
1331
|
+
websiteDescription: `The configured base fee exceeds the block gas limit`,
|
|
1332
|
+
},
|
|
1333
|
+
MAX_FEE_PER_GAS_EXCEEDS_GAS_LIMIT: {
|
|
1334
|
+
number: 10406,
|
|
1335
|
+
messageTemplate: "The calculated max fee per gas exceeds the configured limit.",
|
|
1336
|
+
websiteTitle: "Max fee per gas exceeds gas limit",
|
|
1337
|
+
websiteDescription: `The calculated max fee per gas exceeds the configured limit`,
|
|
1338
|
+
},
|
|
1339
|
+
INSUFFICIENT_FUNDS_FOR_TRANSFER: {
|
|
1340
|
+
number: 10407,
|
|
1341
|
+
messageTemplate: "Account {sender} has insufficient funds to transfer {amount} wei",
|
|
1342
|
+
websiteTitle: "Insufficient funds for transfer",
|
|
1343
|
+
websiteDescription: `Sender account has insufficient funds for transfer`,
|
|
1344
|
+
},
|
|
1345
|
+
INSUFFICIENT_FUNDS_FOR_DEPLOY: {
|
|
1346
|
+
number: 10408,
|
|
1347
|
+
messageTemplate: "Account {sender} has insufficient funds to deploy the contract",
|
|
1348
|
+
websiteTitle: "Insufficient funds for deploy",
|
|
1349
|
+
websiteDescription: `Sender account has insufficient funds for deploy`,
|
|
1350
|
+
},
|
|
1351
|
+
GAS_ESTIMATION_FAILED: {
|
|
1352
|
+
number: 10409,
|
|
1353
|
+
messageTemplate: "Gas estimation failed: {error}",
|
|
1354
|
+
websiteTitle: "Gas estimation failed",
|
|
1355
|
+
websiteDescription: `Gas estimation failed`,
|
|
1356
|
+
},
|
|
1357
|
+
TRANSACTION_LOST: {
|
|
1358
|
+
number: 10410,
|
|
1359
|
+
messageTemplate: `An error occurred while trying to send a transaction for future {futureId}.
|
|
1360
|
+
Please use a block explorer to find the hash of the transaction with nonce {nonce} sent from account {sender} and use the following command to add it to your deployment:
|
|
1361
|
+
npx hardhat ignition track-tx <txHash> <deploymentId> --network <networkName>`,
|
|
1362
|
+
websiteTitle: "Transaction lost",
|
|
1363
|
+
websiteDescription: `An error occurred while trying to send a transaction`,
|
|
1364
|
+
},
|
|
1365
|
+
},
|
|
1366
|
+
RECONCILIATION: {
|
|
1367
|
+
INVALID_EXECUTION_STATUS: {
|
|
1368
|
+
number: 10500,
|
|
1369
|
+
messageTemplate: "Unsupported execution status: {status}",
|
|
1370
|
+
websiteTitle: "Invalid execution status",
|
|
1371
|
+
websiteDescription: `Unsupported execution status`,
|
|
1372
|
+
},
|
|
1373
|
+
},
|
|
1374
|
+
WIPE: {
|
|
1375
|
+
UNINITIALIZED_DEPLOYMENT: {
|
|
1376
|
+
number: 10600,
|
|
1377
|
+
messageTemplate: "Cannot wipe {futureId} as the deployment hasn't been intialialized yet",
|
|
1378
|
+
websiteTitle: "Uninitialized deployment",
|
|
1379
|
+
websiteDescription: `Cannot wipe future as the deployment hasn't been intialialized yet`,
|
|
1380
|
+
},
|
|
1381
|
+
NO_STATE_FOR_FUTURE: {
|
|
1382
|
+
number: 10601,
|
|
1383
|
+
messageTemplate: "Cannot wipe {futureId} as it has no previous execution recorded",
|
|
1384
|
+
websiteTitle: "No state for future",
|
|
1385
|
+
websiteDescription: `Cannot wipe future as it has no previous execution recorded`,
|
|
1386
|
+
},
|
|
1387
|
+
DEPENDENT_FUTURES: {
|
|
1388
|
+
number: 10602,
|
|
1389
|
+
messageTemplate: `Cannot wipe {futureId} as there are dependent futures that have previous executions recorded. Consider wiping these first: {dependents}`,
|
|
1390
|
+
websiteTitle: "Dependent futures",
|
|
1391
|
+
websiteDescription: `Cannot wipe future as there are dependent futures that have previous executions recorded`,
|
|
1392
|
+
},
|
|
1393
|
+
},
|
|
1394
|
+
VALIDATION: {
|
|
1395
|
+
INVALID_DEFAULT_SENDER: {
|
|
1396
|
+
number: 10700,
|
|
1397
|
+
messageTemplate: "Default sender {defaultSender} is not part of the configured accounts.",
|
|
1398
|
+
websiteTitle: "Invalid default sender",
|
|
1399
|
+
websiteDescription: `The default sender is not part of the configured accounts`,
|
|
1400
|
+
},
|
|
1401
|
+
MISSING_EMITTER: {
|
|
1402
|
+
number: 10701,
|
|
1403
|
+
messageTemplate: "`options.emitter` must be provided when reading an event from a SendDataFuture",
|
|
1404
|
+
websiteTitle: "Missing emitter",
|
|
1405
|
+
websiteDescription: `The emitter must be provided when reading an event from a SendDataFuture`,
|
|
1406
|
+
},
|
|
1407
|
+
INVALID_MODULE: {
|
|
1408
|
+
number: 10702,
|
|
1409
|
+
messageTemplate: "Module validation failed with reason: {message}",
|
|
1410
|
+
websiteTitle: "Module validation failed",
|
|
1411
|
+
websiteDescription: `Module validation failed`,
|
|
1412
|
+
},
|
|
1413
|
+
INVALID_CONSTRUCTOR_ARGS_LENGTH: {
|
|
1414
|
+
number: 10703,
|
|
1415
|
+
messageTemplate: "The constructor of the contract '{contractName}' expects {expectedArgsLength} arguments but {argsLength} were given",
|
|
1416
|
+
websiteTitle: "Invalid constructor arguments length",
|
|
1417
|
+
websiteDescription: `Invalid constructor arguments length`,
|
|
1418
|
+
},
|
|
1419
|
+
INVALID_FUNCTION_ARGS_LENGTH: {
|
|
1420
|
+
number: 10704,
|
|
1421
|
+
messageTemplate: "Function {functionName} in contract {contractName} expects {expectedLength} arguments but {argsLength} were given",
|
|
1422
|
+
websiteTitle: "Invalid function arguments length",
|
|
1423
|
+
websiteDescription: `Invalid function arguments length`,
|
|
1424
|
+
},
|
|
1425
|
+
INVALID_STATIC_CALL: {
|
|
1426
|
+
number: 10705,
|
|
1427
|
+
messageTemplate: "Function {functionName} in contract {contractName} is not 'pure' or 'view' and should not be statically called",
|
|
1428
|
+
websiteTitle: "Invalid static call",
|
|
1429
|
+
websiteDescription: `Function is not 'pure' or 'view' and should not be statically called`,
|
|
1430
|
+
},
|
|
1431
|
+
INDEXED_EVENT_ARG: {
|
|
1432
|
+
number: 10706,
|
|
1433
|
+
messageTemplate: "Indexed argument {argument} of event {eventName} of contract {contractName} is not stored in the receipt (its hash is stored instead), so you can't read it.",
|
|
1434
|
+
websiteTitle: "Indexed event argument",
|
|
1435
|
+
websiteDescription: `Indexed argument of event is not stored in the receipt`,
|
|
1436
|
+
},
|
|
1437
|
+
INVALID_OVERLOAD_NAME: {
|
|
1438
|
+
number: 10707,
|
|
1439
|
+
messageTemplate: "Invalid {eventOrFunction} name '{name}'",
|
|
1440
|
+
websiteTitle: "Invalid overload name",
|
|
1441
|
+
websiteDescription: `Invalid overload name`,
|
|
1442
|
+
},
|
|
1443
|
+
OVERLOAD_NOT_FOUND: {
|
|
1444
|
+
number: 10708,
|
|
1445
|
+
messageTemplate: "{eventOrFunction} '{name}' not found in contract {contractName}",
|
|
1446
|
+
websiteTitle: "Overload not found",
|
|
1447
|
+
websiteDescription: `Overload not found`,
|
|
1448
|
+
},
|
|
1449
|
+
REQUIRE_BARE_NAME: {
|
|
1450
|
+
number: 10709,
|
|
1451
|
+
messageTemplate: "{eventOrFunction} name '{name}' used for contract {contractName}, but it's not overloaded. Use '{bareName}' instead.",
|
|
1452
|
+
websiteTitle: "Overload name used for non-overloaded contract",
|
|
1453
|
+
websiteDescription: `Overload name used for non-overloaded contract`,
|
|
1454
|
+
},
|
|
1455
|
+
OVERLOAD_NAME_REQUIRED: {
|
|
1456
|
+
number: 10710,
|
|
1457
|
+
messageTemplate: `{eventOrFunction} '{name}' is overloaded in contract {contractName}. Please use one of these names instead:
|
|
1458
|
+
|
|
1459
|
+
{normalizedNameList}`,
|
|
1460
|
+
websiteTitle: "Overload name required",
|
|
1461
|
+
websiteDescription: `Overload name required`,
|
|
1462
|
+
},
|
|
1463
|
+
INVALID_OVERLOAD_GIVEN: {
|
|
1464
|
+
number: 10711,
|
|
1465
|
+
messageTemplate: `{eventOrFunction} '{name}' is not a valid overload of '{bareName}' in contract {contractName}. Please use one of these names instead:
|
|
1466
|
+
|
|
1467
|
+
{normalizedNameList}`,
|
|
1468
|
+
websiteTitle: "Invalid overload given",
|
|
1469
|
+
websiteDescription: `Invalid overload given`,
|
|
1470
|
+
},
|
|
1471
|
+
EVENT_ARG_NOT_FOUND: {
|
|
1472
|
+
number: 10712,
|
|
1473
|
+
messageTemplate: "Event {eventName} of contract {contractName} has no argument named {argument}",
|
|
1474
|
+
websiteTitle: "Event argument not found",
|
|
1475
|
+
websiteDescription: `Event argument not found`,
|
|
1476
|
+
},
|
|
1477
|
+
INVALID_EVENT_ARG_INDEX: {
|
|
1478
|
+
number: 10713,
|
|
1479
|
+
messageTemplate: "Event {eventName} of contract {contractName} has only {expectedLength} arguments, but argument {argument} was requested",
|
|
1480
|
+
websiteTitle: "Invalid event argument index",
|
|
1481
|
+
websiteDescription: `Invalid event argument index`,
|
|
1482
|
+
},
|
|
1483
|
+
FUNCTION_ARG_NOT_FOUND: {
|
|
1484
|
+
number: 10714,
|
|
1485
|
+
messageTemplate: "Function {functionName} of contract {contractName} has no return value named {argument}",
|
|
1486
|
+
websiteTitle: "Function argument not found",
|
|
1487
|
+
websiteDescription: `Function argument not found`,
|
|
1488
|
+
},
|
|
1489
|
+
INVALID_FUNCTION_ARG_INDEX: {
|
|
1490
|
+
number: 10715,
|
|
1491
|
+
messageTemplate: "Function {functionName} of contract {contractName} has only {expectedLength} return values, but value {argument} was requested",
|
|
1492
|
+
websiteTitle: "Invalid function argument index",
|
|
1493
|
+
websiteDescription: `Invalid function argument index`,
|
|
1494
|
+
},
|
|
1495
|
+
MISSING_LIBRARIES: {
|
|
1496
|
+
number: 10716,
|
|
1497
|
+
messageTemplate: "Invalid libraries for contract {contractName}: The following libraries are missing: {fullyQualifiedNames}",
|
|
1498
|
+
websiteTitle: "Missing libraries",
|
|
1499
|
+
websiteDescription: `The following libraries are missing`,
|
|
1500
|
+
},
|
|
1501
|
+
CONFLICTING_LIBRARY_NAMES: {
|
|
1502
|
+
number: 10717,
|
|
1503
|
+
messageTemplate: "Invalid libraries for contract {contractName}: The names '{inputName}' and '{libName}' clash with each other, please use qualified names for both.",
|
|
1504
|
+
websiteTitle: "Conflicting library names",
|
|
1505
|
+
websiteDescription: `The library names clash with each other`,
|
|
1506
|
+
},
|
|
1507
|
+
INVALID_LIBRARY_NAME: {
|
|
1508
|
+
number: 10718,
|
|
1509
|
+
messageTemplate: "Invalid library name {libraryName} for contract {contractName}",
|
|
1510
|
+
websiteTitle: "Invalid library name",
|
|
1511
|
+
websiteDescription: `Invalid library name`,
|
|
1512
|
+
},
|
|
1513
|
+
LIBRARY_NOT_NEEDED: {
|
|
1514
|
+
number: 10719,
|
|
1515
|
+
messageTemplate: "Invalid library {libraryName} for contract {contractName}: this library is not needed by this contract.",
|
|
1516
|
+
websiteTitle: "Invalid library",
|
|
1517
|
+
websiteDescription: `Invalid library`,
|
|
1518
|
+
},
|
|
1519
|
+
AMBIGUOUS_LIBRARY_NAME: {
|
|
1520
|
+
number: 10720,
|
|
1521
|
+
messageTemplate: `Invalid libraries for contract {contractName}: The name "{libraryName}" is ambiguous, please use one of the following fully qualified names: {fullyQualifiedNames}`,
|
|
1522
|
+
websiteTitle: "Ambiguous library name",
|
|
1523
|
+
websiteDescription: `The library name is ambiguous`,
|
|
1524
|
+
},
|
|
1525
|
+
INVALID_LIBRARY_ADDRESS: {
|
|
1526
|
+
number: 10721,
|
|
1527
|
+
messageTemplate: `Invalid address {address} for library {libraryName} of contract {contractName}`,
|
|
1528
|
+
websiteTitle: "Invalid library address",
|
|
1529
|
+
websiteDescription: `Invalid address for library`,
|
|
1530
|
+
},
|
|
1531
|
+
NEGATIVE_ACCOUNT_INDEX: {
|
|
1532
|
+
number: 10722,
|
|
1533
|
+
messageTemplate: "Account index cannot be a negative number",
|
|
1534
|
+
websiteTitle: "Negative account index",
|
|
1535
|
+
websiteDescription: `Account index cannot be a negative number`,
|
|
1536
|
+
},
|
|
1537
|
+
ACCOUNT_INDEX_TOO_HIGH: {
|
|
1538
|
+
number: 10723,
|
|
1539
|
+
messageTemplate: "Requested account index '{accountIndex}' is greater than the total number of available accounts '{accountsLength}'",
|
|
1540
|
+
websiteTitle: "Account index too high",
|
|
1541
|
+
websiteDescription: `Requested account index is greater than the total number of available accounts`,
|
|
1542
|
+
},
|
|
1543
|
+
INVALID_ARTIFACT: {
|
|
1544
|
+
number: 10724,
|
|
1545
|
+
messageTemplate: "Artifact for contract '{contractName}' is invalid",
|
|
1546
|
+
websiteTitle: "Invalid artifact",
|
|
1547
|
+
websiteDescription: `Artifact for contract is invalid`,
|
|
1548
|
+
},
|
|
1549
|
+
MISSING_MODULE_PARAMETER: {
|
|
1550
|
+
number: 10725,
|
|
1551
|
+
messageTemplate: "Module parameter '{name}' requires a value but was given none",
|
|
1552
|
+
websiteTitle: "Missing module parameter",
|
|
1553
|
+
websiteDescription: `Module parameter requires a value but was given none`,
|
|
1554
|
+
},
|
|
1555
|
+
INVALID_MODULE_PARAMETER_TYPE: {
|
|
1556
|
+
number: 10726,
|
|
1557
|
+
messageTemplate: `Module parameter '{name}' must be of type '{expectedType}' but is '{actualType}'`,
|
|
1558
|
+
websiteTitle: "Invalid module parameter type",
|
|
1559
|
+
websiteDescription: `Module parameter must be of the expected type`,
|
|
1560
|
+
},
|
|
1561
|
+
},
|
|
1562
|
+
STATUS: {
|
|
1563
|
+
UNINITIALIZED_DEPLOYMENT: {
|
|
1564
|
+
number: 10800,
|
|
1565
|
+
messageTemplate: "Cannot get status for nonexistant deployment at {deploymentDir}",
|
|
1566
|
+
websiteTitle: "Uninitialized deployment",
|
|
1567
|
+
websiteDescription: `Cannot get status for nonexistant deployment`,
|
|
1568
|
+
},
|
|
1569
|
+
},
|
|
1570
|
+
DEPLOY: {
|
|
1571
|
+
CHANGED_CHAINID: {
|
|
1572
|
+
number: 10900,
|
|
1573
|
+
messageTemplate: `The deployment's chain cannot be changed between runs. The deployment was previously run against the chain {previousChainId}, but the current network is the chain {currentChainId}.`,
|
|
1574
|
+
websiteTitle: "Chain ID changed",
|
|
1575
|
+
websiteDescription: `The deployment's chain cannot be changed between runs.`,
|
|
1576
|
+
},
|
|
1577
|
+
},
|
|
1578
|
+
VERIFY: {
|
|
1579
|
+
UNINITIALIZED_DEPLOYMENT: {
|
|
1580
|
+
number: 11000,
|
|
1581
|
+
messageTemplate: "Cannot verify contracts for nonexistant deployment at {deploymentDir}",
|
|
1582
|
+
websiteTitle: "Uninitialized deployment",
|
|
1583
|
+
websiteDescription: `Cannot verify contracts for nonexistant deployment`,
|
|
1584
|
+
},
|
|
1585
|
+
NO_CONTRACTS_DEPLOYED: {
|
|
1586
|
+
number: 11001,
|
|
1587
|
+
messageTemplate: "Cannot verify deployment {deploymentDir} as no contracts were deployed",
|
|
1588
|
+
websiteTitle: "No contracts deployed",
|
|
1589
|
+
websiteDescription: `Cannot verify deployment as no contracts were deployed`,
|
|
1590
|
+
},
|
|
1591
|
+
UNSUPPORTED_CHAIN: {
|
|
1592
|
+
number: 11002,
|
|
1593
|
+
messageTemplate: "Verification not natively supported for chainId {chainId}. Please use a custom chain configuration to add support.",
|
|
1594
|
+
websiteTitle: "Unsupported chain",
|
|
1595
|
+
websiteDescription: `Verification not natively supported for the requested chain`,
|
|
1596
|
+
},
|
|
1597
|
+
},
|
|
1598
|
+
STRATEGIES: {
|
|
1599
|
+
UNKNOWN_STRATEGY: {
|
|
1600
|
+
number: 11100,
|
|
1601
|
+
messageTemplate: `Invalid strategy name "{strategyName}", must be either 'basic' or 'create2'`,
|
|
1602
|
+
websiteTitle: "Invalid strategy name, must be either 'basic' or 'create2'",
|
|
1603
|
+
websiteDescription: "Invalid strategy, must be either 'basic' or 'create2'",
|
|
1604
|
+
},
|
|
1605
|
+
MISSING_CONFIG: {
|
|
1606
|
+
number: 11101,
|
|
1607
|
+
messageTemplate: "No strategy config passed for strategy '{strategyName}'",
|
|
1608
|
+
websiteTitle: "Missing strategy config",
|
|
1609
|
+
websiteDescription: `No strategy config passed for strategy`,
|
|
1610
|
+
},
|
|
1611
|
+
MISSING_CONFIG_PARAM: {
|
|
1612
|
+
number: 11102,
|
|
1613
|
+
messageTemplate: "Missing required strategy configuration parameter '{requiredParam}' for the strategy '{strategyName}'",
|
|
1614
|
+
websiteTitle: "Missing strategy config parameter",
|
|
1615
|
+
websiteDescription: `Missing required strategy configuration parameter`,
|
|
1616
|
+
},
|
|
1617
|
+
INVALID_CONFIG_PARAM: {
|
|
1618
|
+
number: 11103,
|
|
1619
|
+
messageTemplate: "Strategy configuration parameter '{paramName}' for the strategy '{strategyName}' is invalid: {reason}",
|
|
1620
|
+
websiteTitle: "Invalid strategy config parameter",
|
|
1621
|
+
websiteDescription: `Strategy configuration parameter is invalid`,
|
|
1622
|
+
},
|
|
1623
|
+
CREATE_X_NOT_DEPLOYED: {
|
|
1624
|
+
number: 11104,
|
|
1625
|
+
messageTemplate: "CreateX not deployed on current network {chainId}",
|
|
1626
|
+
websiteTitle: "CreateX contract not deployed",
|
|
1627
|
+
websiteDescription: `The CreateX contract is not deployed on the current network`,
|
|
1628
|
+
},
|
|
1629
|
+
},
|
|
1630
|
+
LIST_TRANSACTIONS: {
|
|
1631
|
+
UNINITIALIZED_DEPLOYMENT: {
|
|
1632
|
+
number: 11200,
|
|
1633
|
+
messageTemplate: "Cannot list transactions for nonexistant deployment at {deploymentDir}",
|
|
1634
|
+
websiteTitle: "Uninitialized deployment",
|
|
1635
|
+
websiteDescription: `Cannot list transactions for nonexistant deployment`,
|
|
1636
|
+
},
|
|
1637
|
+
},
|
|
1638
|
+
TRACK_TRANSACTIONS: {
|
|
1639
|
+
DEPLOYMENT_DIR_NOT_FOUND: {
|
|
1640
|
+
number: 11300,
|
|
1641
|
+
messageTemplate: "Deployment directory {deploymentDir} not found",
|
|
1642
|
+
websiteTitle: "Deployment directory not found",
|
|
1643
|
+
websiteDescription: `The deployment directory was not found`,
|
|
1644
|
+
},
|
|
1645
|
+
UNINITIALIZED_DEPLOYMENT: {
|
|
1646
|
+
number: 11301,
|
|
1647
|
+
messageTemplate: "Cannot track transaction for nonexistant deployment at {deploymentDir}",
|
|
1648
|
+
websiteTitle: "Uninitialized deployment",
|
|
1649
|
+
websiteDescription: `Cannot track transaction for nonexistant deployment`,
|
|
1650
|
+
},
|
|
1651
|
+
TRANSACTION_NOT_FOUND: {
|
|
1652
|
+
number: 11302,
|
|
1653
|
+
messageTemplate: `Transaction {txHash} not found. Please double check the transaction hash and try again.`,
|
|
1654
|
+
websiteTitle: "Transaction not found",
|
|
1655
|
+
websiteDescription: `The transaction hash you provided was not found on the network.`,
|
|
1656
|
+
},
|
|
1657
|
+
MATCHING_NONCE_NOT_FOUND: {
|
|
1658
|
+
number: 11303,
|
|
1659
|
+
messageTemplate: `The transaction you provided doesn't seem to belong to your deployment.
|
|
1660
|
+
Please double check the error you are getting when running Hardhat Ignition, and the instructions it's providing.`,
|
|
1661
|
+
websiteTitle: "Matching nonce not found",
|
|
1662
|
+
websiteDescription: `The transaction you provided doesn't seem to belong to your deployment.`,
|
|
1663
|
+
},
|
|
1664
|
+
KNOWN_TRANSACTION: {
|
|
1665
|
+
number: 11304,
|
|
1666
|
+
messageTemplate: `The transaction hash that you provided was already present in your deployment.
|
|
1667
|
+
Please double check the error you are getting when running Hardhat Ignition, and the instructions it's providing.`,
|
|
1668
|
+
websiteTitle: "Known transaction",
|
|
1669
|
+
websiteDescription: `The transaction hash that you provided was already present in your deployment.`,
|
|
1670
|
+
},
|
|
1671
|
+
INSUFFICIENT_CONFIRMATIONS: {
|
|
1672
|
+
number: 11305,
|
|
1673
|
+
messageTemplate: `The transaction you provided doesn't have enough confirmations yet.
|
|
1674
|
+
Please try again later.`,
|
|
1675
|
+
websiteTitle: "Insufficient confirmations",
|
|
1676
|
+
websiteDescription: `The transaction you provided doesn't have enough confirmations yet.`,
|
|
1677
|
+
},
|
|
1087
1678
|
},
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1679
|
+
},
|
|
1680
|
+
HARDHAT_ETHERS: {
|
|
1681
|
+
GENERAL: {
|
|
1682
|
+
METHOD_NOT_IMPLEMENTED: {
|
|
1683
|
+
number: 20000,
|
|
1684
|
+
messageTemplate: `Method "{method}" is not implemented`,
|
|
1685
|
+
websiteTitle: "Method not implemented",
|
|
1686
|
+
websiteDescription: "Method not implemented",
|
|
1687
|
+
},
|
|
1688
|
+
EVENT_NOT_SUPPORTED: {
|
|
1689
|
+
number: 20001,
|
|
1690
|
+
messageTemplate: `Event "{event}" is not supported`,
|
|
1691
|
+
websiteTitle: "Event not supported",
|
|
1692
|
+
websiteDescription: "Event not supported",
|
|
1693
|
+
},
|
|
1694
|
+
ACCOUNT_INDEX_OUT_OF_RANGE: {
|
|
1695
|
+
number: 20002,
|
|
1696
|
+
messageTemplate: `Tried to get account with index {accountIndex} but there are only {accountsLength} accounts`,
|
|
1697
|
+
websiteTitle: "Account index out of range",
|
|
1698
|
+
websiteDescription: "Account index out of range",
|
|
1699
|
+
},
|
|
1700
|
+
BROADCASTED_TX_DIFFERENT_HASH: {
|
|
1701
|
+
number: 20003,
|
|
1702
|
+
messageTemplate: `Expected broadcasted transaction to have hash "{txHash}", but got "{broadcastedTxHash}"`,
|
|
1703
|
+
websiteTitle: "Broadcasted transaction hash mismatch",
|
|
1704
|
+
websiteDescription: "Broadcasted transaction hash mismatch",
|
|
1705
|
+
},
|
|
1706
|
+
CANNOT_GET_ACCOUNT: {
|
|
1707
|
+
number: 20004,
|
|
1708
|
+
messageTemplate: `Cannot get account with address "{address}"`,
|
|
1709
|
+
websiteTitle: "Cannot get account",
|
|
1710
|
+
websiteDescription: "Cannot get account",
|
|
1711
|
+
},
|
|
1712
|
+
INVALID_BLOCK_TAG: {
|
|
1713
|
+
number: 20005,
|
|
1714
|
+
messageTemplate: `Invalid block tag "{blockTag}"`,
|
|
1715
|
+
websiteTitle: "Invalid block tag",
|
|
1716
|
+
websiteDescription: "Invalid block tag",
|
|
1717
|
+
},
|
|
1718
|
+
INVALID_ARTIFACT_FOR_FACTORY: {
|
|
1719
|
+
number: 20006,
|
|
1720
|
+
messageTemplate: "You are trying to create a contract factory from an artifact, but you have not passed a valid artifact parameter.",
|
|
1721
|
+
websiteTitle: "Invalid artifact for contract factory creation",
|
|
1722
|
+
websiteDescription: "Invalid artifact for contract factory creation",
|
|
1723
|
+
},
|
|
1724
|
+
INVALID_ABSTRACT_CONTRACT_FOR_FACTORY: {
|
|
1725
|
+
number: 20007,
|
|
1726
|
+
messageTemplate: `You are trying to create a contract factory for the contract "{contractName}", which is abstract and can't be deployed. If you want to call a contract using "{contractName}" as its interface use the "getContractAt" function instead.`,
|
|
1727
|
+
websiteTitle: "Invalid abstract contract for contract factory creation",
|
|
1728
|
+
websiteDescription: "Invalid abstract contract for contract factory creation",
|
|
1729
|
+
},
|
|
1730
|
+
INVALID_ADDRESS_TO_LINK_CONTRACT_TO_LIBRARY: {
|
|
1731
|
+
number: 20008,
|
|
1732
|
+
messageTemplate: `You tried to link the contract "{contractName}" with the library "{linkedLibraryName}", but you provided this invalid address: {resolvedAddress}`,
|
|
1733
|
+
websiteTitle: "Invalid address to link contract",
|
|
1734
|
+
websiteDescription: "Invalid address to link contract",
|
|
1735
|
+
},
|
|
1736
|
+
LIBRARY_NOT_AMONG_CONTRACT_LIBRARIES: {
|
|
1737
|
+
number: 20009,
|
|
1738
|
+
messageTemplate: `You tried to link the contract "{contractName}" with the library "{linkedLibraryName}", which is not one of its libraries. Detailed message: {detailedMessage}`,
|
|
1739
|
+
websiteTitle: "Library is not one of the contract libraries",
|
|
1740
|
+
websiteDescription: "Library is not one of the contract libraries",
|
|
1741
|
+
},
|
|
1742
|
+
AMBIGUOUS_LIBRARY_NAME: {
|
|
1743
|
+
number: 20010,
|
|
1744
|
+
messageTemplate: `The library name "{linkedLibraryName}" is ambiguous for the contract "{contractName}". It may resolve to one of the following libraries: "{matchingNeededLibrariesFQNs}". To fix this, choose one of these fully qualified library names and replace where appropriate.`,
|
|
1745
|
+
websiteTitle: "Ambiguous library name",
|
|
1746
|
+
websiteDescription: "Ambiguous library name",
|
|
1747
|
+
},
|
|
1748
|
+
REFERENCE_TO_SAME_LIBRARY: {
|
|
1749
|
+
number: 20011,
|
|
1750
|
+
messageTemplate: `The library names "{linkedLibraryName1}" and "{linkedLibraryName2}" refer to the same library and were given as two separate library links. Remove one of them and review your library links before proceeding.`,
|
|
1751
|
+
websiteTitle: "Reference to same library",
|
|
1752
|
+
websiteDescription: "Reference to same library",
|
|
1753
|
+
},
|
|
1754
|
+
MISSING_LINK_FOR_LIBRARY: {
|
|
1755
|
+
number: 20012,
|
|
1756
|
+
messageTemplate: `The contract "{contractName}" is missing links for the following libraries: "{missingLibraries}". Learn more about linking contracts at (https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-ethers#library-linking).`,
|
|
1757
|
+
websiteTitle: "Missing links for library",
|
|
1758
|
+
websiteDescription: "Missing links for library",
|
|
1759
|
+
},
|
|
1760
|
+
UNSUPPORTED_TYPE_FOR_DEEP_COPY: {
|
|
1761
|
+
number: 20013,
|
|
1762
|
+
messageTemplate: `The value "{value}" with type "{type}" is not supported by the deepCopy function.`,
|
|
1763
|
+
websiteTitle: "Unsupported type for deep copy",
|
|
1764
|
+
websiteDescription: "Unsupported type for deep copy",
|
|
1765
|
+
},
|
|
1766
|
+
ACCOUNTS_OF_TYPE_REMOTE: {
|
|
1767
|
+
number: 20014,
|
|
1768
|
+
messageTemplate: "Tried to obtain a private key, but the network is configured to use remote accounts.",
|
|
1769
|
+
websiteTitle: "Remote accounts are not supported",
|
|
1770
|
+
websiteDescription: "Remote accounts are not supported",
|
|
1771
|
+
},
|
|
1772
|
+
WRONG_ACCOUNTS_FORMAT: {
|
|
1773
|
+
number: 20015,
|
|
1774
|
+
messageTemplate: `The "accounts" property in your Hardhat configuration file is not set correctly.`,
|
|
1775
|
+
websiteTitle: `Invalid "accounts" property in your Hardhat configuration file`,
|
|
1776
|
+
websiteDescription: `The "accounts" property in your Hardhat configuration file is not set correctly. Please double check it and try again.`,
|
|
1777
|
+
},
|
|
1778
|
+
NO_PRIVATE_KEY_FOR_ADDRESS: {
|
|
1779
|
+
number: 20016,
|
|
1780
|
+
messageTemplate: `No private key can be associated with the address "{address}".`,
|
|
1781
|
+
websiteTitle: "Private key for the address could not be found",
|
|
1782
|
+
websiteDescription: "The private key for the address could not be found. Please double check your private keys and try again.",
|
|
1783
|
+
},
|
|
1093
1784
|
},
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1785
|
+
},
|
|
1786
|
+
HARDHAT_MOCHA: {
|
|
1787
|
+
GENERAL: {
|
|
1788
|
+
TEST_TASK_ESM_TESTS_RUN_TWICE: {
|
|
1789
|
+
number: 30000,
|
|
1790
|
+
messageTemplate: `Your project uses ESM and you've programmatically run your tests twice. This is not supported yet.`,
|
|
1791
|
+
websiteTitle: "Running tests twice in an ESM project",
|
|
1792
|
+
websiteDescription: 'You have run your tests twice programmatically and your project is an ESM project (you have `"type": "module"` in your `package.json`, or some of your files have the `.mjs` extension). This is not supported by Mocha yet (https://github.com/mochajs/mocha/issues/2706).',
|
|
1793
|
+
},
|
|
1099
1794
|
},
|
|
1100
1795
|
},
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1796
|
+
HARDHAT_VIEM: {
|
|
1797
|
+
GENERAL: {
|
|
1798
|
+
NETWORK_NOT_FOUND: {
|
|
1799
|
+
number: 40000,
|
|
1800
|
+
messageTemplate: `No network with chain id "{chainId}" found.`,
|
|
1801
|
+
websiteTitle: "Network not found",
|
|
1802
|
+
websiteDescription: `No network with the specified chain id was found. You can override the chain by passing it as a parameter to the client getter:
|
|
1803
|
+
|
|
1804
|
+
\`\`\`ts
|
|
1108
1805
|
import { someChain } from "viem/chains";
|
|
1109
1806
|
const client = await hre.viem.getPublicClient({
|
|
1110
1807
|
chain: someChain,
|
|
1111
1808
|
...
|
|
1112
1809
|
});
|
|
1810
|
+
\`\`\`
|
|
1113
1811
|
|
|
1114
1812
|
You can find a list of supported networks here: https://github.com/wevm/viem/blob/main/src/chains/index.ts`,
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1813
|
+
},
|
|
1814
|
+
UNSUPPORTED_DEVELOPMENT_NETWORK: {
|
|
1815
|
+
number: 40001,
|
|
1816
|
+
messageTemplate: "Unsupported development network detected. Hardhat and Anvil are the only supported networks.",
|
|
1817
|
+
websiteTitle: "Unsupported Development Network",
|
|
1818
|
+
websiteDescription: `The chain ID corresponds to a development network, but we were unable to identify it as either Hardhat or Anvil.
|
|
1121
1819
|
|
|
1122
1820
|
Please ensure you're using one of the supported networks.`,
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1821
|
+
},
|
|
1822
|
+
DEFAULT_WALLET_CLIENT_NOT_FOUND: {
|
|
1823
|
+
number: 40002,
|
|
1824
|
+
messageTemplate: `No default wallet client found for chain id "{chainId}".`,
|
|
1825
|
+
websiteTitle: "Default Wallet Client Not Found",
|
|
1826
|
+
websiteDescription: `A default wallet client could not be found for the specified chain ID. This issue may occur if no accounts were configured for the selected network.
|
|
1129
1827
|
|
|
1130
1828
|
To resolve this, make sure to add an account to the specified network in the Hardhat config. Alternatively, you can set a custom wallet client by passing it as a parameter in the relevant function:
|
|
1131
1829
|
|
|
1830
|
+
\`\`\`ts
|
|
1132
1831
|
const networkConnection = await hre.network.connect(...);
|
|
1133
1832
|
const walletClient = await networkConnection.viem.getWalletClient(address);
|
|
1134
1833
|
|
|
1135
1834
|
await networkConnection.viem.deployContract(contractName, constructorArgs, { walletClient });
|
|
1136
1835
|
await networkConnection.viem.sendDeploymentTransaction(contractName, constructorArgs, { walletClient });
|
|
1137
|
-
await networkConnection.viem.getContractAt(contractName, address, { walletClient })
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1836
|
+
await networkConnection.viem.getContractAt(contractName, address, { walletClient });
|
|
1837
|
+
\`\`\`
|
|
1838
|
+
`,
|
|
1839
|
+
},
|
|
1840
|
+
LINKING_CONTRACT_ERROR: {
|
|
1841
|
+
number: 40003,
|
|
1842
|
+
messageTemplate: `Error linking the contract "{contractName}":
|
|
1142
1843
|
|
|
1143
1844
|
{error}`,
|
|
1144
|
-
|
|
1145
|
-
|
|
1845
|
+
websiteTitle: "Error Linking Contract",
|
|
1846
|
+
websiteDescription: `An error occurred while linking the contract libraries.
|
|
1146
1847
|
|
|
1147
1848
|
Please check Hardhat's output for more details.`,
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1849
|
+
},
|
|
1850
|
+
INVALID_CONFIRMATIONS: {
|
|
1851
|
+
number: 40004,
|
|
1852
|
+
messageTemplate: `Invalid confirmations value. {error}`,
|
|
1853
|
+
websiteTitle: "Invalid Confirmations Value",
|
|
1854
|
+
websiteDescription: `Invalid confirmations value. The confirmations value provided is invalid.`,
|
|
1855
|
+
},
|
|
1856
|
+
DEPLOY_CONTRACT_ERROR: {
|
|
1857
|
+
number: 40005,
|
|
1858
|
+
messageTemplate: `The deployment transaction "{txHash}" was mined in block "{blockNumber}" but its receipt doesn't contain a contract address`,
|
|
1859
|
+
websiteTitle: "Deployment Transaction Error",
|
|
1860
|
+
websiteDescription: "The deployment transaction was mined but its receipt doesn't contain a contract address.",
|
|
1861
|
+
},
|
|
1160
1862
|
},
|
|
1161
1863
|
},
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1864
|
+
HARDHAT_KEYSTORE: {
|
|
1865
|
+
GENERAL: {
|
|
1866
|
+
INVALID_PASSWORD_OR_CORRUPTED_KEYSTORE: {
|
|
1867
|
+
number: 50000,
|
|
1868
|
+
messageTemplate: "Invalid password or corrupted keystore file.",
|
|
1869
|
+
websiteTitle: "Invalid password or corrupted keystore file",
|
|
1870
|
+
websiteDescription: "The password you provided is incorrect or the keystore file is corrupted.",
|
|
1871
|
+
},
|
|
1872
|
+
CANNOT_CHANGED_PASSWORD_FOR_DEV_KEYSTORE: {
|
|
1873
|
+
number: 50001,
|
|
1874
|
+
messageTemplate: `The keystore "change-password" task cannot be used with the development keystore`,
|
|
1875
|
+
websiteTitle: "Cannot change password for dev keystore",
|
|
1876
|
+
websiteDescription: `The keystore "change-password" task cannot be used with the development keystore`,
|
|
1877
|
+
},
|
|
1878
|
+
KEY_NOT_FOUND_DURING_TESTS_WITH_DEV_KEYSTORE: {
|
|
1879
|
+
number: 50002,
|
|
1880
|
+
messageTemplate: `Key "{key}" not found in the development keystore. Run "npx hardhat keystore set {key} --dev" to set it.`,
|
|
1881
|
+
websiteTitle: "Key not found in the development keystore during tests",
|
|
1882
|
+
websiteDescription: `Key not found in the development keystore. During tests, configuration variables can only be accessed through the development keystore.
|
|
1883
|
+
|
|
1884
|
+
Run \`npx hardhat keystore set <KEY> --dev\` to set it.`,
|
|
1885
|
+
},
|
|
1168
1886
|
},
|
|
1169
1887
|
},
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
websiteTitle: "Should not get an indexed event when the assertion type is not event",
|
|
1248
|
-
websiteDescription: "Should not get an indexed event when the assertion type is not event",
|
|
1249
|
-
},
|
|
1250
|
-
PANIC_CODE_EXPECTED: {
|
|
1251
|
-
number: 1513,
|
|
1252
|
-
messageTemplate: `Expected the given panic code to be a number-like value, but got "{panicCode}"`,
|
|
1253
|
-
websiteTitle: "Expected the given panic code to be a number-like value",
|
|
1254
|
-
websiteDescription: "Expected the given panic code to be a number-like value",
|
|
1255
|
-
},
|
|
1256
|
-
ACCOUNTS_NUMBER_DIFFERENT_FROM_BALANCE_CHANGES: {
|
|
1257
|
-
number: 1514,
|
|
1258
|
-
messageTemplate: `The number of accounts ({accounts}) is different than the number of expected balance changes ({balanceChanges})`,
|
|
1259
|
-
websiteTitle: "The number of accounts is different than the number of expected balance changes",
|
|
1260
|
-
websiteDescription: "The number of accounts is different than the number of expected balance changes",
|
|
1261
|
-
},
|
|
1262
|
-
FIRST_ARGUMENT_MUST_BE_A_CONTRACT_INSTANCE: {
|
|
1263
|
-
number: 1515,
|
|
1264
|
-
messageTemplate: `The first argument of "{method}" must be the contract instance of the token`,
|
|
1265
|
-
websiteTitle: "First argument must be a contract instance",
|
|
1266
|
-
websiteDescription: "First argument must be a contract instance",
|
|
1267
|
-
},
|
|
1268
|
-
CONTRACT_IS_NOT_AN_ERC20_TOKEN: {
|
|
1269
|
-
number: 1516,
|
|
1270
|
-
messageTemplate: `The given contract instance is not an ERC20 token`,
|
|
1271
|
-
websiteTitle: "Given contract instance is not an ERC20 token",
|
|
1272
|
-
websiteDescription: "Given contract instance is not an ERC20 token",
|
|
1273
|
-
},
|
|
1274
|
-
INVALID_TRANSACTION: {
|
|
1275
|
-
number: 1517,
|
|
1276
|
-
messageTemplate: '"{transaction}" is not a valid transaction',
|
|
1277
|
-
websiteTitle: "Invalid transaction",
|
|
1278
|
-
websiteDescription: "Invalid transaction",
|
|
1279
|
-
},
|
|
1280
|
-
CONTRACT_TARGET_MUST_BE_A_STRING: {
|
|
1281
|
-
number: 1518,
|
|
1282
|
-
messageTemplate: "The contract target should be a string",
|
|
1283
|
-
websiteTitle: "Contract target must be a string",
|
|
1284
|
-
websiteDescription: "Contract target must be a string",
|
|
1285
|
-
},
|
|
1286
|
-
EMIT_EXPECTS_TWO_ARGUMENTS: {
|
|
1287
|
-
number: 1519,
|
|
1288
|
-
messageTemplate: "The .emit matcher expects two arguments: the contract and the event name. Arguments should be asserted with the .withArgs helper.",
|
|
1289
|
-
websiteTitle: "Invalid arguments length for the .emit matcher",
|
|
1290
|
-
websiteDescription: "Invalid arguments length for the .emit matcher",
|
|
1291
|
-
},
|
|
1292
|
-
CONTRACT_RUNNER_PROVIDER_NOT_NULL: {
|
|
1293
|
-
number: 1520,
|
|
1294
|
-
messageTemplate: "contract.runner.provider shouldn't be null",
|
|
1295
|
-
websiteTitle: "Contract runner's provider shouldn't be null",
|
|
1296
|
-
websiteDescription: "Contract runner's provider shouldn't be null",
|
|
1297
|
-
},
|
|
1298
|
-
WITH_ARGS_CANNOT_BE_COMBINED_WITH_NOT: {
|
|
1299
|
-
number: 1521,
|
|
1300
|
-
messageTemplate: "Do not combine .not. with .withArgs()",
|
|
1301
|
-
websiteTitle: "Do not combine .not. with .withArgs()",
|
|
1302
|
-
websiteDescription: "Do not combine .not. with .withArgs()",
|
|
1303
|
-
},
|
|
1304
|
-
WITH_ARGS_WRONG_COMBINATION: {
|
|
1305
|
-
number: 1522,
|
|
1306
|
-
messageTemplate: "withArgs can only be used in combination with a previous .emit or .revertedWithCustomError assertion",
|
|
1307
|
-
websiteTitle: "withArgs can only be used in combination with a previous .emit or .revertedWithCustomError assertion",
|
|
1308
|
-
websiteDescription: "withArgs can only be used in combination with a previous .emit or .revertedWithCustomError assertion",
|
|
1309
|
-
},
|
|
1310
|
-
WITH_ARGS_COMBINED_WITH_INCOMPATIBLE_ASSERTIONS: {
|
|
1311
|
-
number: 1523,
|
|
1312
|
-
messageTemplate: "withArgs called with both .emit and .revertedWithCustomError, but these assertions cannot be combined",
|
|
1313
|
-
websiteTitle: "withArgs called with both .emit and .revertedWithCustomError, but these assertions cannot be combined",
|
|
1314
|
-
websiteDescription: "withArgs called with both .emit and .revertedWithCustomError, but these assertions cannot be combined",
|
|
1315
|
-
},
|
|
1316
|
-
},
|
|
1317
|
-
ARTIFACTS: {
|
|
1318
|
-
NOT_FOUND: {
|
|
1319
|
-
number: 1600,
|
|
1320
|
-
messageTemplate: 'Artifact for contract "{contractName}" not found. {suggestion}',
|
|
1321
|
-
websiteTitle: "Artifact not found",
|
|
1322
|
-
websiteDescription: `Tried to read a nonexistent artifact.
|
|
1888
|
+
NETWORK_HELPERS: {
|
|
1889
|
+
GENERAL: {
|
|
1890
|
+
ONLY_ALLOW_0X_PREFIXED_STRINGS: {
|
|
1891
|
+
number: 60000,
|
|
1892
|
+
messageTemplate: `Only hex-encoded strings prefixed with "0x" are accepted`,
|
|
1893
|
+
websiteTitle: `Only hex-encoded strings prefixed with "0x" are accepted`,
|
|
1894
|
+
websiteDescription: `Only hex-encoded strings prefixed with "0x" are accepted`,
|
|
1895
|
+
},
|
|
1896
|
+
CANNOT_CONVERT_TO_RPC_QUANTITY: {
|
|
1897
|
+
number: 60001,
|
|
1898
|
+
messageTemplate: `The value "{value}" cannot be converted into an RPC quantity`,
|
|
1899
|
+
websiteTitle: "Cannot converted into an RPC quantity",
|
|
1900
|
+
websiteDescription: "The value cannot be converted into an RPC quantity",
|
|
1901
|
+
},
|
|
1902
|
+
INVALID_HEX_STRING: {
|
|
1903
|
+
number: 60002,
|
|
1904
|
+
messageTemplate: `"{value}" is not a valid hex string`,
|
|
1905
|
+
websiteTitle: "Invalid hex string",
|
|
1906
|
+
websiteDescription: "The value is not a valid hex string",
|
|
1907
|
+
},
|
|
1908
|
+
INVALID_TX_HASH: {
|
|
1909
|
+
number: 60003,
|
|
1910
|
+
messageTemplate: `"{value}" is not a valid transaction hash`,
|
|
1911
|
+
websiteTitle: "Invalid transaction hash",
|
|
1912
|
+
websiteDescription: "The value is not a valid transaction hash",
|
|
1913
|
+
},
|
|
1914
|
+
INVALID_ADDRESS: {
|
|
1915
|
+
number: 60004,
|
|
1916
|
+
messageTemplate: `"{value}" is not a valid address`,
|
|
1917
|
+
websiteTitle: "Invalid address",
|
|
1918
|
+
websiteDescription: "The value is not a valid address",
|
|
1919
|
+
},
|
|
1920
|
+
INVALID_CHECKSUM_ADDRESS: {
|
|
1921
|
+
number: 60005,
|
|
1922
|
+
messageTemplate: `Address "{value}" has an invalid checksum`,
|
|
1923
|
+
websiteTitle: "Invalid checksum address",
|
|
1924
|
+
websiteDescription: "The address has an invalid checksum",
|
|
1925
|
+
},
|
|
1926
|
+
BLOCK_NUMBER_SMALLER_THAN_CURRENT: {
|
|
1927
|
+
number: 60006,
|
|
1928
|
+
messageTemplate: `The block number "{newValue}" is smaller than the current block number "{currentValue}"`,
|
|
1929
|
+
websiteTitle: "Block number smaller than the current block number",
|
|
1930
|
+
websiteDescription: "The block number is smaller than the current block number",
|
|
1931
|
+
},
|
|
1932
|
+
EVM_SNAPSHOT_VALUE_NOT_A_STRING: {
|
|
1933
|
+
number: 60007,
|
|
1934
|
+
messageTemplate: `The value returned by evm_snapshot should be a string`,
|
|
1935
|
+
websiteTitle: "The evm_snapshot value should be a string",
|
|
1936
|
+
websiteDescription: "The value returned by evm_snapshot should be a string",
|
|
1937
|
+
},
|
|
1938
|
+
EVM_REVERT_VALUE_NOT_A_BOOLEAN: {
|
|
1939
|
+
number: 60008,
|
|
1940
|
+
messageTemplate: `The value returned by evm_revert should be a boolean`,
|
|
1941
|
+
websiteTitle: "The evm_revert value should be a boolean",
|
|
1942
|
+
websiteDescription: "The value returned by evm_revert should be a boolean",
|
|
1943
|
+
},
|
|
1944
|
+
INVALID_SNAPSHOT: {
|
|
1945
|
+
number: 60009,
|
|
1946
|
+
messageTemplate: `Trying to restore an invalid snapshot.`,
|
|
1947
|
+
websiteTitle: "Trying to restore an invalid snapshot.",
|
|
1948
|
+
websiteDescription: "Trying to restore an invalid snapshot.",
|
|
1949
|
+
},
|
|
1950
|
+
EXPECTED_NON_NEGATIVE_NUMBER: {
|
|
1951
|
+
number: 60010,
|
|
1952
|
+
messageTemplate: `Invalid input: expected a non-negative number but "{value}" was given.`,
|
|
1953
|
+
websiteTitle: "Invalid input, expected a non-negative number",
|
|
1954
|
+
websiteDescription: "Invalid input, expected a non-negative number",
|
|
1955
|
+
},
|
|
1956
|
+
CANNOT_CONVERT_NEGATIVE_NUMBER_TO_RPC_QUANTITY: {
|
|
1957
|
+
number: 60011,
|
|
1958
|
+
messageTemplate: `Cannot convert negative number "{value}" to RPC quantity`,
|
|
1959
|
+
websiteTitle: "Cannot convert negative number to RPC quantity",
|
|
1960
|
+
websiteDescription: "Cannot convert negative number to RPC quantity",
|
|
1961
|
+
},
|
|
1962
|
+
FIXTURE_ANONYMOUS_FUNCTION_ERROR: {
|
|
1963
|
+
number: 60012,
|
|
1964
|
+
messageTemplate: `Anonymous functions cannot be used as fixtures.
|
|
1323
1965
|
|
|
1324
|
-
|
|
1325
|
-
},
|
|
1326
|
-
MULTIPLE_FOUND: {
|
|
1327
|
-
number: 1601,
|
|
1328
|
-
messageTemplate: `There are multiple artifacts for contract "{contractName}", please use a fully qualified name.
|
|
1966
|
+
You probably did something like this:
|
|
1329
1967
|
|
|
1330
|
-
|
|
1968
|
+
loadFixture(async () => ... );
|
|
1331
1969
|
|
|
1332
|
-
|
|
1333
|
-
`,
|
|
1334
|
-
websiteTitle: "Multiple artifacts found",
|
|
1335
|
-
websiteDescription: `There are multiple artifacts that match the given contract name, and Hardhat doesn't know which one to use.
|
|
1970
|
+
Instead, define a fixture function and refer to that same function in each call to loadFixture.
|
|
1336
1971
|
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
messageTemplate: "Hardhat Ignition Internal Error",
|
|
1345
|
-
websiteTitle: "An internal error to Hardhat Ignition has occurred",
|
|
1346
|
-
websiteDescription: `An internal error to Hardhat Ignition has occurred`,
|
|
1347
|
-
},
|
|
1348
|
-
ETHERSCAN_API_KEY_NOT_CONFIGURED: {
|
|
1349
|
-
number: 1701,
|
|
1350
|
-
messageTemplate: "No etherscan API key configured",
|
|
1351
|
-
websiteTitle: "No etherscan API key configured",
|
|
1352
|
-
websiteDescription: `You are trying to run verification during a Hardhat Ignition deploy, but there is no Etherscan API Key set.`,
|
|
1353
|
-
},
|
|
1354
|
-
CANNOT_RESET_EPHEMERAL_NETWORK: {
|
|
1355
|
-
number: 1702,
|
|
1356
|
-
messageTemplate: "Deploy cancelled: Cannot reset deployment on ephemeral Hardhat network",
|
|
1357
|
-
websiteTitle: "Cannot reset deployment on ephemeral Hardhat network",
|
|
1358
|
-
websiteDescription: `The reset flag can only used against a persistent network. You are trying to reset a deployment against an in-memory network.`,
|
|
1359
|
-
},
|
|
1360
|
-
UNKNOWN_STRATEGY: {
|
|
1361
|
-
number: 1703,
|
|
1362
|
-
messageTemplate: `Invalid strategy name "{strategyName}", must be either 'basic' or 'create2'`,
|
|
1363
|
-
websiteTitle: "Invalid strategy name, must be either 'basic' or 'create2'",
|
|
1364
|
-
websiteDescription: "Invalid strategy, must be either 'basic' or 'create2'",
|
|
1365
|
-
},
|
|
1366
|
-
NO_MODULES_FOUND: {
|
|
1367
|
-
number: 1704,
|
|
1368
|
-
messageTemplate: "No Ignition modules found",
|
|
1369
|
-
websiteTitle: "No Ignition modules found",
|
|
1370
|
-
websiteDescription: "Ignition was unable to find the module requested for deployment.",
|
|
1371
|
-
},
|
|
1372
|
-
FAILED_TO_PARSE_JSON: {
|
|
1373
|
-
number: 1705,
|
|
1374
|
-
messageTemplate: "Could not parse JSON parameters",
|
|
1375
|
-
websiteTitle: "Could not parse JSON parameters",
|
|
1376
|
-
websiteDescription: "Ignition failed to parse the JSON parameters for deployment. Review the JSON and try again.",
|
|
1377
|
-
},
|
|
1378
|
-
INVALID_DEPLOYMENT_ID: {
|
|
1379
|
-
number: 1706,
|
|
1380
|
-
messageTemplate: `The deployment-id "{deploymentId}" contains banned characters, ids can only contain alphanumerics, dashes or underscores`,
|
|
1381
|
-
websiteTitle: "The deployment-id contains banned characters",
|
|
1382
|
-
websiteDescription: "The deployment-id being used for the Hardhat Ignition deployment contains banned characters. Deployment ids can only contain alphanumerics, dashes or underscores.",
|
|
1383
|
-
},
|
|
1384
|
-
IGNITION_CLIENT_EXTENSION_NOT_INSTALLED: {
|
|
1385
|
-
number: 1707,
|
|
1386
|
-
messageTemplate: "Please install either `@nomicfoundation/hardhat-ignition-viem` or `@nomicfoundation/hardhat-ignition-ethers` to use Ignition in your Hardhat tests",
|
|
1387
|
-
websiteTitle: "Neither the `viem` or `ethers` Ignition extension plugin is installed.",
|
|
1388
|
-
websiteDescription: "Please install either `@nomicfoundation/hardhat-ignition-viem` or `@nomicfoundation/hardhat-ignition-ethers` to use Ignition in your Hardhat tests",
|
|
1389
|
-
},
|
|
1390
|
-
UNKNOWN_TRANSACTION_TYPE: {
|
|
1391
|
-
number: 1708,
|
|
1392
|
-
shouldBeReported: true,
|
|
1393
|
-
messageTemplate: `Unknown transaction type: "{type}"`,
|
|
1394
|
-
websiteTitle: "Hardhat Ignition was unable to display an unknown transaction type",
|
|
1395
|
-
websiteDescription: "Hardhat Ignition was unable to display an unknown transaction type",
|
|
1396
|
-
},
|
|
1397
|
-
PARAMETER_EXCEEDS_MAXIMUM_SAFE_INTEGER: {
|
|
1398
|
-
number: 1709,
|
|
1399
|
-
messageTemplate: `Parameter "{parameter}" exceeds maximum safe integer size. Encode the value as a string using bigint notation: "{value}n"`,
|
|
1400
|
-
websiteTitle: "Parameter exceeds maximum safe integer size",
|
|
1401
|
-
websiteDescription: "Parameter exceeds maximum safe integer size",
|
|
1402
|
-
},
|
|
1403
|
-
MODULE_VALIDATION_FAILED: {
|
|
1404
|
-
number: 1710,
|
|
1405
|
-
messageTemplate: "Module validation failed. Check the stack trace above to identify the issue and its source code location.",
|
|
1406
|
-
websiteTitle: "Module validation failed.",
|
|
1407
|
-
websiteDescription: "Hardhat Ignition found problems while validating the module. Please review the module and try again.",
|
|
1408
|
-
},
|
|
1409
|
-
FAILED_TO_PARSE_DEPLOYMENT_PARAMETERS: {
|
|
1410
|
-
number: 1711,
|
|
1411
|
-
messageTemplate: `Could not parse parameters from "{filepath}"`,
|
|
1412
|
-
websiteTitle: "Parsing of deployment parameters failed.",
|
|
1413
|
-
websiteDescription: "Parsing of deployment parameters failed.",
|
|
1414
|
-
},
|
|
1415
|
-
VISUALIZATION_TEMPLATE_DIR_NOT_FOUND: {
|
|
1416
|
-
number: 1712,
|
|
1417
|
-
shouldBeReported: true,
|
|
1418
|
-
messageTemplate: `Unable to find template directory: "{templateDir}"`,
|
|
1419
|
-
websiteTitle: "Visualization template directory not found",
|
|
1420
|
-
websiteDescription: "Visualization template directory not found",
|
|
1421
|
-
},
|
|
1422
|
-
MODULE_NOT_FOUND_AT_PATH: {
|
|
1423
|
-
number: 1713,
|
|
1424
|
-
messageTemplate: `Could not find a module file at the path: "{modulePath}"`,
|
|
1425
|
-
websiteTitle: "Ignition module not found",
|
|
1426
|
-
websiteDescription: "Hardhat Ignition was not able to find an Ignition Module at the given path.",
|
|
1427
|
-
},
|
|
1428
|
-
MODULE_OUTSIDE_MODULE_DIRECTORY: {
|
|
1429
|
-
number: 1714,
|
|
1430
|
-
messageTemplate: `The referenced module file "{modulePath}" is outside the module directory "{shortModulesDirectoryName}"`,
|
|
1431
|
-
websiteTitle: "Ignition module outside of module directory",
|
|
1432
|
-
websiteDescription: "Ignition modules must be located within the module directory.",
|
|
1433
|
-
},
|
|
1434
|
-
VIEM_TEST_HELPER_ERROR: {
|
|
1435
|
-
number: 1715,
|
|
1436
|
-
messageTemplate: `Hardhat Ignition Viem Test Error: {message}`,
|
|
1437
|
-
websiteTitle: "Test error in Hardhat Ignition Viem's test helper",
|
|
1438
|
-
websiteDescription: "Test error in Hardhat Ignition Viem's test helper.",
|
|
1439
|
-
},
|
|
1440
|
-
ARTIFACT_PATH_NOT_FOUND: {
|
|
1441
|
-
number: 1716,
|
|
1442
|
-
messageTemplate: `Artifact path not found for "{contractName}"`,
|
|
1443
|
-
websiteTitle: "Hardhat Ignition unable to find artifact path for the contract name",
|
|
1444
|
-
websiteDescription: "Hardhat Ignition unable to find artifact path for the contract name",
|
|
1445
|
-
},
|
|
1446
|
-
ONLY_ONE_IGNITION_EXTENSION_PLUGIN_ALLOWED: {
|
|
1447
|
-
number: 1717,
|
|
1448
|
-
messageTemplate: "Found ethers and viem, but only one Hardhat Ignition extension plugin can be used at a time",
|
|
1449
|
-
websiteTitle: "Only one Ignition extension plugin allowed",
|
|
1450
|
-
websiteDescription: `Both the ethers and viem Ignition extension plugins were found, but only one can be used at a time.
|
|
1972
|
+
Learn more at (https://hardhat.org/hardhat-network-helpers/docs/reference#fixtures)`,
|
|
1973
|
+
websiteTitle: "Anonymous functions cannot be used as fixtures",
|
|
1974
|
+
websiteDescription: "Anonymous functions cannot be used as fixtures",
|
|
1975
|
+
},
|
|
1976
|
+
FIXTURE_SNAPSHOT_ERROR: {
|
|
1977
|
+
number: 60013,
|
|
1978
|
+
messageTemplate: `There was an error reverting the snapshot of the fixture.
|
|
1451
1979
|
|
|
1452
|
-
|
|
1980
|
+
This might be caused by using hardhat_reset and loadFixture calls in a testcase.`,
|
|
1981
|
+
websiteTitle: "Error while reverting snapshot",
|
|
1982
|
+
websiteDescription: "Error while reverting snapshot",
|
|
1983
|
+
},
|
|
1984
|
+
CAN_ONLY_BE_USED_WITH_HARDHAT_NETWORK: {
|
|
1985
|
+
number: 60014,
|
|
1986
|
+
messageTemplate: `This helper can only be used with the Hardhat Network. You are connected to "{networkName}".`,
|
|
1987
|
+
websiteTitle: "Hardhat network helpers can only be used with the Hardhat Network",
|
|
1988
|
+
websiteDescription: "Hardhat network helpers can only be used with the Hardhat Network",
|
|
1989
|
+
},
|
|
1990
|
+
CAN_ONLY_BE_USED_WITH_HARDHAT_NETWORK_VERSIONED: {
|
|
1991
|
+
number: 60015,
|
|
1992
|
+
messageTemplate: `This helper can only be used with the Hardhat Network. You are connected to "{networkName}", whose identifier is "{version}".`,
|
|
1993
|
+
websiteTitle: "Hardhat network helpers can only be used with the Hardhat Network - version info",
|
|
1994
|
+
websiteDescription: "Hardhat network helpers can only be used with the Hardhat Network",
|
|
1995
|
+
},
|
|
1453
1996
|
},
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1997
|
+
},
|
|
1998
|
+
CHAI_MATCHERS: {
|
|
1999
|
+
GENERAL: {
|
|
2000
|
+
UNKNOWN_COMPARISON_OPERATION: {
|
|
2001
|
+
number: 70000,
|
|
2002
|
+
messageTemplate: `Unknown comparison operation "{method}"`,
|
|
2003
|
+
websiteTitle: "Unknown comparison operation",
|
|
2004
|
+
websiteDescription: "Unknown comparison operation",
|
|
2005
|
+
},
|
|
2006
|
+
EXPECTED_STRING_OR_ADDRESSABLE: {
|
|
2007
|
+
number: 70001,
|
|
2008
|
+
messageTemplate: `Expected string or addressable, but got "{account}"`,
|
|
2009
|
+
websiteTitle: "Expected string or addressable",
|
|
2010
|
+
websiteDescription: "Expected string or addressable",
|
|
2011
|
+
},
|
|
2012
|
+
ASSERTION_WITHOUT_ERROR_MESSAGE: {
|
|
2013
|
+
number: 70002,
|
|
2014
|
+
messageTemplate: `Assertion doesn't have an error message. Please open an issue to report this.`,
|
|
2015
|
+
websiteTitle: "Assertion doesn't have an error message",
|
|
2016
|
+
websiteDescription: `Assertion doesn't have an error message. Please open an issue to report this.`,
|
|
2017
|
+
shouldBeReported: true,
|
|
2018
|
+
},
|
|
2019
|
+
MATCHER_CANNOT_BE_CHAINED_AFTER: {
|
|
2020
|
+
number: 70003,
|
|
2021
|
+
messageTemplate: `The matcher "{matcher}" cannot be chained after "{previousMatcher}". For more information, please refer to the documentation at: (https://hardhat.org/chaining-async-matchers).`,
|
|
2022
|
+
websiteTitle: "Matcher cannot be chained after",
|
|
2023
|
+
websiteDescription: `The matcher cannot be chained after another matcher. Please open an issue to report this.`,
|
|
2024
|
+
},
|
|
2025
|
+
DECODING_ERROR: {
|
|
2026
|
+
number: 70004,
|
|
2027
|
+
messageTemplate: `There was an error decoding "{encodedData}" as a "{type}. Reason: {reason}"`,
|
|
2028
|
+
websiteTitle: "Error while decoding data",
|
|
2029
|
+
websiteDescription: `There was an error decoding data`,
|
|
2030
|
+
},
|
|
2031
|
+
EXPECTED_VALID_TRANSACTION_HASH: {
|
|
2032
|
+
number: 70005,
|
|
2033
|
+
messageTemplate: `Expected a valid transaction hash, but got "{hash}"`,
|
|
2034
|
+
websiteTitle: "Expected a valid transaction hash",
|
|
2035
|
+
websiteDescription: `Expected a valid transaction hash`,
|
|
2036
|
+
},
|
|
2037
|
+
EXPECT_STRING_OR_REGEX_AS_REVERT_REASON: {
|
|
2038
|
+
number: 70006,
|
|
2039
|
+
messageTemplate: "Expected the revert reason to be a string or a regular expression",
|
|
2040
|
+
websiteTitle: "Expected the revert reason to be a string or a regular expression",
|
|
2041
|
+
websiteDescription: "Expected the revert reason to be a string or a regular expression",
|
|
2042
|
+
},
|
|
2043
|
+
FIRST_ARGUMENT_MUST_BE_A_CONTRACT: {
|
|
2044
|
+
number: 70007,
|
|
2045
|
+
messageTemplate: "The first argument of .revertedWithCustomError must be the contract that defines the custom error",
|
|
2046
|
+
websiteTitle: "First argument must be a contract",
|
|
2047
|
+
websiteDescription: "First argument must be a contract",
|
|
2048
|
+
},
|
|
2049
|
+
STRING_EXPECTED_AS_CUSTOM_ERROR_NAME: {
|
|
2050
|
+
number: 70008,
|
|
2051
|
+
messageTemplate: "Expected the custom error name to be a string",
|
|
2052
|
+
websiteTitle: "Expected the custom error name to be a string",
|
|
2053
|
+
websiteDescription: "Expected the custom error name to be a string",
|
|
2054
|
+
},
|
|
2055
|
+
CONTRACT_DOES_NOT_HAVE_CUSTOM_ERROR: {
|
|
2056
|
+
number: 70009,
|
|
2057
|
+
messageTemplate: `The given contract doesn't have a custom error named "{customErrorName}"`,
|
|
2058
|
+
websiteTitle: "Contract doesn't have a custom error with the specified name",
|
|
2059
|
+
websiteDescription: "Contract doesn't have a custom error with the specified name",
|
|
2060
|
+
},
|
|
2061
|
+
REVERT_INVALID_ARGUMENTS_LENGTH: {
|
|
2062
|
+
number: 70010,
|
|
2063
|
+
messageTemplate: "The .revertedWithCustomError matcher expects two arguments: the contract and the custom error name. Arguments should be asserted with the .withArgs helper.",
|
|
2064
|
+
websiteTitle: "Invalid arguments length for the .revertedWithCustomError matcher",
|
|
2065
|
+
websiteDescription: "Invalid arguments length for the .revertedWithCustomError matcher",
|
|
2066
|
+
},
|
|
2067
|
+
WITH_ARGS_FORBIDDEN: {
|
|
2068
|
+
number: 70011,
|
|
2069
|
+
messageTemplate: "[.withArgs] should never happen, please submit an issue to the Hardhat repository",
|
|
2070
|
+
websiteTitle: "[.withArgs] should never happen, please submit an issue to the Hardhat repository",
|
|
2071
|
+
websiteDescription: "[.withArgs] should never happen, please submit an issue to the Hardhat repository",
|
|
2072
|
+
},
|
|
2073
|
+
INDEXED_EVENT_FORBIDDEN: {
|
|
2074
|
+
number: 70012,
|
|
2075
|
+
messageTemplate: "Should not get an indexed event when the assertion type is not event. Please open an issue about this.",
|
|
2076
|
+
websiteTitle: "Should not get an indexed event when the assertion type is not event",
|
|
2077
|
+
websiteDescription: "Should not get an indexed event when the assertion type is not event",
|
|
2078
|
+
},
|
|
2079
|
+
PANIC_CODE_EXPECTED: {
|
|
2080
|
+
number: 70013,
|
|
2081
|
+
messageTemplate: `Expected the given panic code to be a number-like value, but got "{panicCode}"`,
|
|
2082
|
+
websiteTitle: "Expected the given panic code to be a number-like value",
|
|
2083
|
+
websiteDescription: "Expected the given panic code to be a number-like value",
|
|
2084
|
+
},
|
|
2085
|
+
ACCOUNTS_NUMBER_DIFFERENT_FROM_BALANCE_CHANGES: {
|
|
2086
|
+
number: 70014,
|
|
2087
|
+
messageTemplate: `The number of accounts ({accounts}) is different than the number of expected balance changes ({balanceChanges})`,
|
|
2088
|
+
websiteTitle: "The number of accounts is different than the number of expected balance changes",
|
|
2089
|
+
websiteDescription: "The number of accounts is different than the number of expected balance changes",
|
|
2090
|
+
},
|
|
2091
|
+
FIRST_ARGUMENT_MUST_BE_A_CONTRACT_INSTANCE: {
|
|
2092
|
+
number: 70015,
|
|
2093
|
+
messageTemplate: `The first argument of "{method}" must be the contract instance of the token`,
|
|
2094
|
+
websiteTitle: "First argument must be a contract instance",
|
|
2095
|
+
websiteDescription: "First argument must be a contract instance",
|
|
2096
|
+
},
|
|
2097
|
+
CONTRACT_IS_NOT_AN_ERC20_TOKEN: {
|
|
2098
|
+
number: 70016,
|
|
2099
|
+
messageTemplate: `The given contract instance is not an ERC20 token`,
|
|
2100
|
+
websiteTitle: "Given contract instance is not an ERC20 token",
|
|
2101
|
+
websiteDescription: "Given contract instance is not an ERC20 token",
|
|
2102
|
+
},
|
|
2103
|
+
INVALID_TRANSACTION: {
|
|
2104
|
+
number: 70017,
|
|
2105
|
+
messageTemplate: '"{transaction}" is not a valid transaction',
|
|
2106
|
+
websiteTitle: "Invalid transaction",
|
|
2107
|
+
websiteDescription: "Invalid transaction",
|
|
2108
|
+
},
|
|
2109
|
+
CONTRACT_TARGET_MUST_BE_A_STRING: {
|
|
2110
|
+
number: 70018,
|
|
2111
|
+
messageTemplate: "The contract target should be a string",
|
|
2112
|
+
websiteTitle: "Contract target must be a string",
|
|
2113
|
+
websiteDescription: "Contract target must be a string",
|
|
2114
|
+
},
|
|
2115
|
+
EMIT_EXPECTS_TWO_ARGUMENTS: {
|
|
2116
|
+
number: 70019,
|
|
2117
|
+
messageTemplate: "The .emit matcher expects two arguments: the contract and the event name. Arguments should be asserted with the .withArgs helper.",
|
|
2118
|
+
websiteTitle: "Invalid arguments length for the .emit matcher",
|
|
2119
|
+
websiteDescription: "Invalid arguments length for the .emit matcher",
|
|
2120
|
+
},
|
|
2121
|
+
CONTRACT_RUNNER_PROVIDER_NOT_NULL: {
|
|
2122
|
+
number: 70020,
|
|
2123
|
+
messageTemplate: "contract.runner.provider shouldn't be null",
|
|
2124
|
+
websiteTitle: "Contract runner's provider shouldn't be null",
|
|
2125
|
+
websiteDescription: "Contract runner's provider shouldn't be null",
|
|
2126
|
+
},
|
|
2127
|
+
WITH_ARGS_CANNOT_BE_COMBINED_WITH_NOT: {
|
|
2128
|
+
number: 70021,
|
|
2129
|
+
messageTemplate: "Do not combine .not. with .withArgs()",
|
|
2130
|
+
websiteTitle: "Do not combine .not. with .withArgs()",
|
|
2131
|
+
websiteDescription: "Do not combine .not. with .withArgs()",
|
|
2132
|
+
},
|
|
2133
|
+
WITH_ARGS_WRONG_COMBINATION: {
|
|
2134
|
+
number: 70022,
|
|
2135
|
+
messageTemplate: "withArgs can only be used in combination with a previous .emit or .revertedWithCustomError assertion",
|
|
2136
|
+
websiteTitle: "withArgs can only be used in combination with a previous .emit or .revertedWithCustomError assertion",
|
|
2137
|
+
websiteDescription: "withArgs can only be used in combination with a previous .emit or .revertedWithCustomError assertion",
|
|
2138
|
+
},
|
|
2139
|
+
WITH_ARGS_COMBINED_WITH_INCOMPATIBLE_ASSERTIONS: {
|
|
2140
|
+
number: 70023,
|
|
2141
|
+
messageTemplate: "withArgs called with both .emit and .revertedWithCustomError, but these assertions cannot be combined",
|
|
2142
|
+
websiteTitle: "withArgs called with both .emit and .revertedWithCustomError, but these assertions cannot be combined",
|
|
2143
|
+
websiteDescription: "withArgs called with both .emit and .revertedWithCustomError, but these assertions cannot be combined",
|
|
2144
|
+
},
|
|
2145
|
+
DEPRECATED_REVERTED_MATCHER: {
|
|
2146
|
+
number: 70024,
|
|
2147
|
+
messageTemplate: "The .reverted matcher has been deprecated. Use .revert(ethers) instead.",
|
|
2148
|
+
websiteTitle: "Deprecated `reverted` matcher",
|
|
2149
|
+
websiteDescription: "The `.reverted` matcher was deprecated and you should use `.revert(ethers)` instead.",
|
|
2150
|
+
},
|
|
1461
2151
|
},
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
2152
|
+
},
|
|
2153
|
+
HARDHAT_VERIFY: {
|
|
2154
|
+
GENERAL: {
|
|
2155
|
+
NETWORK_NOT_SUPPORTED: {
|
|
2156
|
+
number: 80000,
|
|
2157
|
+
messageTemplate: `The network "{networkName}" with chain id "{chainId}" is not supported.`,
|
|
2158
|
+
websiteTitle: "Network not supported",
|
|
2159
|
+
websiteDescription: `The network is not supported by hardhat-verify. To see the list of supported networks, run:
|
|
2160
|
+
|
|
2161
|
+
\`\`\`sh
|
|
2162
|
+
npx hardhat verify --list-networks
|
|
2163
|
+
\`\`\`
|
|
2164
|
+
|
|
2165
|
+
To add support for a new network, see https://hardhat.org/verify-custom-networks`,
|
|
2166
|
+
},
|
|
2167
|
+
EXPLORER_REQUEST_FAILED: {
|
|
2168
|
+
number: 80001,
|
|
2169
|
+
messageTemplate: `The request to {url} failed with the message "{errorMessage}". This error comes from {name}, not Hardhat.`,
|
|
2170
|
+
websiteTitle: "Explorer request failed",
|
|
2171
|
+
websiteDescription: `The request to the explorer failed.
|
|
2172
|
+
|
|
2173
|
+
- Verify that the URL is correct.
|
|
2174
|
+
- Ensure the service is up and reachable.
|
|
2175
|
+
- Check your network connection and try again.`,
|
|
2176
|
+
},
|
|
2177
|
+
EXPLORER_REQUEST_STATUS_CODE_ERROR: {
|
|
2178
|
+
number: 80002,
|
|
2179
|
+
messageTemplate: `The request to {url} returned a non-success status code {statusCode}: "{errorMessage}". (This response comes from {name}, not Hardhat.)`,
|
|
2180
|
+
websiteTitle: "Explorer request status code error",
|
|
2181
|
+
websiteDescription: `The request to the explorer returned a non-success status code.
|
|
2182
|
+
|
|
2183
|
+
- Verify that the URL is correct.
|
|
2184
|
+
- Ensure the service is up and reachable.
|
|
2185
|
+
- Check your network connection and try again.`,
|
|
2186
|
+
},
|
|
2187
|
+
SOLC_VERSION_NOT_SUPPORTED: {
|
|
2188
|
+
number: 80003,
|
|
2189
|
+
messageTemplate: `The following Solidity compiler versions are not supported by the Etherscan API: {unsupportedSolcVersions}.`,
|
|
2190
|
+
websiteTitle: "Unsupported solidity compiler version",
|
|
2191
|
+
websiteDescription: `The specified Solidity compiler version is not supported by the Etherscan API. Only versions 0.4.11 and above are supported.
|
|
2192
|
+
For a full list of supported versions, visit: https://etherscan.io/solcversions`,
|
|
2193
|
+
},
|
|
2194
|
+
DEPLOYED_BYTECODE_NOT_FOUND: {
|
|
2195
|
+
number: 80004,
|
|
2196
|
+
messageTemplate: `No bytecode found at address "{address}". Is the contract deployed on the "{networkName}" network?`,
|
|
2197
|
+
websiteTitle: "Deployed bytecode not found",
|
|
2198
|
+
websiteDescription: `No bytecode was found at the specified address. This usually means the contract is not deployed or was deployed to a different network.
|
|
2199
|
+
Please verify the address and selected network, and try again.`,
|
|
2200
|
+
},
|
|
2201
|
+
SOLC_VERSION_MISMATCH: {
|
|
2202
|
+
number: 80005,
|
|
2203
|
+
messageTemplate: `The contract deployed to the "{networkName}" network was compiled with Solidity {deployedSolcVersion}, but the configured compiler {configuredSolcVersionSummary}.`,
|
|
2204
|
+
websiteTitle: "Compiler version mismatch",
|
|
2205
|
+
websiteDescription: `The Solidity compiler version used to compile the deployed contract does not match any of the versions configured in your Hardhat project.
|
|
2206
|
+
|
|
2207
|
+
This mismatch may indicate:
|
|
2208
|
+
|
|
2209
|
+
- You're not on the same commit that was used to deploy the contract.
|
|
2210
|
+
- The compiler version in your Hardhat config is incorrect.
|
|
2211
|
+
- The address provided is not the deployed contract.
|
|
2212
|
+
- The selected network is incorrect.`,
|
|
2213
|
+
},
|
|
2214
|
+
CONTRACT_NOT_FOUND: {
|
|
2215
|
+
number: 80006,
|
|
2216
|
+
messageTemplate: `The contract "{contract}" is not present in your project's artifacts.`,
|
|
2217
|
+
websiteTitle: "Contract not found",
|
|
2218
|
+
websiteDescription: `The specified contract is not present in your project's artifacts. Please ensure the contract is compiled and the name is correct.`,
|
|
2219
|
+
},
|
|
2220
|
+
BUILD_INFO_NOT_FOUND: {
|
|
2221
|
+
number: 80007,
|
|
2222
|
+
messageTemplate: `The contract "{contract}" is present in your project, but its build info is missing.`,
|
|
2223
|
+
websiteTitle: "Build info not found",
|
|
2224
|
+
websiteDescription: `The specified contract is present in your project, but its build info is missing. Please ensure the contract is compiled by Hardhat and that it is written in Solidity.`,
|
|
2225
|
+
},
|
|
2226
|
+
BUILD_INFO_SOLC_VERSION_MISMATCH: {
|
|
2227
|
+
number: 80008,
|
|
2228
|
+
messageTemplate: `The contract "{contract}" build info specifies Solidity {buildInfoSolcVersion}, but the deployed bytecode on the "{networkName}" network indicates {versionDetails}.`,
|
|
2229
|
+
websiteTitle: "Build info compiler version mismatch",
|
|
2230
|
+
websiteDescription: `The compiler version in the build info does not match the version encoded in the deployed bytecode.
|
|
2231
|
+
Possible causes:
|
|
2232
|
+
|
|
2233
|
+
- Compiler settings were changed after deployment.
|
|
2234
|
+
- The contract address is incorrect.
|
|
2235
|
+
- The selected network is incorrect.`,
|
|
2236
|
+
},
|
|
2237
|
+
DEPLOYED_BYTECODE_MISMATCH: {
|
|
2238
|
+
number: 80009,
|
|
2239
|
+
messageTemplate: `The address contains a contract whose bytecode does not match {contractDescription}.`,
|
|
2240
|
+
websiteTitle: "Deployed bytecode mismatch",
|
|
2241
|
+
websiteDescription: `The bytecode at the specified address did not match the expected contract.
|
|
2242
|
+
|
|
2243
|
+
Possible causes:
|
|
2244
|
+
|
|
2245
|
+
- Your artifacts are outdated or missing; try running \`npx hardhat compile --force --buildProfile production\`.
|
|
2246
|
+
- The contract code was modified after deployment.
|
|
2247
|
+
- Compiler settings (optimizer, EVM version, etc.) changed after deployment.
|
|
2248
|
+
- The provided address is incorrect.
|
|
2249
|
+
- The selected network is incorrect.`,
|
|
2250
|
+
},
|
|
2251
|
+
DEPLOYED_BYTECODE_MULTIPLE_MATCHES: {
|
|
2252
|
+
number: 80010,
|
|
2253
|
+
messageTemplate: `More than one contract matches the deployed bytecode:
|
|
2254
|
+
{fqnList}
|
|
2255
|
+
|
|
2256
|
+
Specify the exact contract using the \`--contract\` flag.`,
|
|
2257
|
+
websiteTitle: "Multiple contract matches",
|
|
2258
|
+
websiteDescription: `The deployed bytecode matches multiple compiled contracts. Specify the exact contract using the \`--contract\` flag. For example:
|
|
2259
|
+
|
|
2260
|
+
\`\`\`sh
|
|
2261
|
+
npx hardhat verify --contract contracts/Example.sol:ExampleContract <other args>
|
|
2262
|
+
\`\`\`
|
|
2263
|
+
`,
|
|
2264
|
+
},
|
|
2265
|
+
INVALID_LIBRARY_ADDRESS: {
|
|
2266
|
+
number: 80011,
|
|
2267
|
+
messageTemplate: `The library "{library}" provided for the contract "{contract}" has an invalid address: "{address}".`,
|
|
2268
|
+
websiteTitle: "Invalid library address",
|
|
2269
|
+
websiteDescription: `The address provided for a linked library is invalid. Please make sure the address is a valid Ethereum address.`,
|
|
2270
|
+
},
|
|
2271
|
+
UNUSED_LIBRARY: {
|
|
2272
|
+
number: 80012,
|
|
2273
|
+
messageTemplate: `The library "{library}" provided for the contract "{contract}" is not used by the contract.
|
|
2274
|
+
|
|
2275
|
+
{suggestion}`,
|
|
2276
|
+
websiteTitle: "Library not found in contract",
|
|
2277
|
+
websiteDescription: `A library was specified using the "--libraries" option, but the selected contract does not use it.
|
|
2278
|
+
|
|
2279
|
+
If the contract uses external libraries, verify that the provided name matches the fully qualified name (FQN) of one of them, such as:
|
|
2280
|
+
|
|
2281
|
+
\`\`\`
|
|
2282
|
+
contracts/Math.sol:SafeMath
|
|
2283
|
+
\`\`\`
|
|
2284
|
+
`,
|
|
2285
|
+
},
|
|
2286
|
+
LIBRARY_MULTIPLE_MATCHES: {
|
|
2287
|
+
number: 80013,
|
|
2288
|
+
messageTemplate: `The library "{library}" provided for the contract "{contract}" is ambiguous.
|
|
2289
|
+
It matches multiple libraries:
|
|
2290
|
+
{fqnList}
|
|
2291
|
+
|
|
2292
|
+
To fix this, specify one of these fully qualified library names and try again.`,
|
|
2293
|
+
websiteTitle: "Library name is ambiguous",
|
|
2294
|
+
websiteDescription: `The specified library name matches multiple libraries used by the contract.
|
|
2295
|
+
|
|
2296
|
+
To resolve the ambiguity, provide the fully qualified library name in the format:
|
|
2297
|
+
|
|
2298
|
+
\`\`\`
|
|
2299
|
+
path/to/LibraryFile.sol:LibraryName
|
|
2300
|
+
\`\`\`
|
|
2301
|
+
`,
|
|
2302
|
+
},
|
|
2303
|
+
DUPLICATED_LIBRARY: {
|
|
2304
|
+
number: 80014,
|
|
2305
|
+
messageTemplate: `The library name "{library}" and its fully qualified name "{libraryFqn}" refer to the same library.
|
|
2306
|
+
|
|
2307
|
+
To fix this, remove one of them and try again.`,
|
|
2308
|
+
websiteTitle: "Duplicated library entry",
|
|
2309
|
+
websiteDescription: `The same library was specified more than once using both its short name and fully qualified name (FQN) in the \`--libraries\` option.
|
|
2310
|
+
|
|
2311
|
+
Only one form should be used for each library. Remove one of the entries and try again.`,
|
|
2312
|
+
},
|
|
2313
|
+
LIBRARY_ADDRESSES_MISMATCH: {
|
|
2314
|
+
number: 80015,
|
|
2315
|
+
messageTemplate: `The following detected library addresses differ from those you provided:
|
|
2316
|
+
{conflictList}
|
|
2317
|
+
|
|
2318
|
+
You can either fix these addresses in your libraries, or remove them to let the plugin autodetect them.`,
|
|
2319
|
+
websiteTitle: "Library address mismatch",
|
|
2320
|
+
websiteDescription: `Some libraries have conflicting addresses between what you provided and what was detected in the deployed bytecode.
|
|
2321
|
+
|
|
2322
|
+
Please ensure each library address is correct. You can remove entries from your input to use autodetection instead.`,
|
|
2323
|
+
},
|
|
2324
|
+
MISSING_LIBRARY_ADDRESSES: {
|
|
2325
|
+
number: 80016,
|
|
2326
|
+
messageTemplate: `The contract "{contract}" has one or more library addresses that cannot be detected from the deployed bytecode.
|
|
2327
|
+
This can occur if a library is only used in the contract's constructor. The missing libraries are:
|
|
2328
|
+
{missingList}`,
|
|
2329
|
+
websiteTitle: "Missing library addresses",
|
|
2330
|
+
websiteDescription: `One or more libraries required by the contract could not be detected from the deployed bytecode.
|
|
2331
|
+
|
|
2332
|
+
This usually happens when a library is only referenced in the contract's constructor. To resolve this, provide the missing library addresses using the "--libraries" option.`,
|
|
2333
|
+
},
|
|
2334
|
+
INVALID_CONSTRUCTOR_ARGUMENT_TYPE: {
|
|
2335
|
+
number: 80017,
|
|
2336
|
+
messageTemplate: `The value "{value}" for a constructor parameter cannot be encoded.
|
|
2337
|
+
Reason: {reason}.`,
|
|
2338
|
+
websiteTitle: "Invalid constructor argument type",
|
|
2339
|
+
websiteDescription: `One of the arguments passed to the contract's constructor has an invalid JavaScript type.
|
|
2340
|
+
|
|
2341
|
+
This error occurs when you supply a value whose runtime type doesn't match the expected Solidity type. For example, you must pass a JS string for a Solidity string parameter.
|
|
2342
|
+
|
|
2343
|
+
Please verify that each constructor argument is the correct JS type.`,
|
|
2344
|
+
},
|
|
2345
|
+
INVALID_CONSTRUCTOR_ARGUMENTS_LENGTH: {
|
|
2346
|
+
number: 80018,
|
|
2347
|
+
messageTemplate: `The constructor for "{contract}" has {requiredArgs} parameters but {providedArgs} arguments were provided instead.`,
|
|
2348
|
+
websiteTitle: "Invalid constructor argument count",
|
|
2349
|
+
websiteDescription: `The number of arguments provided to the contract's constructor doesn't match the number of parameters defined in its ABI.
|
|
2350
|
+
|
|
2351
|
+
This error occurs when you supply a different number of arguments than the constructor expects. For example, if the constructor expects two parameters but you provided three.
|
|
2352
|
+
|
|
2353
|
+
Please verify that you pass the exact number of arguments required by the constructor.`,
|
|
2354
|
+
},
|
|
2355
|
+
CONSTRUCTOR_ARGUMENT_OVERFLOW: {
|
|
2356
|
+
number: 80019,
|
|
2357
|
+
messageTemplate: `The value "{value}" is out of bounds for its Solidity type and cannot be encoded.`,
|
|
2358
|
+
websiteTitle: "Constructor argument value out of bounds",
|
|
2359
|
+
websiteDescription: `One of the arguments passed to the contract's constructor is outside the allowed range for its Solidity type (for example, passing 256 to a uint8 parameter).
|
|
2360
|
+
|
|
2361
|
+
This error occurs when a value exceeds the maximum or minimum allowed for the specified Solidity type.
|
|
2362
|
+
|
|
2363
|
+
Please ensure all argument values fit within the valid range for their respective Solidity types.`,
|
|
2364
|
+
},
|
|
2365
|
+
CONSTRUCTOR_ARGUMENTS_ENCODING_FAILED: {
|
|
2366
|
+
number: 80020,
|
|
2367
|
+
messageTemplate: `The constructor arguments for "{contract}" could not be encoded. Reason: {reason}.`,
|
|
2368
|
+
websiteTitle: "Constructor arguments encoding failed",
|
|
2369
|
+
websiteDescription: `The constructor arguments provided for the contract could not be encoded correctly.
|
|
2370
|
+
Please review the provided arguments and ensure they match the expected arguments defined in the contract's ABI.`,
|
|
2371
|
+
},
|
|
2372
|
+
CONTRACT_VERIFICATION_MISSING_BYTECODE: {
|
|
2373
|
+
number: 80021,
|
|
2374
|
+
messageTemplate: `The request to {url} failed because the address "{address}" does not have bytecode.`,
|
|
2375
|
+
websiteTitle: "Missing bytecode at address",
|
|
2376
|
+
websiteDescription: `The explorer responded that the specified address does not contain bytecode. This usually means the contract was deployed recently and the explorer's backend has not yet indexed it.
|
|
2377
|
+
|
|
2378
|
+
Please wait a short time (e.g., 30-60 seconds) and try again. If you're running this from a script, wait for at least five confirmations before verifying.`,
|
|
2379
|
+
},
|
|
2380
|
+
CONTRACT_ALREADY_VERIFIED: {
|
|
2381
|
+
number: 80022,
|
|
2382
|
+
messageTemplate: `The contract "{contract}" at address "{address}" is already verified.`,
|
|
2383
|
+
websiteTitle: "Contract already verified",
|
|
2384
|
+
websiteDescription: `The block explorer responded that the contract is already verified.
|
|
2385
|
+
|
|
2386
|
+
This typically occurs if you used the "--force" flag and the explorer does not support re-verification, or if the contract was previously verified with a full match.`,
|
|
2387
|
+
},
|
|
2388
|
+
CONTRACT_VERIFICATION_REQUEST_FAILED: {
|
|
2389
|
+
number: 80023,
|
|
2390
|
+
messageTemplate: `The contract verification request failed: "{message}".`,
|
|
2391
|
+
websiteTitle: "Contract verification request failed",
|
|
2392
|
+
websiteDescription: `The block explorer returned an error when attempting to verify the contract's source code.
|
|
2393
|
+
|
|
2394
|
+
Please check the returned message for details.`,
|
|
2395
|
+
},
|
|
2396
|
+
CONTRACT_VERIFICATION_STATUS_POLLING_FAILED: {
|
|
2397
|
+
number: 80024,
|
|
2398
|
+
messageTemplate: `The contract verification status polling encountered an error: "{message}". Verification may still succeed.`,
|
|
2399
|
+
websiteTitle: "Contract verification status polling failed",
|
|
2400
|
+
websiteDescription: "The block explorer returned a failure status when checking the verification status. Verification may still succeed; please check manually.",
|
|
2401
|
+
},
|
|
2402
|
+
CONTRACT_VERIFICATION_UNEXPECTED_RESPONSE: {
|
|
2403
|
+
number: 80025,
|
|
2404
|
+
messageTemplate: `The block explorer API returned an unexpected message: "{message}". Please report this issue to the Hardhat team.`,
|
|
2405
|
+
shouldBeReported: true,
|
|
2406
|
+
websiteTitle: "Unexpected API response during contract verification",
|
|
2407
|
+
websiteDescription: `The block explorer API returned a message that doesn't match the expected format. This may indicate a change in the API or an issue with the request.
|
|
2408
|
+
|
|
2409
|
+
Please report this issue to the Hardhat team.`,
|
|
2410
|
+
},
|
|
2411
|
+
CONTRACT_VERIFICATION_FAILED: {
|
|
2412
|
+
number: 80026,
|
|
2413
|
+
messageTemplate: `The contract verification failed.
|
|
2414
|
+
Reason: "{reason}".
|
|
2415
|
+
{librariesWarning}`,
|
|
2416
|
+
websiteTitle: "Contract verification failed",
|
|
2417
|
+
websiteDescription: `Unable to verify the contract on the block explorer.
|
|
2418
|
+
|
|
2419
|
+
If your contract uses libraries whose addresses cannot be detected automatically, make sure you are providing the correct address for each undetectable library.`,
|
|
2420
|
+
},
|
|
2421
|
+
BLOCK_EXPLORER_NOT_CONFIGURED: {
|
|
2422
|
+
number: 80027,
|
|
2423
|
+
messageTemplate: "No {verificationProvider} block explorer is configured for the {chainId} chain in the chain descriptors.",
|
|
2424
|
+
websiteTitle: "Block explorer not configured",
|
|
2425
|
+
websiteDescription: `
|
|
2426
|
+
Block explorer information is missing in your chain descriptor configuration.
|
|
2427
|
+
|
|
2428
|
+
To enable contract verification, add an entry for the verification provider in the blockExplorers field of the relevant chain descriptor.
|
|
2429
|
+
You can override the default chain descriptor by providing your own chainDescriptors object in the Hardhat config, with the following structure:
|
|
2430
|
+
|
|
2431
|
+
\`\`\`
|
|
2432
|
+
chainDescriptors: {
|
|
2433
|
+
<chainId>: {
|
|
2434
|
+
name: <name>,
|
|
2435
|
+
blockExplorers: {
|
|
2436
|
+
blockscout: { name: "Blockscout", url: <blockscout-url> apiUrl: <blockscout-api-url> };
|
|
2437
|
+
etherscan: { name: "Etherscan", url: <etherscan-url> apiUrl: <etherscan-api-url> };
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
\`\`\`
|
|
2442
|
+
`,
|
|
2443
|
+
},
|
|
2444
|
+
ADDRESS_NOT_A_CONTRACT: {
|
|
2445
|
+
number: 80028,
|
|
2446
|
+
messageTemplate: `{verificationProvider} responded that the address "{address}" does not contain a contract. This usually means the address is incorrect, the contract was not deployed on the selected network, or there is a temporary issue with the block explorer not updating its index.`,
|
|
2447
|
+
websiteTitle: "Address is not a contract",
|
|
2448
|
+
websiteDescription: `The block explorer responded that the address does not contain a contract. This usually means the address is incorrect, the contract was not deployed on the selected network, or there is a temporary issue with the block explorer not updating its index.
|
|
2449
|
+
Please verify the address and network, and try again later if necessary.`,
|
|
2450
|
+
},
|
|
2451
|
+
EXPLORER_API_KEY_EMPTY: {
|
|
2452
|
+
number: 80029,
|
|
2453
|
+
messageTemplate: `The {verificationProvider} API key is empty.`,
|
|
2454
|
+
websiteTitle: "Block explorer API key is empty",
|
|
2455
|
+
websiteDescription: `The provided API key for the block explorer is empty. This can happen in the following cases:
|
|
2456
|
+
|
|
2457
|
+
- No "apiKey" field is configured in the hardhat config.
|
|
2458
|
+
- The "apiKey" is explicitly set to an empty string in the Hardhat config.
|
|
2459
|
+
- The "apiKey" is assigned to a config variable that resolves to an empty string at runtime.
|
|
2460
|
+
|
|
2461
|
+
To resolve this, set a valid non-empty API key in your Hardhat config, then try again.`,
|
|
2462
|
+
},
|
|
2463
|
+
},
|
|
2464
|
+
VALIDATION: {
|
|
2465
|
+
INVALID_ADDRESS: {
|
|
2466
|
+
number: 80100,
|
|
2467
|
+
messageTemplate: `"{value}" is not a valid address`,
|
|
2468
|
+
websiteTitle: "Invalid address",
|
|
2469
|
+
websiteDescription: "The value is not a valid address",
|
|
2470
|
+
},
|
|
2471
|
+
MUTUALLY_EXCLUSIVE_CONSTRUCTOR_ARGS: {
|
|
2472
|
+
number: 80101,
|
|
2473
|
+
messageTemplate: "The parameters constructorArgs and constructorArgsPath are mutually exclusive.",
|
|
2474
|
+
websiteTitle: "Mutually exclusive constructor arguments",
|
|
2475
|
+
websiteDescription: "The parameters constructorArgs and constructorArgsPath are mutually exclusive. Please provide only one of them.",
|
|
2476
|
+
},
|
|
2477
|
+
INVALID_CONSTRUCTOR_ARGS_MODULE_EXPORT: {
|
|
2478
|
+
number: 80102,
|
|
2479
|
+
messageTemplate: `The module specified by "{constructorArgsPath}" must default export an array of constructor arguments.`,
|
|
2480
|
+
websiteTitle: "Invalid constructor arguments module",
|
|
2481
|
+
websiteDescription: `The module specified by the constructorArgsPath parameter must default export an array of constructor arguments.
|
|
2482
|
+
|
|
2483
|
+
Example:
|
|
2484
|
+
|
|
2485
|
+
\`\`\`ts
|
|
2486
|
+
export default ["arg1", "arg2", ...];
|
|
2487
|
+
\`\`\`
|
|
2488
|
+
`,
|
|
2489
|
+
},
|
|
2490
|
+
MODULE_NOT_FOUND: {
|
|
2491
|
+
number: 80103,
|
|
2492
|
+
messageTemplate: `The module specified by "{modulePath}" could not be found.`,
|
|
2493
|
+
websiteTitle: "Module not found",
|
|
2494
|
+
websiteDescription: "The specified module could not be found. Please check the path and try again.",
|
|
2495
|
+
},
|
|
2496
|
+
MODULE_SYNTAX_ERROR: {
|
|
2497
|
+
number: 80104,
|
|
2498
|
+
messageTemplate: `The module specified by "{modulePath}" has a syntax error: {errorMessage}`,
|
|
2499
|
+
websiteTitle: "Module syntax error",
|
|
2500
|
+
websiteDescription: "The specified module has a syntax error. Please fix the error and try again.",
|
|
2501
|
+
},
|
|
2502
|
+
IMPORT_MODULE_FAILED: {
|
|
2503
|
+
number: 80105,
|
|
2504
|
+
messageTemplate: `The module specified by "{modulePath}" could not be imported: {errorMessage}`,
|
|
2505
|
+
websiteTitle: "Import module failed",
|
|
2506
|
+
websiteDescription: "The specified module could not be imported.",
|
|
2507
|
+
},
|
|
2508
|
+
INVALID_LIBRARIES_MODULE_EXPORT: {
|
|
2509
|
+
number: 80106,
|
|
2510
|
+
messageTemplate: `The module specified by "{librariesPath}" must default export a record of libraries.`,
|
|
2511
|
+
websiteTitle: "Invalid libraries module",
|
|
2512
|
+
websiteDescription: `The module specified by the librariesPath parameter must default export a record of libraries.
|
|
2513
|
+
|
|
2514
|
+
Example:
|
|
2515
|
+
|
|
2516
|
+
\`\`\`ts
|
|
2517
|
+
export default { lib1: "0x...", lib2: "0x...", ... };
|
|
2518
|
+
\`\`\``,
|
|
2519
|
+
},
|
|
2520
|
+
INVALID_VERIFICATION_PROVIDER: {
|
|
2521
|
+
number: 80107,
|
|
2522
|
+
messageTemplate: `The verification provider "{verificationProvider}" is not supported. Supported providers are: {supportedVerificationProviders}.`,
|
|
2523
|
+
websiteTitle: "Invalid verification provider",
|
|
2524
|
+
websiteDescription: "The specified verification provider is not supported. Please use one of the supported providers.",
|
|
2525
|
+
},
|
|
1467
2526
|
},
|
|
1468
2527
|
},
|
|
1469
2528
|
};
|