evm-contracts-tools 0.0.49 → 0.0.51

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 (65) hide show
  1. package/dist/evm-contract-call/evm-contract-call.js +1 -1
  2. package/dist/evm-contract-call/fs-worker.js +1 -1
  3. package/dist/evm-contract-deployment-abi/evm-contract-deployment-abi.js +1 -1
  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 -1
  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 -1
  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 -1
  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 -1
  13. package/dist/evm-contract-deployment-versions/evm-contract-deployment-versions.js +1 -1
  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 -1
  16. package/dist/evm-contract-deployments-dir/fs-worker.js +1 -1
  17. package/dist/evm-contracts-tools/evm-contracts-tools.js +1 -1
  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 -1
  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 -1
  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 -1
  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 +2 -0
  29. package/dist/libevm-contract-deployment-deployment-networks +1 -1
  30. package/dist/libevm-contract-deployment-networks/libevm-contract-deployment-networks.js +1 -1
  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 -1
  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 -1
  35. package/dist/libevm-contracts-tools +1 -1
  36. package/eslint.config.mjs +150 -0
  37. package/evm-contract-call +18 -11
  38. package/evm-contract-call.webpack.config.cjs +159 -0
  39. package/evm-contract-deployment-abi.webpack.config.cjs +159 -0
  40. package/evm-contract-deployment-address.webpack.config.cjs +159 -0
  41. package/evm-contract-deployment-bytecode.webpack.config.cjs +159 -0
  42. package/evm-contract-deployment-compiler-output.webpack.config.cjs +159 -0
  43. package/evm-contract-deployment-networks.webpack.config.cjs +159 -0
  44. package/evm-contract-deployment-versions.webpack.config.cjs +159 -0
  45. package/evm-contract-deployments-dir.webpack.config.cjs +159 -0
  46. package/fs-worker.webpack.config.cjs +82 -0
  47. package/lib/address-check +16 -11
  48. package/lib/bytecode-creation-get +24 -14
  49. package/lib/bytecode-runtime-get +20 -15
  50. package/lib/contract-get +35 -17
  51. package/lib/deployer-get +47 -10
  52. package/lib/deployer-verify +19 -16
  53. package/lib/evm-contract-call-dynamic +40 -23
  54. package/lib/evm-contract-call-static +222 -153
  55. package/libevm-contract-call +10 -5
  56. package/libevm-contract-call.webpack.config.cjs +159 -0
  57. package/libevm-contract-deployment-abi.webpack.config.cjs +155 -0
  58. package/libevm-contract-deployment-address.webpack.config.cjs +155 -0
  59. package/libevm-contract-deployment-bytecode.webpack.config.cjs +155 -0
  60. package/libevm-contract-deployment-compiler-output.webpack.config.cjs +155 -0
  61. package/libevm-contract-deployment-networks.webpack.config.cjs +159 -0
  62. package/libevm-contract-deployment-versions.webpack.config.cjs +159 -0
  63. package/libevm-contract-deployments-dir.webpack.config.cjs +159 -0
  64. package/package.json +47 -46
  65. package/webpack.config.cjs +155 -0
@@ -38,6 +38,11 @@ const
38
38
  const
39
39
  _error_display =
40
40
  _libcrash._error_display;
41
+ /* global
42
+ _exit */
43
+ const
44
+ _exit =
45
+ _libcrash._exit;
41
46
  /* global
42
47
  _file_read */
43
48
  const
@@ -64,10 +69,19 @@ const
64
69
  _printf =
65
70
  _libcrash._printf;
66
71
  /* global
67
- _process_exit */
72
+ _require */
73
+ const
74
+ _require =
75
+ _libcrash._require;
68
76
  const
69
- _process_exit =
70
- _libcrash._process_exit;
77
+ _evm_wallet_module =
78
+ await _require(
79
+ "evm-wallet");
80
+ /* global
81
+ _provider_get */
82
+ const
83
+ _provider_get =
84
+ _evm_wallet_module._provider_get;
71
85
  const
72
86
  _contract_get_module =
