evm-contracts-tools 0.0.64 → 0.0.67
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/README.md +13 -1
- package/dist/evm-contract-call/evm-contract-call.js +1 -1
- package/dist/evm-contract-deployment-abi/evm-contract-deployment-abi.js +1 -1
- package/dist/evm-contract-deployment-address/evm-contract-deployment-address.js +1 -1
- package/dist/evm-contract-deployment-bytecode/evm-contract-deployment-bytecode.js +1 -1
- package/dist/evm-contract-deployment-compiler-output/evm-contract-deployment-compiler-output.js +1 -1
- package/dist/evm-contract-deployment-networks/evm-contract-deployment-networks.js +1 -1
- package/dist/evm-contract-deployment-versions/evm-contract-deployment-versions.js +1 -1
- package/dist/evm-contract-deployments-dir/evm-contract-deployments-dir.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-abi/libevm-contract-deployment-abi.js +1 -1
- package/dist/libevm-contract-deployment-address/libevm-contract-deployment-address.js +1 -1
- package/dist/libevm-contract-deployment-bytecode/libevm-contract-deployment-bytecode.js +1 -1
- package/dist/libevm-contract-deployment-compiler-output/libevm-contract-deployment-compiler-output.js +1 -1
- 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/dist/libevm-contract-deployments-dir/libevm-contract-deployments-dir.js +1 -1
- package/evm-contracts-tools +522 -0
- package/libevm-contract-call +158 -146
- package/libevm-contract-deployment +60 -12
- package/libevm-contract-deployment-abi +3 -0
- package/libevm-contract-deployment-address +1 -0
- package/libevm-contract-deployment-bytecode +1 -0
- package/libevm-contract-deployment-compiler-output +3 -0
- package/libevm-contract-deployment-networks +4 -62
- package/package.json +9 -9
package/libevm-contract-call
CHANGED
|
@@ -221,25 +221,38 @@ const
|
|
|
221
221
|
const
|
|
222
222
|
_target_contract_check =
|
|
223
223
|
_libevm_contract_deployment_module._target_contract_check;
|
|
224
|
+
/* global
|
|
225
|
+
_target_networks_auto_detect */
|
|
226
|
+
const
|
|
227
|
+
_target_networks_auto_detect =
|
|
228
|
+
_libevm_contract_deployment_module._target_networks_auto_detect;
|
|
224
229
|
const
|
|
225
|
-
|
|
230
|
+
_address_check_module =
|
|
226
231
|
await import(
|
|
227
|
-
"./
|
|
232
|
+
"./lib/address-check");
|
|
228
233
|
/* global
|
|
229
234
|
_address_check */
|
|
230
235
|
const
|
|
231
236
|
_address_check =
|
|
232
|
-
|
|
233
|
-
/* global
|
|
234
|
-
_contract_call_static */
|
|
237
|
+
_address_check_module._address_check;
|
|
235
238
|
const
|
|
236
|
-
|
|
237
|
-
|
|
239
|
+
_evm_contract_call_dynamic_module =
|
|
240
|
+
await import(
|
|
241
|
+
"./lib/evm-contract-call-dynamic");
|
|
238
242
|
/* global
|
|
239
243
|
_contract_run */
|
|
240
244
|
const
|
|
241
245
|
_contract_run =
|
|
242
|
-
|
|
246
|
+
_evm_contract_call_dynamic_module._contract_run;
|
|
247
|
+
const
|
|
248
|
+
_evm_contract_call_static_module =
|
|
249
|
+
await import(
|
|
250
|
+
"./lib/evm-contract-call-static");
|
|
251
|
+
/* global
|
|
252
|
+
_contract_call_static */
|
|
253
|
+
const
|
|
254
|
+
_contract_call_static =
|
|
255
|
+
_evm_contract_call_static_module._contract_call_static;
|
|
243
256
|
const
|
|
244
257
|
_evm_contract_deployment_address_module =
|
|
245
258
|
await import(
|
|
@@ -295,6 +308,113 @@ const
|
|
|
295
308
|
_data_get =
|
|
296
309
|
_ethereum_data_module._data_get;
|
|
297
310
|
|
|
311
|
+
function
|
|
312
|
+
_artifact_type_check(
|
|
313
|
+
_artifact_type) {
|
|
314
|
+
let
|
|
315
|
+
_flag_empty,
|
|
316
|
+
_flag_wrong,
|
|
317
|
+
_msg_empty,
|
|
318
|
+
_msg_wrong;
|
|
319
|
+
_flag_empty =
|
|
320
|
+
false;
|
|
321
|
+
_flag_wrong =
|
|
322
|
+
false;
|
|
323
|
+
const
|
|
324
|
+
_artifact_type_type =
|
|
325
|
+
typeof(
|
|
326
|
+
_artifact_type);
|
|
327
|
+
if ( _artifact_type_type === "undefined" ) {
|
|
328
|
+
_msg_empty =
|
|
329
|
+
"Artifact type undefined.";
|
|
330
|
+
_flag_empty =
|
|
331
|
+
true;
|
|
332
|
+
}
|
|
333
|
+
else if ( _artifact_type_type === "string" ) {
|
|
334
|
+
if ( _artifact_type_type.length < 1 ) {
|
|
335
|
+
_msg_empty =
|
|
336
|
+
"Artifact type not set.";
|
|
337
|
+
_flag_empty =
|
|
338
|
+
true;
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
if ( _artifact_type !== "abi" &&
|
|
342
|
+
_artifact_type !== "bytecode" &&
|
|
343
|
+
_artifact_type !== "compiler_output" ) {
|
|
344
|
+
_msg_wrong =
|
|
345
|
+
"Artifact type can be 'abi', " +
|
|
346
|
+
"'bytecode' or 'compiler_output'.";
|
|
347
|
+
_flag_wrong =
|
|
348
|
+
true;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
_msg_wrong =
|
|
354
|
+
"Artifact type must be of type string.";
|
|
355
|
+
_flag_wrong =
|
|
356
|
+
true;
|
|
357
|
+
}
|
|
358
|
+
if ( _flag_empty ) {
|
|
359
|
+
_msg_error(
|
|
360
|
+
_msg_empty,
|
|
361
|
+
0);
|
|
362
|
+
throw _msg_empty;
|
|
363
|
+
}
|
|
364
|
+
if ( _flag_wrong ) {
|
|
365
|
+
_msg_error(
|
|
366
|
+
_msg_wrong,
|
|
367
|
+
0);
|
|
368
|
+
throw _msg_wrong;
|
|
369
|
+
}
|
|
370
|
+
return _artifact_type;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function
|
|
374
|
+
_artifact_local_auto_detect(
|
|
375
|
+
_artifact_type) {
|
|
376
|
+
let
|
|
377
|
+
_msg;
|
|
378
|
+
try {
|
|
379
|
+
_artifact_type =
|
|
380
|
+
_artifact_type_check(
|
|
381
|
+
_artifact_type);
|
|
382
|
+
}
|
|
383
|
+
catch(
|
|
384
|
+
_error) {
|
|
385
|
+
_msg =
|
|
386
|
+
"Error checking artifact type.";
|
|
387
|
+
_msg_error(
|
|
388
|
+
_msg,
|
|
389
|
+
0);
|
|
390
|
+
_echo2(
|
|
391
|
+
_error);
|
|
392
|
+
throw _error;
|
|
393
|
+
}
|
|
394
|
+
const
|
|
395
|
+
_artifact =
|
|
396
|
+
_default_artifact_path_get(
|
|
397
|
+
_artifact_type);
|
|
398
|
+
if ( _artifact_type == "abi" ) {
|
|
399
|
+
_override_set(
|
|
400
|
+
"contract",
|
|
401
|
+
"abi",
|
|
402
|
+
_artifact);
|
|
403
|
+
}
|
|
404
|
+
else if ( _artifact_type == "bytecode" ) {
|
|
405
|
+
_override_set(
|
|
406
|
+
"contract",
|
|
407
|
+
"bytecode",
|
|
408
|
+
_artifact);
|
|
409
|
+
}
|
|
410
|
+
else if ( _artifact_type == "compiler_output" ) {
|
|
411
|
+
_override_set(
|
|
412
|
+
"contract",
|
|
413
|
+
"compiler_output",
|
|
414
|
+
_artifact);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
298
418
|
function
|
|
299
419
|
_target_networks_get(
|
|
300
420
|
_target_networks) {
|
|
@@ -429,33 +549,6 @@ function
|
|
|
429
549
|
_target_network ];
|
|
430
550
|
}
|
|
431
551
|
|
|
432
|
-
function
|
|
433
|
-
_target_networks_auto_detect() {
|
|
434
|
-
// TODO:
|
|
435
|
-
// _evm_wallet_module._balance_discovery
|
|
436
|
-
let
|
|
437
|
-
_target_network,
|
|
438
|
-
_target_networks;
|
|
439
|
-
_target_networks =
|
|
440
|
-
_get(
|
|
441
|
-
"target",
|
|
442
|
-
"networks");
|
|
443
|
-
[ _target_networks,
|
|
444
|
-
/* eslint-disable-next-line
|
|
445
|
-
prefer-const */
|
|
446
|
-
_target_network ] =
|
|
447
|
-
_target_networks_auto_detect(
|
|
448
|
-
_target_networks);
|
|
449
|
-
_set(
|
|
450
|
-
"target",
|
|
451
|
-
"networks",
|
|
452
|
-
_target_networks);
|
|
453
|
-
_override_set(
|
|
454
|
-
"target",
|
|
455
|
-
"network",
|
|
456
|
-
_target_network);
|
|
457
|
-
}
|
|
458
|
-
|
|
459
552
|
function
|
|
460
553
|
_contract_artifacts_retrieve() {
|
|
461
554
|
true;
|
|
@@ -781,113 +874,6 @@ async function
|
|
|
781
874
|
return _out;
|
|
782
875
|
}
|
|
783
876
|
|
|
784
|
-
function
|
|
785
|
-
_artifact_type_check(
|
|
786
|
-
_artifact_type) {
|
|
787
|
-
let
|
|
788
|
-
_flag_empty,
|
|
789
|
-
_flag_wrong,
|
|
790
|
-
_msg_empty,
|
|
791
|
-
_msg_wrong;
|
|
792
|
-
_flag_empty =
|
|
793
|
-
false;
|
|
794
|
-
_flag_wrong =
|
|
795
|
-
false;
|
|
796
|
-
const
|
|
797
|
-
_artifact_type_type =
|
|
798
|
-
typeof(
|
|
799
|
-
_artifact_type);
|
|
800
|
-
if ( _artifact_type_type === "undefined" ) {
|
|
801
|
-
_msg_empty =
|
|
802
|
-
"Artifact type undefined.";
|
|
803
|
-
_flag_empty =
|
|
804
|
-
true;
|
|
805
|
-
}
|
|
806
|
-
else if ( _artifact_type_type === "string" ) {
|
|
807
|
-
if ( _artifact_type_type.length < 1 ) {
|
|
808
|
-
_msg_empty =
|
|
809
|
-
"Artifact type not set.";
|
|
810
|
-
_flag_empty =
|
|
811
|
-
true;
|
|
812
|
-
}
|
|
813
|
-
else {
|
|
814
|
-
if ( _artifact_type !== "abi" &&
|
|
815
|
-
_artifact_type !== "bytecode" &&
|
|
816
|
-
_artifact_type !== "compiler_output" ) {
|
|
817
|
-
_msg_wrong =
|
|
818
|
-
"Artifact type can be 'abi', " +
|
|
819
|
-
"'bytecode' or 'compiler_output'.";
|
|
820
|
-
_flag_wrong =
|
|
821
|
-
true;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
else {
|
|
826
|
-
_msg_wrong =
|
|
827
|
-
"Artifact type must be of type string.";
|
|
828
|
-
_flag_wrong =
|
|
829
|
-
true;
|
|
830
|
-
}
|
|
831
|
-
if ( _flag_empty ) {
|
|
832
|
-
_msg_error(
|
|
833
|
-
_msg_empty,
|
|
834
|
-
0);
|
|
835
|
-
throw _msg_empty;
|
|
836
|
-
}
|
|
837
|
-
if ( _flag_wrong ) {
|
|
838
|
-
_msg_error(
|
|
839
|
-
_msg_wrong,
|
|
840
|
-
0);
|
|
841
|
-
throw _msg_wrong;
|
|
842
|
-
}
|
|
843
|
-
return _artifact_type;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
function
|
|
847
|
-
_artifact_local_auto_detect(
|
|
848
|
-
_artifact_type) {
|
|
849
|
-
let
|
|
850
|
-
_msg;
|
|
851
|
-
try {
|
|
852
|
-
_artifact_type =
|
|
853
|
-
_artifact_type_check(
|
|
854
|
-
_artifact_type);
|
|
855
|
-
}
|
|
856
|
-
catch(
|
|
857
|
-
_error) {
|
|
858
|
-
_msg =
|
|
859
|
-
"Error checking artifact type.";
|
|
860
|
-
_msg_error(
|
|
861
|
-
_msg,
|
|
862
|
-
0);
|
|
863
|
-
_echo2(
|
|
864
|
-
_error);
|
|
865
|
-
throw _error;
|
|
866
|
-
}
|
|
867
|
-
const
|
|
868
|
-
_artifact =
|
|
869
|
-
_default_artifact_path_get(
|
|
870
|
-
_artifact_type);
|
|
871
|
-
if ( _artifact_type == "abi" ) {
|
|
872
|
-
_override_set(
|
|
873
|
-
"contract",
|
|
874
|
-
"abi",
|
|
875
|
-
_artifact);
|
|
876
|
-
}
|
|
877
|
-
else if ( _artifact_type == "bytecode" ) {
|
|
878
|
-
_override_set(
|
|
879
|
-
"contract",
|
|
880
|
-
"bytecode",
|
|
881
|
-
_artifact);
|
|
882
|
-
}
|
|
883
|
-
else if ( _artifact_type == "compiler_output" ) {
|
|
884
|
-
_override_set(
|
|
885
|
-
"contract",
|
|
886
|
-
"compiler_output",
|
|
887
|
-
_artifact);
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
|
|
891
877
|
async function
|
|
892
878
|
_target_app_get(
|
|
893
879
|
_contract_address) {
|
|
@@ -982,7 +968,7 @@ async function
|
|
|
982
968
|
_contract] =
|
|
983
969
|
1;
|
|
984
970
|
}
|
|
985
|
-
|
|
971
|
+
}
|
|
986
972
|
}
|
|
987
973
|
}
|
|
988
974
|
}
|
|
@@ -1235,26 +1221,34 @@ export {
|
|
|
1235
1221
|
_address_check,
|
|
1236
1222
|
_app_lookup_contract,
|
|
1237
1223
|
_artifact_local_auto_detect,
|
|
1224
|
+
_artifact_type_check,
|
|
1238
1225
|
_cache_dir_auto_detect,
|
|
1239
1226
|
_call_auth_auto_detect,
|
|
1240
1227
|
_call_auth_get,
|
|
1228
|
+
_call_type_check,
|
|
1241
1229
|
_contract_abi_auto_detect,
|
|
1242
1230
|
_contract_abi_check,
|
|
1243
1231
|
_contract_address_auto_detect,
|
|
1244
1232
|
_contract_address_check,
|
|
1233
|
+
_contract_artifacts_retrieve,
|
|
1245
1234
|
_contract_bytecode_auto_detect,
|
|
1246
1235
|
_contract_bytecode_check,
|
|
1247
1236
|
_contract_compiler_output_auto_detect,
|
|
1248
1237
|
_contract_compiler_output_check,
|
|
1238
|
+
_contract_lookup_address,
|
|
1239
|
+
_contracts_init,
|
|
1249
1240
|
_data_dir_auto_detect,
|
|
1250
1241
|
_default_artifact_path_get,
|
|
1251
1242
|
_deployments_dir_auto_detect,
|
|
1252
1243
|
_evm_contract_call,
|
|
1253
1244
|
_help_display_check,
|
|
1245
|
+
_methods_init,
|
|
1254
1246
|
_target_app_auto_detect,
|
|
1247
|
+
_target_app_get,
|
|
1255
1248
|
_target_contract_auto_detect,
|
|
1256
1249
|
_target_networks_auto_detect,
|
|
1257
|
-
_target_networks_get
|
|
1250
|
+
_target_networks_get,
|
|
1251
|
+
_target_networks_check
|
|
1258
1252
|
};
|
|
1259
1253
|
|
|
1260
1254
|
// Common Javascript exports
|
|
@@ -1266,6 +1260,10 @@ export {
|
|
|
1266
1260
|
// _app_lookup_contract,
|
|
1267
1261
|
// _artifact_local_auto_detect:
|
|
1268
1262
|
// _artifact_local_auto_detect,
|
|
1263
|
+
// _artifact_type_check:
|
|
1264
|
+
// _artifact_type_check,
|
|
1265
|
+
// _cache_dir_auto_detect:
|
|
1266
|
+
// _cache_dir_auto_detect,
|
|
1269
1267
|
// _cache_dir_auto_detect:
|
|
1270
1268
|
// _cache_dir_auto_detect,
|
|
1271
1269
|
// _call_auth_auto_detect:
|
|
@@ -1280,6 +1278,8 @@ export {
|
|
|
1280
1278
|
// _contract_address_auto_detect,
|
|
1281
1279
|
// _contract_address_check:
|
|
1282
1280
|
// _contract_address_check,
|
|
1281
|
+
// _contract_artifacts_retrieve:
|
|
1282
|
+
// _contract_artifacts_retrieve,
|
|
1283
1283
|
// _contract_bytecode_auto_detect:
|
|
1284
1284
|
// _contract_bytecode_auto_detect,
|
|
1285
1285
|
// _contract_bytecode_check:
|
|
@@ -1288,6 +1288,10 @@ export {
|
|
|
1288
1288
|
// _contract_compiler_output_auto_detect,
|
|
1289
1289
|
// _contract_compiler_output_check:
|
|
1290
1290
|
// _contract_compiler_output_check,
|
|
1291
|
+
// _contract_lookup_address:
|
|
1292
|
+
// _contract_lookup_address,
|
|
1293
|
+
// _contracts_init:
|
|
1294
|
+
// _contracts_init,
|
|
1291
1295
|
// _data_dir_auto_detect:
|
|
1292
1296
|
// _data_dir_auto_detect,
|
|
1293
1297
|
// _default_artifact_path_get:
|
|
@@ -1296,12 +1300,20 @@ export {
|
|
|
1296
1300
|
// _deployments_dir_auto_detect,
|
|
1297
1301
|
// _evm_contract_call:
|
|
1298
1302
|
// _evm_contract_call,
|
|
1303
|
+
// _help_display_check:
|
|
1304
|
+
// _help_display_check,
|
|
1305
|
+
// _methods_init:
|
|
1306
|
+
// _methods_init,
|
|
1299
1307
|
// _target_app_auto_detect:
|
|
1300
1308
|
// _target_app_auto_detect,
|
|
1301
|
-
//
|
|
1302
|
-
//
|
|
1309
|
+
// _target_app_get:
|
|
1310
|
+
// _target_app_get,
|
|
1303
1311
|
// _target_contract_auto_detect:
|
|
1304
1312
|
// _target_contract_auto_detect,
|
|
1313
|
+
// _target_networks_auto_detect:
|
|
1314
|
+
// _target_networks_auto_detect,
|
|
1315
|
+
// _target_networks_check:
|
|
1316
|
+
// _target_networks_check,
|
|
1305
1317
|
// _target_networks_get:
|
|
1306
1318
|
// _target_networks_get
|
|
1307
1319
|
// };
|
|
@@ -182,15 +182,6 @@ const
|
|
|
182
182
|
const
|
|
183
183
|
_set =
|
|
184
184
|
_libcrash_module._set;
|
|
185
|
-
const
|
|
186
|
-
_evm_chains_info_module =
|
|
187
|
-
await _require(
|
|
188
|
-
"evm-chains-info");
|
|
189
|
-
/* global
|
|
190
|
-
_evm_chains_info */
|
|
191
|
-
const
|
|
192
|
-
_evm_chains_info =
|
|
193
|
-
_evm_chains_info_module._evm_chains_info;
|
|
194
185
|
/* global
|
|
195
186
|
_evm_contract_deployments_dir */
|
|
196
187
|
/* global
|
|
@@ -198,14 +189,23 @@ const
|
|
|
198
189
|
/* global
|
|
199
190
|
_evm_contract_deployment_versions */
|
|
200
191
|
const
|
|
201
|
-
|
|
192
|
+
_address_check_module =
|
|
202
193
|
await import(
|
|
203
|
-
"./
|
|
194
|
+
"./lib/address-check");
|
|
204
195
|
/* global
|
|
205
196
|
_address_check */
|
|
206
197
|
const
|
|
207
198
|
_address_check =
|
|
208
|
-
|
|
199
|
+
_address_check_module._address_check;
|
|
200
|
+
const
|
|
201
|
+
_evm_chains_info_module =
|
|
202
|
+
await _require(
|
|
203
|
+
"evm-chains-info");
|
|
204
|
+
/* global
|
|
205
|
+
_evm_chains_info */
|
|
206
|
+
const
|
|
207
|
+
_evm_chains_info =
|
|
208
|
+
_evm_chains_info_module._evm_chains_info;
|
|
209
209
|
|
|
210
210
|
function
|
|
211
211
|
_configuration_format_check(
|
|
@@ -1931,6 +1931,10 @@ function
|
|
|
1931
1931
|
return _app;
|
|
1932
1932
|
}
|
|
1933
1933
|
|
|
1934
|
+
const
|
|
1935
|
+
_target_app_check =
|
|
1936
|
+
_app_check;
|
|
1937
|
+
|
|
1934
1938
|
async function
|
|
1935
1939
|
_contract_version_auto_detect() {
|
|
1936
1940
|
let
|
|
@@ -3100,6 +3104,37 @@ async function
|
|
|
3100
3104
|
return _version;
|
|
3101
3105
|
}
|
|
3102
3106
|
|
|
3107
|
+
const
|
|
3108
|
+
_contract_version_check =
|
|
3109
|
+
_version_check;
|
|
3110
|
+
|
|
3111
|
+
function
|
|
3112
|
+
_target_networks_auto_detect() {
|
|
3113
|
+
// TODO:
|
|
3114
|
+
// _evm_wallet_module._balance_discovery
|
|
3115
|
+
let
|
|
3116
|
+
_target_network,
|
|
3117
|
+
_target_networks;
|
|
3118
|
+
_target_networks =
|
|
3119
|
+
_get(
|
|
3120
|
+
"target",
|
|
3121
|
+
"networks");
|
|
3122
|
+
[ _target_networks,
|
|
3123
|
+
/* eslint-disable-next-line
|
|
3124
|
+
prefer-const */
|
|
3125
|
+
_target_network ] =
|
|
3126
|
+
_target_networks_auto_detect(
|
|
3127
|
+
_target_networks);
|
|
3128
|
+
_set(
|
|
3129
|
+
"target",
|
|
3130
|
+
"networks",
|
|
3131
|
+
_target_networks);
|
|
3132
|
+
_override_set(
|
|
3133
|
+
"target",
|
|
3134
|
+
"network",
|
|
3135
|
+
_target_network);
|
|
3136
|
+
}
|
|
3137
|
+
|
|
3103
3138
|
async function
|
|
3104
3139
|
_target_networks_check(
|
|
3105
3140
|
_target_networks,
|
|
@@ -4596,6 +4631,7 @@ export {
|
|
|
4596
4631
|
_configuration_format_check,
|
|
4597
4632
|
_configuration_format_get,
|
|
4598
4633
|
_contract_abi_auto_detect,
|
|
4634
|
+
_contract_abi_check,
|
|
4599
4635
|
_contract_address_auto_detect,
|
|
4600
4636
|
_contract_address_check,
|
|
4601
4637
|
_contract_bytecode_auto_detect,
|
|
@@ -4603,14 +4639,18 @@ export {
|
|
|
4603
4639
|
_contract_compiler_output_auto_detect,
|
|
4604
4640
|
_contract_compiler_output_check,
|
|
4605
4641
|
_contract_version_auto_detect,
|
|
4642
|
+
_contract_version_check,
|
|
4606
4643
|
_default_artifact_path_get,
|
|
4607
4644
|
_deployments_dir_auto_detect,
|
|
4608
4645
|
_deployments_dir_check,
|
|
4609
4646
|
_network_check,
|
|
4610
4647
|
_networks_all_auto_detect,
|
|
4611
4648
|
_target_app_auto_detect,
|
|
4649
|
+
_target_app_check,
|
|
4612
4650
|
_target_contract_auto_detect,
|
|
4613
4651
|
_target_contract_check,
|
|
4652
|
+
_target_networks_auto_detect,
|
|
4653
|
+
_target_networks_check,
|
|
4614
4654
|
_user_deployments_check,
|
|
4615
4655
|
_user_defined_check,
|
|
4616
4656
|
_user_level_check,
|
|
@@ -4646,6 +4686,8 @@ export {
|
|
|
4646
4686
|
// _contract_compiler_output_check,
|
|
4647
4687
|
// _contract_version_auto_detect:
|
|
4648
4688
|
// _contract_version_auto_detect,
|
|
4689
|
+
// _contract_version_check:
|
|
4690
|
+
// _contract_version_check,
|
|
4649
4691
|
// _default_artifact_path_get:
|
|
4650
4692
|
// _default_artifact_path_get,
|
|
4651
4693
|
// _deployments_dir_check:
|
|
@@ -4658,10 +4700,16 @@ export {
|
|
|
4658
4700
|
// _networks_all_auto_detect,
|
|
4659
4701
|
// _target_app_auto_detect:
|
|
4660
4702
|
// _target_app_auto_detect,
|
|
4703
|
+
// _target_app_check:
|
|
4704
|
+
// _target_app_check,
|
|
4661
4705
|
// _target_contract_auto_detect:
|
|
4662
4706
|
// _target_contract_auto_detect,
|
|
4663
4707
|
// _target_contract_check:
|
|
4664
4708
|
// _target_contract_check,
|
|
4709
|
+
// _target_networks_auto_detect:
|
|
4710
|
+
// _target_networks_auto_detect,
|
|
4711
|
+
// _target_networks_check:
|
|
4712
|
+
// _target_networks_check,
|
|
4665
4713
|
// _user_deployments_check:
|
|
4666
4714
|
// _user_deployments_check,
|
|
4667
4715
|
// _user_defined_check:
|
|
@@ -634,6 +634,7 @@ async function
|
|
|
634
634
|
}
|
|
635
635
|
|
|
636
636
|
export {
|
|
637
|
+
_contract_abi_get,
|
|
637
638
|
_contract_version_auto_detect,
|
|
638
639
|
_deployments_dir_auto_detect,
|
|
639
640
|
_evm_contract_deployment_abi,
|
|
@@ -642,6 +643,8 @@ export {
|
|
|
642
643
|
};
|
|
643
644
|
|
|
644
645
|
// module.exports = {
|
|
646
|
+
// _contract_abi_get:
|
|
647
|
+
// _contract_abi_get,
|
|
645
648
|
// _contract_version_auto_detect:
|
|
646
649
|
// _contract_version_auto_detect,
|
|
647
650
|
// _deployments_dir_auto_detect:
|
|
@@ -686,6 +686,7 @@ async function
|
|
|
686
686
|
}
|
|
687
687
|
|
|
688
688
|
export {
|
|
689
|
+
_contract_compiler_output_get,
|
|
689
690
|
_contract_version_auto_detect,
|
|
690
691
|
_deployments_dir_auto_detect,
|
|
691
692
|
_evm_contract_deployment_compiler_output,
|
|
@@ -694,6 +695,8 @@ export {
|
|
|
694
695
|
};
|
|
695
696
|
|
|
696
697
|
// module.exports = {
|
|
698
|
+
// _contract_compiler_output_get:
|
|
699
|
+
// _contract_compiler_output_get,
|
|
697
700
|
// _contract_version_auto_detect:
|
|
698
701
|
// _contract_version_auto_detect,
|
|
699
702
|
// _deployments_dir_auto_detect:
|
|
@@ -123,67 +123,6 @@ const
|
|
|
123
123
|
_evm_chains_info =
|
|
124
124
|
_evm_chains_info_module._evm_chains_info;
|
|
125
125
|
|
|
126
|
-
function
|
|
127
|
-
_contract_address_get(
|
|
128
|
-
_deployments,
|
|
129
|
-
_contract,
|
|
130
|
-
_network,
|
|
131
|
-
_network_id,
|
|
132
|
-
_version) {
|
|
133
|
-
let
|
|
134
|
-
_config_path,
|
|
135
|
-
_address,
|
|
136
|
-
_found,
|
|
137
|
-
_msg,
|
|
138
|
-
_net;
|
|
139
|
-
const
|
|
140
|
-
_networks = [
|
|
141
|
-
_network,
|
|
142
|
-
_network_id
|
|
143
|
-
];
|
|
144
|
-
_found =
|
|
145
|
-
false;
|
|
146
|
-
for ( _net of _networks ) {
|
|
147
|
-
_config_path =
|
|
148
|
-
`${_deployments}/${_contract}/${_net}/config.sh`;
|
|
149
|
-
if ( _file_exists(
|
|
150
|
-
_config_path) ) {
|
|
151
|
-
_found =
|
|
152
|
-
true;
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
if ( ! _found ) {
|
|
157
|
-
_msg =
|
|
158
|
-
`No network '${_network}' deployment ` +
|
|
159
|
-
`configuration for '${_contract}' ` +
|
|
160
|
-
`found at path '${_deployments}'.`;
|
|
161
|
-
_msg_error(
|
|
162
|
-
_msg,
|
|
163
|
-
1);
|
|
164
|
-
}
|
|
165
|
-
const
|
|
166
|
-
_config =
|
|
167
|
-
_json_read(
|
|
168
|
-
_config);
|
|
169
|
-
const
|
|
170
|
-
_contract_address =
|
|
171
|
-
_config[
|
|
172
|
-
"contract-address"][
|
|
173
|
-
_version];
|
|
174
|
-
if ( _contract_address == "" ||
|
|
175
|
-
_contract_address == null ) {
|
|
176
|
-
_msg =
|
|
177
|
-
`No '${_contract}' version '${_version}' ` +
|
|
178
|
-
`contract deployment specified for network ` +
|
|
179
|
-
`'${_network}' for directory at path `+
|
|
180
|
-
`'${_deployments}'.`;
|
|
181
|
-
_msg_error(
|
|
182
|
-
_msg,
|
|
183
|
-
1);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
126
|
async function
|
|
188
127
|
_networks_find(
|
|
189
128
|
_deployment_dir) {
|
|
@@ -251,7 +190,8 @@ async function
|
|
|
251
190
|
|
|
252
191
|
export {
|
|
253
192
|
_evm_contract_deployment_networks,
|
|
254
|
-
_network_check
|
|
193
|
+
_network_check,
|
|
194
|
+
_networks_find
|
|
255
195
|
};
|
|
256
196
|
|
|
257
197
|
// module.exports = {
|
|
@@ -259,4 +199,6 @@ export {
|
|
|
259
199
|
// _evm_contract_deployment_networks,
|
|
260
200
|
// _network_check:
|
|
261
201
|
// _network_check
|
|
202
|
+
// _networks_find:
|
|
203
|
+
// _networks_find
|
|
262
204
|
// };
|