evm-contracts-tools 0.0.54 → 0.0.57

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 (48) hide show
  1. package/dist/evm-contract-call/evm-contract-call.js +1 -0
  2. package/dist/evm-contract-call/fs-worker.js +1 -0
  3. package/dist/evm-contract-deployment-abi/evm-contract-deployment-abi.js +1 -0
  4. package/dist/evm-contract-deployment-abi/fs-worker.js +1 -0
  5. package/dist/evm-contract-deployment-address/evm-contract-deployment-address.js +1 -0
  6. package/dist/evm-contract-deployment-address/fs-worker.js +1 -0
  7. package/dist/evm-contract-deployment-bytecode/evm-contract-deployment-bytecode.js +1 -0
  8. package/dist/evm-contract-deployment-bytecode/fs-worker.js +1 -0
  9. package/dist/evm-contract-deployment-compiler-output/evm-contract-deployment-compiler-output.js +1 -0
  10. package/dist/evm-contract-deployment-compiler-output/fs-worker.js +1 -0
  11. package/dist/evm-contract-deployment-deployment-networks +1 -0
  12. package/dist/evm-contract-deployment-networks/evm-contract-deployment-networks.js +1 -0
  13. package/dist/evm-contract-deployment-versions/evm-contract-deployment-versions.js +1 -0
  14. package/dist/evm-contract-deployment-versions/fs-worker.js +1 -0
  15. package/dist/evm-contract-deployments-dir/evm-contract-deployments-dir.js +1 -0
  16. package/dist/evm-contract-deployments-dir/fs-worker.js +1 -0
  17. package/dist/evm-contracts-tools/evm-contracts-tools.js +1 -0
  18. package/dist/evm-contracts-tools/fs-worker.js +1 -0
  19. package/dist/libevm-contract-call/fs-worker.js +1 -0
  20. package/dist/libevm-contract-call/libevm-contract-call.js +1 -0
  21. package/dist/libevm-contract-deployment-abi/fs-worker.js +1 -0
  22. package/dist/libevm-contract-deployment-abi/libevm-contract-deployment-abi.js +1 -0
  23. package/dist/libevm-contract-deployment-address/fs-worker.js +1 -0
  24. package/dist/libevm-contract-deployment-address/libevm-contract-deployment-address.js +1 -0
  25. package/dist/libevm-contract-deployment-bytecode/fs-worker.js +1 -0
  26. package/dist/libevm-contract-deployment-bytecode/libevm-contract-deployment-bytecode.js +1 -0
  27. package/dist/libevm-contract-deployment-compiler-output/fs-worker.js +1 -0
  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 -0
  30. package/dist/libevm-contract-deployment-networks/libevm-contract-deployment-networks.js +1 -0
  31. package/dist/libevm-contract-deployment-versions/fs-worker.js +1 -0
  32. package/dist/libevm-contract-deployment-versions/libevm-contract-deployment-versions.js +1 -0
  33. package/dist/libevm-contract-deployments-dir/fs-worker.js +1 -0
  34. package/dist/libevm-contract-deployments-dir/libevm-contract-deployments-dir.js +1 -0
  35. package/dist/libevm-contracts-tools +1 -0
  36. package/evm-contract-call +133 -6
  37. package/lib/address-check +0 -4
  38. package/lib/bytecode-creation-get +74 -32
  39. package/lib/bytecode-runtime-get +171 -69
  40. package/lib/contract-get +189 -93
  41. package/lib/deployer-get +145 -61
  42. package/lib/deployer-verify +226 -113
  43. package/lib/evm-contract-call-dynamic +331 -194
  44. package/lib/evm-contract-call-static +121 -44
  45. package/libevm-contract-call +405 -0
  46. package/libevm-contract-deployment +3 -3
  47. package/libevm-contract-deployment-address +31 -18
  48. package/package.json +9 -9
package/lib/deployer-get CHANGED
@@ -2,26 +2,29 @@
2
2
 
3
3
  // SPDX-License-Identifier: AGPL-3.0-or-later
4
4
 
