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
@@ -69,16 +89,21 @@ const
69
89
  const
70
90
  _msg_error =
71
91
  _libcrash._msg_error;
92
+ /* global
93
+ _override_set */
94
+ const
95
+ _override_set =
96
+ _libcrash._override_set;
72
97
  /* global
73
98
  _printf */
74
99
  const
75
- _printf =
76
- _libcrash._printf;
100
+ _printf =
101
+ _libcrash._printf;
77
102
  /* global
78
- _process_exit */
103
+ _set */
79
104
  const
80
- _process_exit =
81
- _libcrash._process_exit;
105
+ _set =
106
+ _libcrash._set;
82
107
  /* global
83
108
  _stat */
84
109
  const
@@ -86,8 +111,8 @@ const
86
111
  _libcrash._stat;
87
112
  const
88
113
  _libevm_contract_deployment_networks_module =
89
- require(
90
- "./libevm-contract-deployment-networks");
114
+ await import(
115
+ "./libevm-contract-deployment-networks");
91
116
  /* global
92
117
  _evm_contract_deployment_networks */
93
118
  const
@@ -99,49 +124,70 @@ function
99
124
  /* global
100
125
  app_name:
101
126
  writable */
102
- app_name =
103
- "evm-contract-deployments-networks.js";
127
+ _set(
128
+ "app",
129
+ "name",
130
+ "evm-contract-deployments-networks.js");
104
131
  /* global
105
132
  app_opts:
106
133
  writable */
107
- app_opts =
108
- [];
134
+ _set(
135
+ "app",
136
+ "opts",
137
+ []);
109
138
  /* global
110
139
  runtime_environment:
111
140
  writable */
112
- runtime_environment =
113
- "";
141
+ _set(
142
+ "runtime",
143
+ "enviroment",
144
+ "");
114
145
  /* global
115
146
  resolve_date:
116
147
  writable */
117
- resolve_date =
118
- "";
148
+ _set(
149
+ "resolve",
150
+ "date",
151
+ "");
119
152
  /* global
120
153
  deployments_dir:
121
154
  writable */
122
- deployments_dir =
123
- "";
155
+ _set(
156
+ "deployments",
157
+ "dir",
158
+ "");
124
159
  /* global
125
160
  display_all:
126
161
  writable */
127
- display_all =
128
- "";
162
+ _set(
163
+ "display",
164
+ "all",
165
+ "");
129
166
  /* global
130
167
  display_safest:
131
168
  writable */
132
- display_safest =
133
- "";
169
+ _set(
170
+ "display",
171
+ "safest",
172
+ "");
134
173
  /* global
135
174
  display_cheapest:
136
175
  writable */
137
- display_cheapest =
138
- "";
139
- quiet =
176
+ _set(
177
+ "display",
178
+ "cheapest",
179
+ "");
180
+ const
181
+ _global =
182
+ _global_get();
183
+ _global[
184
+ "quiet"] =
140
185
  "";
141
186
  /* global
142
187
  verbose:
143
188
  writable */
144
- verbose =
189
+ _global[
190
+ "verbose"] =
145
191
  "";
146
192
  }
147
193
 
@@ -172,9 +218,14 @@ function
172
218
  _config_show() {
173
219
  let
174
220
  _line;
221
+ const
222
+ _app_name =
223
+ _get(
224
+ "app",
225
+ "name");
175
226
  const
176
227
  _text = [
177
- `${app_name} configuration:`,
228
+ `${_app_name} configuration:`,
178
229
  ` Resolve date: ${resolve_date}`,
179
230
  ` Runtime environment: ${runtime_environment}`,
180
231
  ` Display all: ${display_all}`,
@@ -193,6 +244,11 @@ function
193
244
  _exit_code) {
194
245
  let
195
246
  _line;
247
+ const
248
+ _app_name =
249
+ _get(
250
+ "app",
251
+ "name");
196
252
  const
197
253
  _text = [
198
254
  "",
@@ -200,7 +256,7 @@ function
200
256
  "",
201
257
  "Usage:",
202
258
  "",
203
- ` ${app_name}`,
259
+ ` ${_app_name}`,
204
260
  " [options]",
205
261
  " <deployment-dir>",
206
262
  "",
@@ -223,10 +279,10 @@ function
223
279
  ""
224
280
  ];
225
281
  for ( _line of _text ) {
226
- console.log(
282
+ _echo(
227
283
  _line);
228
284
  }
229
- _process_exit(
285
+ _exit(
230
286
  _exit_code);
231
287
  }
232
288
 
@@ -252,16 +308,22 @@ async function
252
308
  };
253
309
  const
254
310
  _argv =
255
- _argv_get(
311
+ await _argv_get(
256
312
  _argv_args);
257
313
  const
258
314
  _options =
259
315
  _argv[
260
316
  "_"];
261
- quiet =
317
+ const
318
+ _global =
319
+ _global_get();
320
+ _global[
321
+ "quiet"] =
262
322
  "y";
263
- runtime_environment =
264
- "node";
323
+ _set(
324
+ "runtime",
325
+ "environment",
326
+ "node");
265
327
  if ( _argv[
266
328
  "h"] ) {
267
329
  _help_display =
@@ -300,51 +362,66 @@ async function
300
362
  _usage(
301
363
  1);
302
364
  }
303
- deployments_dir =
365
+ _set(
366
+ "deployments",
367
+ "dir",
304
368
  _argv[
305
369
  "_"][
306
- 0];
370
+ 0]);
307
371
  if ( _argv[
308
372
  "A"] ) {
309
- display_all =
373
+ _set(
374
+ "display",
375
+ "all",
310
376
  _argv[
311
- "A"];
377
+ "A"]);
312
378
  }
313
379
  if ( _argv[
314
380
  "display-all"] ) {
315
- display_all =
381
+ _set(
382
+ "display",
383
+ "all",
316
384
  _argv[
317
- "display-all"];
385
+ "display-all"]);
318
386
  }