73
87
  require(
@@ -77,15 +91,6 @@ const
77
91
  const
78
92
  _contract_get =
79
93
  _contract_get_module._contract_get;
80
- const
81
- _evm_wallet_module =
82
- require(
83
- "evm-wallet.js");
84
- /* global
85
- _provider_get */
86
- const
87
- _provider_get =
88
- _evm_wallet_module._provider_get;
89
94
 
90
95
  function
91
96
  _global_variables() {
@@ -273,7 +278,7 @@ function
273
278
 
274
279
  function
275
280
  _usage(
276
- _exit) {
281
+ _exit_code) {
277
282
  let
278
283
  _line,
279
284
  _text;
@@ -313,8 +318,8 @@ function
313
318
  _msg_info(
314
319
  _line);
315
320
  }
316
- process.exit(
317
- _exit);
321
+ _exit(
322
+ _exit_code);
318
323
  }
319
324
 
320
325
  function
package/lib/contract-get CHANGED
@@ -24,19 +24,6 @@
24
24
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
25
25
  */
26
26
 
27
- const
28
- { ethers } =
29
- require(
30
- "ethers");
31
- const
32
- _ethers =
33
- ethers;
34
- const
35
- _contract_factory =
36
- _ethers.ContractFactory;
37
- const
38
- _base_contract =
39
- _ethers.BaseContract;
40
27
  const
41
28
  _libcrash =
42
29
  require(
@@ -51,6 +38,11 @@ const
51
38
  const
52
39
  _dirname =
53
40
  _libcrash._dirname;
41
+ /* global
42
+ _exit */
43
+ const
44
+ _exit =
45
+ _libcrash._exit;
54
46
  /* global
55
47
  _file_exists */
56
48
  const
@@ -81,10 +73,34 @@ const
81
73
  const
82
74
  _msg_error =
83
75
  _libcrash._msg_error;
76
+ /* global
77
+ _require */
78
+ const
79
+ _require =
80
+ _libcrash._require;
81
+ const
82
+ _ethers_module =
83
+ await _require(
84
+ "ethers");
85
+ /* global
86
+ _ethers */
87
+ const
88
+ _ethers =
89
+ _ethers_module.ethers;
90
+ /* global
91
+ _contract_factory */
92
+ const
93
+ _contract_factory =
94
+ _ethers.ContractFactory;
95
+ /* global
96
+ _base_contract */
97
+ const
98
+ _base_contract =
99
+ _ethers.BaseContract;
84
100
  const
85
101
  _evm_wallet_module =
86
- require(
87
- "evm-wallet.js");
102
+ await _require(
103
+ "evm-wallet");
88
104
  /* global
89
105
  _wallet_get */
90
106
  const
@@ -437,7 +453,8 @@ function
437
453
  }
438
454
 
439
455
  function
440
- _usage() {
456
+ _usage(
457
+ _exit_code) {
441
458
  let
442
459
  _line,
443
460
  _text;
@@ -477,7 +494,8 @@ function
477
494
  _msg_info(
478
495
  _line);
479
496
  }
480
- process.exit();
497
+ _exit(
498
+ _exit_code);
481
499
  }
482
500
 
483
501
  function _cmdline_parse() {
package/lib/deployer-get CHANGED
@@ -24,42 +24,82 @@
24
24
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
25
25
  */
26
26
 
27
+ /* Crash Javascript global variables */
28
+
29
+ /* global
30
+ app_name:
31
+ writable */
32
+ /* global
33
+ app_opts:
34
+ writable */
35
+ /* global
36
+ quiet:
37
+ writable */
38
+
27
39
  const
28
40
  _libcrash =
29
41
  require(
30
42
  "crash-js");
43
+ /* global
44
+ _cmdline_check */
31
45
  const
32
46
  _cmdline_check =
33
47
  _libcrash._cmdline_check;
48
+ /* global
49
+ _error_display */
34
50
  const
35
51
  _error_display =
36
52
  _libcrash._error_display;
53
+ /* global
54
+ _exit */
55
+ const
56
+ _exit =
57
+ _libcrash._exit;
58
+ /* global
59
+ _msg_info */
37
60
  const
38
61
  _msg_info =
39
62
  _libcrash._msg_info;
63
+ /* global
64
+ _msg_error */
40
65
  const
41
66
  _msg_error =
42
67
  _libcrash._msg_error;
68
+ /* global
69
+ _printf */
43
70
  const
44
71
  _printf =
45
72
  _libcrash._printf;
73
+ /* global
74
+ _require */
46
75
  const
47
- { ethers } =
48
- require(
76
+ _require =
77
+ _libcrash._require;
78
+ const
79
+ _ethers_module =
80
+ await _require(
49
81
  "ethers");
82
+ /* global
83
+ _ethers */
50
84
  const
51
85
  _ethers =
52
- ethers;
86
+ _ethers_module.ethers;
87
+ /* global
88
+ _wei_to_ethers */
53
89
  const
54
90
  _wei_to_ether =
55
91
  _ethers.formatEther;
56
92
  const
57
93
  _evm_transactions_tools_module =
58
- require(
94
+ await _require(
59
95
  "evm-transactions-tools");
96
+ /* global
97
+ _transaction_get */
60
98
  const
61
99
  _transaction_get =
62
100
  _evm_transactions_tools_module._transaction_get;
101
+ /* global
102
+ _transaction_receipt_get */
63
103
  const
64
104
  _transaction_receipt_get =
65
105
  _evm_transactions_tools_module._transaction_receipt_get;
@@ -108,9 +148,6 @@ function
108
148
  writable */
109
149
  transaction_deployment =
110
150
  "";
111
- /* global
112
- quiet:
113
- writable */
114
151
  quiet =
115
152
  "";
116
153
  }
@@ -294,7 +331,7 @@ function
294
331
 
295
332
  function
296
333
  _usage(
297
- _exit) {
334
+ _exit_code) {
298
335
  let
299
336
  _display_fun,
300
337
  _line,
@@ -337,8 +374,8 @@ function
337
374
  _msg_info(
338
375
  _line);
339
376
  }
340
- process.exit(
341
- _exit);
377
+ _exit(
378
+ _exit_code);
342
379
  }
343
380
 
344
381
  function
@@ -2,26 +2,29 @@
2
2
 
3
3
  // SPDX-License-Identifier: AGPL-3.0-or-later
4
4
 
5
- /** ----------------------------------------------------------------------
5
+ /** ----------------------------------------------------------------
6
+ * deployer-verify
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
  const
@@ -33,6 +36,11 @@ const
33
36
  const
34
37
  _cmdline_check =
35
38
  _libcrash._cmdline_check;
39
+ /* global
40
+ _exit */
41
+ const
42
+ _exit =
43
+ _libcrash._exit;
36
44
  /* global
37
45
  _msg_info */
38
46
  const
@@ -48,11 +56,6 @@ const
48
56
  const
49
57
  _printf =
50
58
  _libcrash._printf;
51
- /* global
52
- _process_exit */
53
- const
54
- _process_exit =
55
- _libcrash._process_exit;
56
59
  const
57
60
  _deployer_get_module =
58
61
  require(
@@ -200,7 +203,7 @@ function
200
203
 
201
204
  function
202
205
  _usage(
203
- _exit) {
206
+ _exit_code) {
204
207
  let
205
208
  _line,
206
209
  _text;
@@ -245,8 +248,8 @@ function
245
248
  _msg_info(
246
249
  _line);
247
250
  }
248
- _process_exit(
249
- _exit);
251
+ _exit(
252
+ _exit_code);
250
253
  }
251
254
 
252
255
  function
@@ -3,7 +3,7 @@
3
3
  // SPDX-License-Identifier: AGPL-3.0-or-later
4
4
 
5
5
  /** ----------------------------------------------------------------
6
- * fs-utils
6
+ * evm-contract-call-dynamic
7
7
  * ----------------------------------------------------------------
8
8
  * Copyright ©
9
9
  * Pellegrino Prevete
@@ -41,6 +41,11 @@ const
41
41
  const
42
42
  _dirname =
43
43
  _libcrash._dirname;
44
+ /* global
45
+ _exit */
46
+ const
47
+ _exit =
48
+ _libcrash._exit;
44
49
  /* global
45
50
  _error_display */
46
51
  const
@@ -56,23 +61,35 @@ const
56
61
  const
57
62
  _msg_error =
58
63
  _libcrash._msg_error;
64
+ /* global
65
+ _override_set */
66
+ const
67
+ _override_set =
68
+ _libcrash._override_set;
59
69
  /* global
60
70
  _path_join */
61
71
  const
62
72
  _path_join =
63
73
  _libcrash._path_join;
74
+ /* global
75
+ _require */
76
+ const
77
+ _require =
78
+ _libcrash._require;
64
79
  /* global
65
80
  _sleep */
66
81
  const
67
82
  _sleep =
68
83
  _libcrash._sleep;
69
84
  const
70
- { ethers } =
71
- require(
85
+ _ethers_module =
86
+ await _require(
72
87
  "ethers");
88
+ /* global
89
+ _ethers */
73
90
  const
74
91
  _ethers =
75
- ethers;
92
+ _ethers_module.ethers;
76
93
  /* global
77
94
  _wei_to_ether */
78
95
  const
@@ -85,8 +102,8 @@ const
85
102
  _ethers.parseUnits;
86
103
  const
87
104
  _evm_wallet_module =
88
- require(
89
- "evm-wallet.js");
105
+ await _require(
106
+ "evm-wallet");
90
107
  /* global
91
108
  _price_gas_transaction_get */
92
109
  const
@@ -968,22 +985,22 @@ async function
968
985
 
969
986
  function
970
987
  _overrides_set() {
971
- if ( retries_max == "" ) {
972
- retries_max =
973
- 100;
974
- }
975
- if ( call_timeout == "" ) {
976
- call_timeout =
977
- 300000;
978
- }
979
- if ( msg_value == "" ) {
980
- msg_value =
981
- 0;
982
- }
983
- if ( measure_unit == "" ) {
984
- measure_unit =
985
- "wei";
986
- }
988
+ _override_set(
989
+ "retries",
990
+ "max",
991
+ "100");
992
+ _override_set(
993
+ "call",
994
+ "timeout",
995
+ "300000");
996
+ _override_set(
997
+ "msg",
998
+ "value",
999
+ 0);
1000
+ _override_set(
1001
+ "measure",
1002
+ "unit",
1003
+ "wei");
987
1004
  }
988
1005
 
989
1006
  function
@@ -1070,7 +1087,7 @@ function
1070
1087
  _msgs[
1071
1088
  _line]);
1072
1089
  }
1073
- process.exit(
1090
+ _exit(
1074
1091
  _exit_code);
1075
1092
  }
1076
1093