evm-contracts-tools 0.0.50 → 0.0.52

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.
Files changed (75) hide show
  1. package/dist/evm-contract-call/evm-contract-call.js +1 -2
  2. package/dist/evm-contract-call/fs-worker.js +1 -1
  3. package/dist/evm-contract-deployment-abi/evm-contract-deployment-abi.js +1 -2
  4. package/dist/evm-contract-deployment-abi/fs-worker.js +1 -1
  5. package/dist/evm-contract-deployment-address/evm-contract-deployment-address.js +1 -2
  6. package/dist/evm-contract-deployment-address/fs-worker.js +1 -1
  7. package/dist/evm-contract-deployment-bytecode/evm-contract-deployment-bytecode.js +1 -2
  8. package/dist/evm-contract-deployment-bytecode/fs-worker.js +1 -1
  9. package/dist/evm-contract-deployment-compiler-output/evm-contract-deployment-compiler-output.js +1 -2
  10. package/dist/evm-contract-deployment-compiler-output/fs-worker.js +1 -1
  11. package/dist/evm-contract-deployment-deployment-networks +1 -1
  12. package/dist/evm-contract-deployment-networks/evm-contract-deployment-networks.js +1 -2
  13. package/dist/evm-contract-deployment-versions/evm-contract-deployment-versions.js +1 -2
  14. package/dist/evm-contract-deployment-versions/fs-worker.js +1 -1
  15. package/dist/evm-contract-deployments-dir/evm-contract-deployments-dir.js +1 -2
  16. package/dist/evm-contract-deployments-dir/fs-worker.js +1 -1
  17. package/dist/evm-contracts-tools/evm-contracts-tools.js +1 -2
  18. package/dist/evm-contracts-tools/fs-worker.js +1 -1
  19. package/dist/libevm-contract-call/fs-worker.js +1 -1
  20. package/dist/libevm-contract-call/libevm-contract-call.js +1 -2
  21. package/dist/libevm-contract-deployment-abi/fs-worker.js +1 -1
  22. package/dist/libevm-contract-deployment-abi/libevm-contract-deployment-abi.js +1 -2
  23. package/dist/libevm-contract-deployment-address/fs-worker.js +1 -1
  24. package/dist/libevm-contract-deployment-address/libevm-contract-deployment-address.js +1 -1
  25. package/dist/libevm-contract-deployment-bytecode/fs-worker.js +1 -1
  26. package/dist/libevm-contract-deployment-bytecode/libevm-contract-deployment-bytecode.js +1 -2
  27. package/dist/libevm-contract-deployment-compiler-output/fs-worker.js +1 -1
  28. package/dist/libevm-contract-deployment-compiler-output/libevm-contract-deployment-compiler-output.js +1 -0
  29. package/dist/libevm-contract-deployment-deployment-networks +1 -1
  30. package/dist/libevm-contract-deployment-networks/libevm-contract-deployment-networks.js +1 -2
  31. package/dist/libevm-contract-deployment-versions/fs-worker.js +1 -1
  32. package/dist/libevm-contract-deployment-versions/libevm-contract-deployment-versions.js +1 -2
  33. package/dist/libevm-contract-deployments-dir/fs-worker.js +1 -1
  34. package/dist/libevm-contract-deployments-dir/libevm-contract-deployments-dir.js +1 -2
  35. package/dist/libevm-contracts-tools +1 -1
  36. package/eslint.config.mjs +131 -0
  37. package/evm-contract-call +348 -151
  38. package/evm-contract-call.webpack.config.cjs +159 -0
  39. package/evm-contract-deployment-abi +212 -87
  40. package/evm-contract-deployment-abi.webpack.config.cjs +159 -0
  41. package/evm-contract-deployment-address +209 -89
  42. package/evm-contract-deployment-address.webpack.config.cjs +159 -0
  43. package/evm-contract-deployment-bytecode +146 -61
  44. package/evm-contract-deployment-bytecode.webpack.config.cjs +159 -0
  45. package/evm-contract-deployment-compiler-output +168 -67
  46. package/evm-contract-deployment-compiler-output.webpack.config.cjs +159 -0
  47. package/evm-contract-deployment-networks +160 -68
  48. package/evm-contract-deployment-networks.webpack.config.cjs +159 -0
  49. package/evm-contract-deployment-versions +138 -66
  50. package/evm-contract-deployment-versions.webpack.config.cjs +159 -0
  51. package/evm-contract-deployments-dir +116 -47
  52. package/evm-contract-deployments-dir.webpack.config.cjs +159 -0
  53. package/evm-contracts-tools +41 -29
  54. package/fs-worker.webpack.config.cjs +82 -0
  55. package/lib/address-check +0 -0
  56. package/lib/evm-contract-call-dynamic +0 -0
  57. package/lib/evm-contract-call-static +0 -0
  58. package/libevm-contract-call +254 -58
  59. package/libevm-contract-call.webpack.config.cjs +159 -0
  60. package/libevm-contract-deployment +39 -41
  61. package/libevm-contract-deployment-abi +31 -18
  62. package/libevm-contract-deployment-abi.webpack.config.cjs +155 -0
  63. package/libevm-contract-deployment-address.webpack.config.cjs +155 -0
  64. package/libevm-contract-deployment-bytecode +31 -18
  65. package/libevm-contract-deployment-bytecode.webpack.config.cjs +155 -0
  66. package/libevm-contract-deployment-compiler-output +32 -19
  67. package/libevm-contract-deployment-compiler-output.webpack.config.cjs +155 -0
  68. package/libevm-contract-deployment-networks +20 -11
  69. package/libevm-contract-deployment-networks.webpack.config.cjs +159 -0
  70. package/libevm-contract-deployment-versions +16 -10
  71. package/libevm-contract-deployment-versions.webpack.config.cjs +159 -0
  72. package/libevm-contract-deployments-dir +12 -7
  73. package/libevm-contract-deployments-dir.webpack.config.cjs +159 -0
  74. package/package.json +49 -50
  75. package/webpack.config.cjs +155 -0