5
- /** ----------------------------------------------------------------------
5
+ /** ---------------------------------------------------------------
6
+ * deployer-get
7
+ * ---------------------------------------------------------------
6
8
  * Copyright ©
7
9
  * Pellegrino Prevete
8
10
  * 2024, 2025, 2026
9
11
  *
10
12
  * All rights reserved
11
- * ----------------------------------------------------------------------
13
+ * ---------------------------------------------------------------
12
14
  *
13
- * This program is free software: you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation, either version 3 of the License, or
16
- * (at your option) any later version.
15
+ * This program is free software: you can redistribute it and/or
16
+ * modify it under the terms of the GNU General Public License as
17
+ * published by the Free Software Foundation, either version 3 of
18
+ * the License, or (at your option) any later version.
17
19
  *
18
20
  * This program is distributed in the hope that it will be useful,
19
21
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
22
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
23
  * GNU General Public License for more details.
22
24
  *
23
- * You should have received a copy of the GNU General Public License
24
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
25
+ * You should have received a copy of the GNU General Public
26
+ * License along with this program.
27
+ * If not, see <https://www.gnu.org/licenses/>.
25
28
  */
26
29
 
27
30
  /* Crash Javascript global variables */
@@ -38,13 +41,23 @@
38
41
 
39
42
  const
40
43
  _libcrash =
41
- require(
42
- "crash-js");
44
+ await import(
45
+ "libcrash-js");
46
+ /* global
47
+ _argv */
48
+ const
49
+ _argv =
50
+ _libcrash._argv;
43
51
  /* global
44
52
  _cmdline_check */
45
53
  const
46
54
  _cmdline_check =
47
55
  _libcrash._cmdline_check;
56
+ /* global
57
+ _echo */
58
+ const
59
+ _echo =
60
+ _libcrash._echo;
48
61
  /* global
49
62
  _error_display */
50
63
  const
@@ -55,6 +68,11 @@ const
55
68
  const
56
69
  _exit =
57
70
  _libcrash._exit;
71
+ /* global
72
+ _global_get */
73
+ const
74
+ _global_get =
75
+ _libcrash._global_get;
58
76
  /* global
59
77
  _msg_info */
60
78
  const
@@ -65,6 +83,11 @@ const
65
83
  const
66
84
  _msg_error =
67
85
  _libcrash._msg_error;
86
+ /* global
87
+ _override_set */
88
+ const
89
+ _override_set =
90
+ _libcrash._override_set;
68
91
  /* global
69
92
  _printf */
70
93
  const
@@ -75,6 +98,11 @@ const
75
98
  const
76
99
  _require =
77
100
  _libcrash._require;
101
+ /* global
102
+ _set */
103
+ const
104
+ _set =
105
+ _libcrash._set;
78
106
  const
79
107
  _ethers_module =
