evm-chains-info 0.0.14 → 0.0.16
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/evm-chains-info +39 -12
- package/evm-chains-info.js +1 -1
- package/libevm-chains-info +127 -87
- package/libevm-chains-info.js +1 -1
- package/package.json +2 -2
package/evm-chains-info
CHANGED
|
@@ -99,6 +99,11 @@ const
|
|
|
99
99
|
const
|
|
100
100
|
_db_paths_auto_detect =
|
|
101
101
|
_libevm_chains_info._db_paths_auto_detect;
|
|
102
|
+
/* global
|
|
103
|
+
_db_types_auto_detect */
|
|
104
|
+
const
|
|
105
|
+
_db_types_auto_detect =
|
|
106
|
+
_libevm_chains_info._db_types_auto_detect;
|
|
102
107
|
/* global
|
|
103
108
|
_input_type_auto_detect */
|
|
104
109
|
const
|
|
@@ -147,6 +152,11 @@ function
|
|
|
147
152
|
writable */
|
|
148
153
|
retrieval_mode =
|
|
149
154
|
"";
|
|
155
|
+
/* global
|
|
156
|
+
db_types:
|
|
157
|
+
writable */
|
|
158
|
+
db_types =
|
|
159
|
+
[];
|
|
150
160
|
/* global
|
|
151
161
|
user_level:
|
|
152
162
|
writable */
|
|
@@ -229,6 +239,7 @@ function
|
|
|
229
239
|
}
|
|
230
240
|
_db_paths_auto_detect(
|
|
231
241
|
target_chain);
|
|
242
|
+
_db_types_auto_detect();
|
|
232
243
|
}
|
|
233
244
|
|
|
234
245
|
function
|
|
@@ -244,6 +255,7 @@ function
|
|
|
244
255
|
` Input type: ${input_type}`,
|
|
245
256
|
` Output type: ${output_type}`,
|
|
246
257
|
` Retrieval mode: ${retrieval_mode}`,
|
|
258
|
+
` Database types: ${db_types}`,
|
|
247
259
|
` User-level database: ${user_level}`,
|
|
248
260
|
` API key: ${api_key}`,
|
|
249
261
|
` RPC selection method: ${selection_method}`,
|
|
@@ -287,6 +299,9 @@ function
|
|
|
287
299
|
" -m --retrieval-mode It can be 'offline'.",
|
|
288
300
|
` <retrieval-mode> Default: '${retrieval_mode}'`,
|
|
289
301
|
"",
|
|
302
|
+
" -t --db-type It can be 'node', 'system'.",
|
|
303
|
+
` <db-type> Default: '${retrieval_mode}'`,
|
|
304
|
+
"",
|
|
290
305
|
" -u --user-level It can be 'y' or 'n'.",
|
|
291
306
|
` <user-level> Default: '${user_level}'`,
|
|
292
307
|
"",
|
|
@@ -325,6 +340,8 @@ function
|
|
|
325
340
|
const
|
|
326
341
|
_argv_args = {
|
|
327
342
|
"booleans": [
|
|
343
|
+
"h",
|
|
344
|
+
"help",
|
|
328
345
|
"v",
|
|
329
346
|
"verbose"
|
|
330
347
|
]
|
|
@@ -343,18 +360,18 @@ function
|
|
|
343
360
|
false;
|
|
344
361
|
runtime_environment =
|
|
345
362
|
"node";
|
|
346
|
-
if ( "h"
|
|
363
|
+
if ( _argv["h"] == true ) {
|
|
347
364
|
_help_display =
|
|
348
365
|
true;
|
|
349
366
|
}
|
|
350
|
-
if ( "help"
|
|
367
|
+
if ( _argv["help"] == true ) {
|
|
351
368
|
_help_display =
|
|
352
369
|
true;
|
|
353
370
|
}
|
|
354
|
-
if ( _options.indexOf(
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
371
|
+
if ( ( _options.indexOf(
|
|
372
|
+
"--help") > -1 ||
|
|
373
|
+
_options.indexOf(
|
|
374
|
+
"-h") > -1) ) {
|
|
358
375
|
_help_display =
|
|
359
376
|
true;
|
|
360
377
|
}
|
|
@@ -444,7 +461,17 @@ function
|
|
|
444
461
|
if ( "db-path" in _argv ) {
|
|
445
462
|
db_paths.push(
|
|
446
463
|
_argv[
|
|
447
|
-
"
|
|
464
|
+
"db-paths"]);
|
|
465
|
+
}
|
|
466
|
+
if ( "t" in _argv ) {
|
|
467
|
+
db_types.push(
|
|
468
|
+
_argv[
|
|
469
|
+
"t"]);
|
|
470
|
+
}
|
|
471
|
+
if ( "db-types" in _argv ) {
|
|
472
|
+
db_types.push(
|
|
473
|
+
_argv[
|
|
474
|
+
"db-types"]);
|
|
448
475
|
}
|
|
449
476
|
if ( "s" in _argv ) {
|
|
450
477
|
selection_method =
|
|
@@ -472,11 +499,10 @@ function
|
|
|
472
499
|
networks_all =
|
|
473
500
|
"y";
|
|
474
501
|
}
|
|
475
|
-
if (
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
if ( "verbose" in _argv ) {
|
|
502
|
+
if ( _argv[
|
|
503
|
+
"v"] ||
|
|
504
|
+
_argv[
|
|
505
|
+
"verbose"]) {
|
|
480
506
|
verbose =
|
|
481
507
|
true;
|
|
482
508
|
}
|
|
@@ -576,6 +602,7 @@ app_opts = [
|
|
|
576
602
|
input_type,
|
|
577
603
|
output_type,
|
|
578
604
|
retrieval_mode,
|
|
605
|
+
db_types,
|
|
579
606
|
selection_method,
|
|
580
607
|
api_key,
|
|
581
608
|
networks_all,
|