@@ -37,8 +37,8 @@
37
37
 
38
38
  const
39
39
  _libcrash =
40
- require(
41
- "crash-js");
40
+ await import(
41
+ "libcrash-js");
42
42
  /* global
43
43
  _argv_get */
44
44
  const
@@ -54,11 +54,31 @@ const
54
54
  const
55
55
  _cmdline_check =
56
56
  _libcrash._cmdline_check;
57
+ /* global
58
+ _echo */
59
+ const
60
+ _echo =
61
+ _libcrash._echo;
62
+ /* global
63
+ _exit */
64
+ const
65
+ _exit =
66
+ _libcrash._exit;
67
+ /* global
68
+ _get */
69
+ const
70
+ _get =
71
+ _libcrash._get;
57
72
  /* global
58
73
  _get_date_human */
59
74
  const
60
75
  _get_date_human =
61
76
  _libcrash._get_date_human;
77
+ /* global
78
+ _global_get */
79
+ const
80
+ _global_get =
81
+ _libcrash._global_get;
62
82
  /* global
63
83
  _msg_info */
64
84
  const
@@ -77,17 +97,17 @@ const
77
97
  /* global
78
98
  _printf */
79
99
  const
80
- _printf =
81
- _libcrash._printf;
100
+ _printf =
101
+ _libcrash._printf;
82
102
  /* global
83
- _exit */
103
+ _set */
84
104
  const
85
- _exit =
86
- _libcrash._exit;
105
+ _set =
106
+ _libcrash._set;
87
107
  const
88
108
  _libevm_contract_deployment_compiler_output_module =
89
- require(
90
- "./libevm-contract-deployment-compiler-output");
109
+ await import(
110
+ "./libevm-contract-deployment-compiler-output");
91
111
  /* global
92
112
  _evm_contract_deployment_compiler_output */
93
113
  const
@@ -119,74 +139,105 @@ function
119
139
  /* global
120
140
  app_name:
121
141
  writable */
122
- app_name =
123
- "evm-contract-deployments-compiler-output.js";
142
+ _set(
143
+ "app",
144
+ "name",
145
+ "evm-contract-deployments-compiler-output.js");
124
146
  /* global
125
147
  app_opts:
126
148
  writable */
127
- app_opts =
128
- [];
149
+ _set(
150
+ "app",
151
+ "opts",
152
+ []);
129
153
  /* global
130
154
  runtime_environment:
131
155
  writable */
132
- runtime_environment =
133
- "";
156
+ _set(
157
+ "runtime",
158
+ "environment",
159
+ "");
134
160
  /* global
135
161
  resolve_date:
136
162
  writable */