80
108
  await _require(
@@ -106,49 +134,71 @@ const
106
134
 
107
135
  function
108
136
  _global_variables() {
109
- app_name =
110
- "deployer-get";
137
+ _set(
138
+ "app",
139
+ "name",
140
+ "deployer-get");
111
141
  /* global
112
142
  wallet_seed:
113
143
  writable */
114
- wallet_seed =
115
- "";
144
+ _set(
145
+ "wallet",
146
+ "seed",
147
+ "");
116
148
  /* global
117
149
  retries_max:
118
150
  writable */
119
- retries_max =
120
- "";
151
+ _set(
152
+ "retries",
153
+ "max",
154
+ "");
121
155
  /* global
122
156
  api_key_path:
123
157
  writable */
124
- api_key_path =
125
- "";
158
+ _set(
159
+ "api_key",
160
+ "path",
161
+ "");
126
162
  /* global
127
163
  chain_id:
128
164
  writable */
129
- chain_id =
130
- "";
165
+ _set(
166
+ "chain",
167
+ "id",
168
+ "");
131
169
  /* global
132
170
  chain_name:
133
171
  writable */
134
- chain_name =
135
- "";
172
+ _set(
173
+ "chain",
174
+ "name",
175
+ "");
136
176
  /* global
137
177
  target_network:
138
178
  writable */
139
- target_network =
140
- "";
179
+ _set(
180
+ "target",
181
+ "network",
182
+ "");
141
183
  /* global
142
184
  contract_address:
143
185
  writable */
144
- contract_address =
145
- "";
186
+ _set(
187
+ "contract",
188
+ "address",
189
+ "");
146
190
  /* global
147
191
  transaction_deployment:
148
192
  writable */
149
- transaction_deployment =
150
- "";
151
- quiet =
193
+ _set(
194
+ "transaction",
195
+ "deployment",
196
+ "");
197
+ const
198
+ _global =
199
+ _global_get();
200
+ _global[
201
+ "quiet"] =
152
202
  "";
153
203
  }
154
204
 
@@ -380,60 +430,84 @@ function
380
430
 
381
431
  function
382
432
  _overrides_set() {
383
- if ( retries_max == "" ) {
384
- retries_max =
385
- 10;
386
- }
433
+ _override_set(
434
+ "retries",
435
+ "max",
436
+ 10);
387
437
  }
388
438
 
389
439
  function
390
440
  _cmdline_parse() {
391
- quiet =
441
+ let
442
+ _msg;
443
+ const
444
+ _global =
445
+ _global_get();
446
+ _global[
447
+ "quiet"] =
392
448
  "y";
393
- process.argv.forEach(
449
+ _argv.forEach(
394
450
  function (
395
451
  _value,
396
452
  _index,
397
453
  _array) {
398
454
  if ( _index == 2 ) {
399
- quiet =
455
+ _global[
456
+ "quiet"] =
400
457
  _value;
401
458
  }
402
459
  if ( _index == 3 ) {
403
- wallet_seed =
404
- _value;
460
+ _set(
461
+ "wallet",
462
+ "seed",
463
+ _value);
405
464
  }
406
465
  if ( _index == 4 ) {
407
- retries_max =
408
- _value;
466
+ _set(
467
+ "retries",
468
+ "max",
469
+ _value);
409
470
  }
410
471
  if ( _index == 5 ) {
411
- api_key_path =
412
- _value;
472
+ _set(
473
+ "api_key",
474
+ "path",
475
+ _value);
413
476
  }
414
477
  if ( _index == 6 ) {
415
- chain_id =
416
- _value;
478
+ _set(
479
+ "chain",
480
+ "id",
481
+ _value);
417
482
  }
418
483
  if ( _index == 7 ) {
419
- chain_name =
420
- _value;
484
+ _set(
485
+ "chain",
486
+ "name",
487
+ _value);
421
488
  }
422
489
  if ( _index == 8 ) {
423
- target_network =
424
- _value;
490
+ _set(
491
+ "target",
492
+ "network",
493
+ _value);
425
494
  }
426
495
  if ( _index == 9 ) {
427
- contract_address =
428
- _value;
496
+ _set(
497
+ "contract",
498
+ "address",
499
+ _value);
429
500
  }
430
501
  if ( _index == 10 ) {
431
- transaction_deployment =
432
- _value;
502
+ _set(
503
+ "transaction",
504
+ "deployment",
505
+ _value);
433
506
  }
434
507
  if ( _value == "-h" ||
435
508
  _value == "--help" ) {
436
- quiet =
509
+ _global[
510
+ "quiet"] =
437
511
  "n";
438
512
  _usage(
439
513
  0);
@@ -441,19 +515,25 @@ function
441
515
  }
442
516
  );
443
517
  if ( contract_address == "" ) {
518
+ _msg =
519
+ "No contract address specified.";
444
520
  _msg_error(
445
- "No contract address specified.",
521
+ _msg,
446
522
  0);
447
- quiet =
523
+ _global[
524
+ "quiet"] =
448
525
  "n";
449
526
  _usage(
450
527
  1);
451
528
  }
452
529
  if ( transaction_deployment == "" ) {
453
- _msg_error(
530
+ _msg =
454
531
  "No deployment transaction specified.",
532
+ _msg_error(
533
+ _msg,
455
534
  0);
456
- quiet =
535
+ _global[
536
+ "quiet"] =
457
537
  "n";
458
538
  _usage(
459
539
  1);
@@ -489,7 +569,7 @@ async function
489
569
  }
490
570
  }
491
571
 
492
- if ( _cmdline_check(
572
+ if ( await _cmdline_check(
493
573
  "deployer-get") ) {
494
574
  _global_variables();
495
575
  _cmdline_parse();
@@ -509,7 +589,11 @@ if ( _cmdline_check(
509
589
  app_opts);
510
590
  }
511
591
 
512
- module.exports = {
513
- _deployer_get:
514
- _deployer_get
592
+ export {
593
+ _deployer_get
515
594
  };
595
+
596
+ // module.exports = {
597
+ // _deployer_get:
598
+ // _deployer_get
599
+ // };