evm-contracts-tools 0.0.55 → 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.
- package/dist/evm-contract-call/evm-contract-call.js +1 -1
- package/dist/evm-contract-deployment-address/evm-contract-deployment-address.js +1 -1
- package/dist/evm-contracts-tools/evm-contracts-tools.js +1 -1
- package/dist/libevm-contract-call/libevm-contract-call.js +1 -1
- package/dist/libevm-contract-deployment-address/libevm-contract-deployment-address.js +1 -2
- package/dist/libevm-contract-deployment-networks/libevm-contract-deployment-networks.js +1 -1
- package/dist/libevm-contract-deployment-versions/libevm-contract-deployment-versions.js +1 -1
- package/evm-contract-call +133 -6
- package/lib/bytecode-creation-get +74 -32
- package/lib/bytecode-runtime-get +171 -69
- package/lib/contract-get +189 -93
- package/lib/deployer-get +145 -61
- package/lib/deployer-verify +226 -113
- package/lib/evm-contract-call-dynamic +331 -194
- package/lib/evm-contract-call-static +121 -44
- package/libevm-contract-call +405 -0
- package/libevm-contract-deployment +3 -3
- package/libevm-contract-deployment-address +31 -18
- package/package.json +5 -5
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
|
|
14
|
-
* it under the terms of the GNU General Public License as
|
|
15
|
-
* the Free Software Foundation, either version 3 of
|
|
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
|
|
24
|
-
* along with this program.
|
|
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
|
-
|
|
42
|
-
"
|
|
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
|
-
|
|
110
|
-
"
|
|
137
|
+
_set(
|
|
138
|
+
"app",
|
|
139
|
+
"name",
|
|
140
|
+
"deployer-get");
|
|
111
141
|
/* global
|
|
112
142
|
wallet_seed:
|
|
113
143
|
writable */
|
|
114
|
-
|
|
115
|
-
""
|
|
144
|
+
_set(
|
|
145
|
+
"wallet",
|
|
146
|
+
"seed",
|
|
147
|
+
"");
|
|
116
148
|
/* global
|
|
117
149
|
retries_max:
|
|
118
150
|
writable */
|
|
119
|
-
|
|
120
|
-
""
|
|
151
|
+
_set(
|
|
152
|
+
"retries",
|
|
153
|
+
"max",
|
|
154
|
+
"");
|
|
121
155
|
/* global
|
|
122
156
|
api_key_path:
|
|
123
157
|
writable */
|
|
124
|
-
|
|
125
|
-
""
|
|
158
|
+
_set(
|
|
159
|
+
"api_key",
|
|
160
|
+
"path",
|
|
161
|
+
"");
|
|
126
162
|
/* global
|
|
127
163
|
chain_id:
|
|
128
164
|
writable */
|
|
129
|
-
|
|
130
|
-
""
|
|
165
|
+
_set(
|
|
166
|
+
"chain",
|
|
167
|
+
"id",
|
|
168
|
+
"");
|
|
131
169
|
/* global
|
|
132
170
|
chain_name:
|
|
133
171
|
writable */
|
|
134
|
-
|
|
135
|
-
""
|
|
172
|
+
_set(
|
|
173
|
+
"chain",
|
|
174
|
+
"name",
|
|
175
|
+
"");
|
|
136
176
|
/* global
|
|
137
177
|
target_network:
|
|
138
178
|
writable */
|
|
139
|
-
|
|
140
|
-
""
|
|
179
|
+
_set(
|
|
180
|
+
"target",
|
|
181
|
+
"network",
|
|
182
|
+
"");
|
|
141
183
|
/* global
|
|
142
184
|
contract_address:
|
|
143
185
|
writable */
|
|
144
|
-
|
|
145
|
-
""
|
|
186
|
+
_set(
|
|
187
|
+
"contract",
|
|
188
|
+
"address",
|
|
189
|
+
"");
|
|
146
190
|
/* global
|
|
147
191
|
transaction_deployment:
|
|
148
192
|
writable */
|
|
149
|
-
|
|
150
|
-
""
|
|
151
|
-
|
|
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
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
433
|
+
_override_set(
|
|
434
|
+
"retries",
|
|
435
|
+
"max",
|
|
436
|
+
10);
|
|
387
437
|
}
|
|
388
438
|
|
|
389
439
|
function
|
|
390
440
|
_cmdline_parse() {
|
|
391
|
-
|
|
441
|
+
let
|
|
442
|
+
_msg;
|
|
443
|
+
const
|
|
444
|
+
_global =
|
|
445
|
+
_global_get();
|
|
446
|
+
_global[
|
|
447
|
+
"quiet"] =
|
|
392
448
|
"y";
|
|
393
|
-
|
|
449
|
+
_argv.forEach(
|
|
394
450
|
function (
|
|
395
451
|
_value,
|
|
396
452
|
_index,
|
|
397
453
|
_array) {
|
|
398
454
|
if ( _index == 2 ) {
|
|
399
|
-
|
|
455
|
+
_global[
|
|
456
|
+
"quiet"] =
|
|
400
457
|
_value;
|
|
401
458
|
}
|
|
402
459
|
if ( _index == 3 ) {
|
|
403
|
-
|
|
404
|
-
|
|
460
|
+
_set(
|
|
461
|
+
"wallet",
|
|
462
|
+
"seed",
|
|
463
|
+
_value);
|
|
405
464
|
}
|
|
406
465
|
if ( _index == 4 ) {
|
|
407
|
-
|
|
408
|
-
|
|
466
|
+
_set(
|
|
467
|
+
"retries",
|
|
468
|
+
"max",
|
|
469
|
+
_value);
|
|
409
470
|
}
|
|
410
471
|
if ( _index == 5 ) {
|
|
411
|
-
|
|
412
|
-
|
|
472
|
+
_set(
|
|
473
|
+
"api_key",
|
|
474
|
+
"path",
|
|
475
|
+
_value);
|
|
413
476
|
}
|
|
414
477
|
if ( _index == 6 ) {
|
|
415
|
-
|
|
416
|
-
|
|
478
|
+
_set(
|
|
479
|
+
"chain",
|
|
480
|
+
"id",
|
|
481
|
+
_value);
|
|
417
482
|
}
|
|
418
483
|
if ( _index == 7 ) {
|
|
419
|
-
|
|
420
|
-
|
|
484
|
+
_set(
|
|
485
|
+
"chain",
|
|
486
|
+
"name",
|
|
487
|
+
_value);
|
|
421
488
|
}
|
|
422
489
|
if ( _index == 8 ) {
|
|
423
|
-
|
|
424
|
-
|
|
490
|
+
_set(
|
|
491
|
+
"target",
|
|
492
|
+
"network",
|
|
493
|
+
_value);
|
|
425
494
|
}
|
|
426
495
|
if ( _index == 9 ) {
|
|
427
|
-
|
|
428
|
-
|
|
496
|
+
_set(
|
|
497
|
+
"contract",
|
|
498
|
+
"address",
|
|
499
|
+
_value);
|
|
429
500
|
}
|
|
430
501
|
if ( _index == 10 ) {
|
|
431
|
-
|
|
432
|
-
|
|
502
|
+
_set(
|
|
503
|
+
"transaction",
|
|
504
|
+
"deployment",
|
|
505
|
+
_value);
|
|
433
506
|
}
|
|
434
507
|
if ( _value == "-h" ||
|
|
435
508
|
_value == "--help" ) {
|
|
436
|
-
|
|
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
|
-
|
|
521
|
+
_msg,
|
|
446
522
|
0);
|
|
447
|
-
|
|
523
|
+
_global[
|
|
524
|
+
"quiet"] =
|
|
448
525
|
"n";
|
|
449
526
|
_usage(
|
|
450
527
|
1);
|
|
451
528
|
}
|
|
452
529
|
if ( transaction_deployment == "" ) {
|
|
453
|
-
|
|
530
|
+
_msg =
|
|
454
531
|
"No deployment transaction specified.",
|
|
532
|
+
_msg_error(
|
|
533
|
+
_msg,
|
|
455
534
|
0);
|
|
456
|
-
|
|
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
|
-
|
|
513
|
-
_deployer_get
|
|
514
|
-
_deployer_get
|
|
592
|
+
export {
|
|
593
|
+
_deployer_get
|
|
515
594
|
};
|
|
595
|
+
|
|
596
|
+
// module.exports = {
|
|
597
|
+
// _deployer_get:
|
|
598
|
+
// _deployer_get
|
|
599
|
+
// };
|