137
- resolve_date =
138
- "";
163
+ _set(
164
+ "resolve",
165
+ "date",
166
+ "");
139
167
  /* global
140
168
  target_networks:
141
169
  writable */
142
- target_networks =
143
- [];
170
+ _set(
171
+ "target",
172
+ "networks",
173
+ []);
144
174
  /* global
145
175
  network_ids:
146
176
  writable */
147
- network_ids =
148
- [];
177
+ _set(
178
+ "network",
179
+ "ids",
180
+ []);
149
181
  /* global
150
182
  networks_all:
151
183
  writable */
152
- networks_all =
153
- "";
184
+ _set(
185
+ "networks",
186
+ "all",
187
+ "");
154
188
  /* global
155
189
  target_app:
156
190
  writable */
157
- target_app =
158
- "";
191
+ _set(
192
+ "target",
193
+ "app",
194
+ "");
159
195
  /* global
160
196
  target_contract:
161
197
  writable */
162
- target_contract =
163
- "";
198
+ _set(
199
+ "target",
200
+ "contract",
201
+ "");
164
202
  /* global
165
203
  contract_version:
166
204
  writable */
167
- contract_version =
168
- "";
205
+ _set(
206
+ "contract",
207
+ "version",
208
+ "");
169
209
  /* global
170
210
  user_defined:
171
211
  writable */
172
- user_defined =
173
- "";
212
+ _set(
213
+ "user",
214
+ "defined",
215
+ "");
174
216
  /* global
175
217
  configuration_format:
176
218
  writable */
177
- configuration_format =
178
- "";
219
+ _set(
220
+ "configuration",
221
+ "format",
222
+ "");
179
223
  /* global
180
224
  deployments_dir:
181
225
  writable */
182
- deployments_dir =
183
- "";
184
- quiet =
226
+ _set(
227
+ "deployments",
228
+ "dir",
229
+ "");
230
+ const
231
+ _global =
232
+ _global_get();
233
+ _global[
234
+ "quiet"] =
185
235
  "";
186
236
  /* global
187
237
  verbose:
188
238
  writable */
189
- verbose =
239
+ _global[
240
+ "verbose"] =
190
241
  "";
191
242
  }
192
243
 