319
387
  if ( _argv[
320
388
  "S"] ) {
321
- display_safest =
389
+ _set(
390
+ "display",
391
+ "safest",
322
392
  _argv[
323
- "S"];
393
+ "S"]);
324
394
  }
325
395
  if ( _argv[
326
396
  "display-safest"] ) {
327
- display_safest =
397
+ _set(
398
+ "display",
399
+ "safest",
328
400
  _argv[
329
- "display-safest"];
401
+ "display-safest"]);
330
402
  }
331
403
  if ( _argv[
332
404
  "C"] ) {
333
- display_cheapest =
405
+ _set(
406
+ "display",
407
+ "cheapest",
334
408
  _argv[
335
- "C"];
409
+ "C"]);
336
410
  }
337
411
  if ( _argv[
338
412
  "display-cheapest"] ) {
339
- display_cheapest =
413
+ _set(
414
+ "display",
415
+ "cheapest",
340
416
  _argv[
341
- "display-cheapest"];
417
+ "display-cheapest"]);
342
418
  }
343
419
  if ( _argv[
344
420
  "v"] ||
345
421
  _argv[
346
422
  "verbose"] ) {
347
- quiet =
423
+ _global[
424
+ "quiet"] =
348
425
  "n";
349
426
  }
350
427
  }
@@ -354,29 +431,44 @@ function
354
431
  let
355
432
  _method,
356
433
  _network;
357
- runtime_environment =
358
- "browser";
359
- display_all =
434
+ _set(
435
+ "runtime",
436
+ "environment",
437
+ "browser");
438
+ _set(
439
+ "display",
440
+ "all",
360
441
  _argv_url_get(
361
442
  "display_all")[
362
- 0];
363
- display_safest =
443
+ 0]);
444
+ _set(
445
+ "display",
446
+ "safest",
364
447
  _argv_url_get(
365
448
  "display_safest")[
366
- 0];
367
- display_cheapest =
449
+ 0]);
450
+ _set(
451
+ "display",
452
+ "cheapest",
368
453
  _argv_url_get(
369
454
  "display_cheapest")[
370
- 0];
371
- deployments_dir =
455
+ 0]);
456
+ _set(
457
+ "deployments",
458
+ "dir",
372
459
  _argv_url_get(
373
460
  "deployments_dir")[
374
- 0];
375
- quiet =
461
+ 0]);
462
+ const
463
+ _global =
464
+ _global_get();
465
+ _global[
466
+ 'quiet'] =
376
467
  _argv_url_get(
377
468
  "quiet");
378
469
  if ( quiet.length === 0 ) {
379
- quiet =
470
+ _global[
471
+ "quiet"] =
380
472
  "n";
381
473
  }
382
474
  }
@@ -397,7 +489,7 @@ async function
397
489
  _results);
398
490
  if ( _results_type == "object" ) {
399
491
  for ( _result of _results ) {
400
- console.log(
492
+ _echo(
401
493
  _result);
402
494
  }
403
495
  }
@@ -428,11 +520,11 @@ async function
428
520
  }
429
521
 
430
522
  _global_variables();
431
- if ( _cmdline_check(
432
- "evm-contract-deployment-networks.js") == true ||
433
- _cmdline_check(
434
- "evm-contract-deployment-networks") == true ) {
435
- _cmdline_parse();
523
+ if ( await _cmdline_check(
524
+ "evm-contract-deployment-networks.js") ||
525
+ await _cmdline_check(
526
+ "evm-contract-deployment-networks") ) {
527
+ await _cmdline_parse();
436
528
  }
437
529
  else{
438
530
  _url_parse();
@@ -0,0 +1,159 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+
3
+ /** ---------------------------------------------------------
4
+ * evm-contract-deployment-networks.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-networks`;
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
+ };