@@ -215,9 +266,14 @@ function
215
266
  _config_show() {
216
267
  let
217
268
  _line;
269
+ const
270
+ _app_name =
271
+ _get(
272
+ "app",
273
+ "name");
218
274
  const
219
275
  _text = [
220
- `${app_name} configuration:`,
276
+ `${_app_name} configuration:`,
221
277
  ` Resolve date: ${resolve_date}`,
222
278
  ` Runtime environment: ${runtime_environment}`,
223
279
  ` Target networks: ${target_networks}`,
@@ -238,6 +294,11 @@ function
238
294
  _exit_code) {
239
295
  let
240
296
  _line;
297
+ const
298
+ _app_name =
299
+ _get(
300
+ "app",
301
+ "name");
241
302
  const
242
303
  _text = [
243
304
  "",
@@ -245,7 +306,7 @@ function
245
306
  "",
246
307
  "Usage:",
247
308
  "",
248
- ` ${app_name}`,
309
+ ` ${_app_name}`,
249
310
  " [options]",
250
311
  " <target-contract>",
251
312
  "",
@@ -282,7 +343,7 @@ function
282
343
  ""
283
344
  ];
284
345
  for ( _line of _text ) {
285
- console.log(
346
+ _echo(
286
347
  _line);
287
348
  }
288
349
  _exit(
@@ -309,16 +370,22 @@ async function
309
370
  };
310
371
  const
311
372
  _argv =
312
- _argv_get(
373
+ await _argv_get(
313
374
  _argv_args);
314
375
  const
315
376
  _options =
316
377
  _argv[
317
378
  "_"];
318
- quiet =
379
+ const
380
+ _global =
381
+ _global_get();
382
+ _global[
383
+ "quiet"] =
319
384
  "y";
320
- runtime_environment =
321
- "node";
385
+ _set(
386
+ "runtime",
387
+ "environment",
388
+ "node");
322
389
  if ( _argv[
323
390
  "h"] ) {
324
391
  _help_display =
@@ -337,7 +404,8 @@ async function
337
404
  true;
338
405
  }
339
406
  if ( _help_display ) {
340
- quiet =
407
+ _global[
408
+ "quiet"] =
341
409
  "n";
342
410
  await _overrides_set(
343
411
  _help_display);
@@ -357,69 +425,102 @@ async function
357
425
  _usage(
358
426
  1);
359
427
  }
360
- target_contract =
428
+ _set(
429
+ "target",
430
+ "contract",
361
431
  _argv[
362
432
  "_"][
363
- 0];
433
+ 0]);
434
+ const
435
+ _target_networks =
436
+ _get(
437
+ "target",
438
+ "networks");
364
439
  if ( "n" in _argv ) {
365
- target_networks.push(
440
+ _target_networks.push(
366
441
  _argv[
367
442
  "n"].toString());
368
443
  }
369
444
  if ( "network" in _argv ) {
370
- target_networks.push(
445
+ _target_networks.push(
371
446
  _argv[
372
447
  "network"].toString());
373
448
  }
449
+ _set(
450
+ "target",
451
+ "networks",
452
+ _target_networks);
453
+ const
454
+ _network_ids =
455
+ _get(
456
+ "network",
457
+ "ids");
374
458
  if ( "i" in _argv ) {
375
- network_ids.push(
459
+ _network_ids.push(
376
460
  _argv[
377
461
  "i"].toString());
378
462
  }
379
463
  if ( "network-id" in _argv ) {
380
- network_ids.push(
464
+ _network_ids.push(
381
465
  _argv[
382
466
  "network-id"].toString());
383
467
  }
468
+ _set(
469
+ "network",
470
+ "ids",
471
+ _network_ids);
384
472
  if ( "a" in _argv ) {
385
- target_app =
473
+ _set(
474
+ "target",
475
+ "app",
386
476
  _argv[
387
- "a"];
477
+ "a"]);
388
478
  }
389
479
  if ( "target-app" in _argv ) {
390
- target_app =
480
+ _set(
481
+ "target",
482
+ "app",
391
483
  _argv[
392
- "target-app"];
484
+ "target-app"]);
393
485
  }
394
486
  if ( _argv[
395
487
  "A"] ||
396
488
  _argv[
397
489
  "networks-all"] ) {
398
- networks_all =
399
- "y";
490
+ _set(
491
+ "networks",
492
+ "ll",
493
+ "y");
400
494
  }
401
495
  if ( _argv[
402
496
  "u"] ||
403
497
  _argv[
404
498
  "user-defined"] ) {
405
- user_defined =
406
- "y";
499
+ _set(
500
+ "user",
501
+ "defined",
502
+ "y");
407
503
  }
408
504
  if ( "f" in _argv ) {
409
- configuration_format =
505
+ _set(
506
+ "configuration",
507
+ "format",
410
508
  _argv[
411
- "f"];
509
+ "f"]);
412
510
  }
413
511
  if ( "configuration-format" in _argv ) {
414
- configuration_format =
512
+ _set(
513
+ "configuration",
514
+ "format",
415
515
  _argv[
416
- "configuration-format"];
516
+ "configuration-format"]);
417
517
  }
418
518
  if ( _argv[
419
519
  "v"] ||
420
520
  _argv[
421
521
  "verbose"] ) {
422
- quiet =
522
+ _global[
523
+ "quiet"] =
423
524
  "n";
424
525
  }
425
526
  }
@@ -525,11 +626,11 @@ async function
525
626
  }
526
627
 
527
628
  _global_variables();
528
- if ( _cmdline_check(
629
+ if ( await _cmdline_check(
529
630
  "evm-contract-deployment-compiler-output.js") ||
530
- _cmdline_check(
631
+ await _cmdline_check(
531
632
  "evm-contract-deployment-compiler-output") ) {
532
- _cmdline_parse();
633
+ await _cmdline_parse();
533
634
  }
534
635
  else{
535
636
  _url_parse();
@@ -0,0 +1,159 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+
3
+ /** ------------------------------------------------------------
4
+ * evm-contract-deployment-compiler-output.webpack.config.cjs
5
+ * ------------------------------------------------------------
6
+ * Copyright ©
7
+ * Pellegrino Prevete
8
+ * 2024, 2025, 2026
9
+ *
10
+ * All rights reserved
11
+ * ---------------------------------------------------------
12
+ *
13
+ * This program is free software: you can redistribute it and/or
14
+ * modify it under the terms of the GNU General Public License
15
+ * as published by the Free Software Foundation, either
16
+ * version 3 of the License, or (at your option) any later
17
+ * version.
18
+ *
19
+ * This program is distributed in the hope that it will be
20
+ * useful, but WITHOUT ANY WARRANTY; without even the implied
21
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
22
+ * PURPOSE.
23
+ * See the GNU General Public License for more details.
24
+ *
25
+ * You should have received a copy of the
26
+ * GNU General Public License along with this program.
27
+ * If not, see <https://www.gnu.org/licenses/>.
28
+ */
29
+
30
+ const
31
+ _path =
32
+ require(
33
+ 'path');
34
+ const
35
+ _output_dir =
36
+ _path.resolve(
37
+ __dirname);
38
+ const
39
+ _input_file_name =
40
+ `evm-contract-deployment-compiler-output`;
41
+ const
42
+ _input_file_path =
43
+ `./${_input_file_name}`;
44
+ const
45
+ _output_file_name =
46
+ `${_input_file_name}.js`;
47
+ const
48
+ _output = {
49
+ path:
50
+ _output_dir,
51
+ filename:
52
+ _output_file_name
53
+ };
54
+ const
55
+ _node_fs_ignore =
56
+ { resourceRegExp:
57
+ /^node:fs$/ };
58
+ const
59
+ _yargs_ignore =
60
+ { resourceRegExp:
61
+ /^yargs$/ };
62
+ const
63
+ _yargs_helpers_ignore =
64
+ { resourceRegExp:
65
+ /^yargs\/helpers$/ };
66
+ const
67
+ _webpack =
68
+ require(
69
+ "webpack");
70
+ const
71
+ _ignore_plugin =
72
+ _webpack.IgnorePlugin;
73
+ const
74
+ _node_fs_ignore_plugin =
75
+ new _ignore_plugin(
76
+ _node_fs_ignore);
77
+ const
78
+ _yargs_ignore_plugin =
79
+ new _ignore_plugin(
80
+ _yargs_ignore);
81
+ const
82
+ _yargs_helpers_ignore_plugin =
83
+ new _ignore_plugin(
84
+ _yargs_helpers_ignore);
85
+ module.exports = {
86
+ entry:
87
+ _input_file_path,
88
+ output:
89
+ _output,
90
+ optimization: {
91
+ moduleIds: 'deterministic',
92
+ },
93
+ resolve: {
94
+ alias: {
95
+ "node:fs":
96
+ _path.resolve(
97
+ __dirname,
98
+ 'node_modules/opfs/opfs'),
99
+ "fs":
100
+ _path.resolve(
101
+ __dirname,
102
+ "node_modules/fs/fs"),
103
+ "evm-contracts-tools":
104
+ _path.resolve(
105
+ __dirname,
106
+ "evm-contracts-tools"),
107
+ "evm-transactions-tools":
108
+ _path.resolve(
109
+ __dirname,
110
+ "node_modules/evm-transactions-tools/evm-transactions-tools"),
111
+ "evm-wallet":
112
+ _path.resolve(
113
+ __dirname,
114
+ 'node_modules/evm-wallet/libevm-wallet'),
115
+ "libevm":
116
+ _path.resolve(
117
+ __dirname,
118
+ 'node_modules/libevm/libevm'),
119
+ "path":
120
+ _path.resolve(
121
+ __dirname,
122
+ 'node_modules/path/mod.js'),
123
+ "web-worker":
124
+ _path.resolve(
125
+ __dirname,
126
+ 'node_modules/web-worker/mod.js'),
127
+ "yargs":
128
+ _path.resolve(
129
+ __dirname,
130
+ 'node_modules/yargs/browser.mjs'),
131
+ "yargs/helpers":
132
+ _path.resolve(
133
+ __dirname,
134
+ 'node_modules/yargs/helpers/helpers.mjs'),
135
+ "yargs-parser":
136
+ _path.resolve(
137
+ __dirname,
138
+ 'node_modules/yargs-parser/browser.mjs'),
139
+ },
140
+ fallback: {
141
+ "utils":
142
+ false,
143
+ "web-worker":
144
+ false,
145
+ "yargs":
146
+ false,
147
+ "yargs/helpers":
148
+ false,
149
+ }
150
+ },
151
+ externals:
152
+ { yargs:
153
+ 'yargs' },
154
+ plugins: [
155
+ _node_fs_ignore_plugin,
156
+ _yargs_ignore_plugin,
157
+ _yargs_helpers_ignore_plugin
158
+ ]
159
+ };