@ercworldio/blockchain-shared 1.0.1-dev.11 → 1.0.1-dev.12
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.
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"type": "native",
|
|
63
63
|
"decimals": 18,
|
|
64
64
|
"address": "0x0000000000000000000000000000000000000000",
|
|
65
|
+
"isStableCoin": false,
|
|
65
66
|
"sweepThreshold": 0.004,
|
|
66
67
|
"sweepWalletMinBalance": 0.0002
|
|
67
68
|
},
|
|
@@ -72,8 +73,9 @@
|
|
|
72
73
|
"type": "erc20",
|
|
73
74
|
"decimals": 6,
|
|
74
75
|
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
75
|
-
"
|
|
76
|
-
"
|
|
76
|
+
"isStableCoin": true,
|
|
77
|
+
"sweepThreshold": 1,
|
|
78
|
+
"sweepWalletMinBalance": 0
|
|
77
79
|
},
|
|
78
80
|
{
|
|
79
81
|
"name": "Circle Token",
|
|
@@ -83,8 +85,8 @@
|
|
|
83
85
|
"isStableCoin": true,
|
|
84
86
|
"decimals": 6,
|
|
85
87
|
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
86
|
-
"sweepThreshold":
|
|
87
|
-
"sweepWalletMinBalance": 1
|
|
88
|
+
"sweepThreshold": 1,
|
|
89
|
+
"sweepWalletMinBalance": 0.1
|
|
88
90
|
}
|
|
89
91
|
]
|
|
90
92
|
},
|
|
@@ -149,6 +151,7 @@
|
|
|
149
151
|
"symbol": "BNB",
|
|
150
152
|
"token_standard": "BEP-20",
|
|
151
153
|
"type": "native",
|
|
154
|
+
"isStableCoin": false,
|
|
152
155
|
"decimals": 18,
|
|
153
156
|
"address": "0x0000000000000000000000000000000000000000",
|
|
154
157
|
"sweepThreshold": 0.008,
|
|
@@ -160,9 +163,10 @@
|
|
|
160
163
|
"token_standard": "BEP-20",
|
|
161
164
|
"type": "erc20",
|
|
162
165
|
"decimals": 18,
|
|
166
|
+
"isStableCoin": true,
|
|
163
167
|
"address": "0x55d398326f99059fF775485246999027B3197955",
|
|
164
|
-
"sweepThreshold":
|
|
165
|
-
"sweepWalletMinBalance": 1
|
|
168
|
+
"sweepThreshold": 1,
|
|
169
|
+
"sweepWalletMinBalance": 0.1
|
|
166
170
|
}
|
|
167
171
|
]
|
|
168
172
|
},
|
|
@@ -242,7 +246,7 @@
|
|
|
242
246
|
"decimals": 6,
|
|
243
247
|
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
244
248
|
"sweepThreshold": 1,
|
|
245
|
-
"sweepWalletMinBalance": 1
|
|
249
|
+
"sweepWalletMinBalance": 0.1
|
|
246
250
|
}
|
|
247
251
|
]
|
|
248
252
|
},
|
|
@@ -307,6 +311,7 @@
|
|
|
307
311
|
"symbol": "POL",
|
|
308
312
|
"token_standard": "POL",
|
|
309
313
|
"type": "native",
|
|
314
|
+
"isStableCoin": false,
|
|
310
315
|
"decimals": 18,
|
|
311
316
|
"address": "0x0000000000000000000000000000000000000000",
|
|
312
317
|
"sweepThreshold": 10,
|
|
@@ -317,10 +322,11 @@
|
|
|
317
322
|
"symbol": "USDT",
|
|
318
323
|
"token_standard": "POL",
|
|
319
324
|
"type": "erc20",
|
|
325
|
+
"isStableCoin": true,
|
|
320
326
|
"decimals": 6,
|
|
321
327
|
"address": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
|
|
322
|
-
"sweepThreshold":
|
|
323
|
-
"sweepWalletMinBalance": 1
|
|
328
|
+
"sweepThreshold": 1,
|
|
329
|
+
"sweepWalletMinBalance": 0.1
|
|
324
330
|
}
|
|
325
331
|
]
|
|
326
332
|
},
|
|
@@ -386,6 +392,7 @@
|
|
|
386
392
|
"token_standard": "ERC-20",
|
|
387
393
|
"type": "native",
|
|
388
394
|
"decimals": 18,
|
|
395
|
+
"isStableCoin": false,
|
|
389
396
|
"address": "0x0000000000000000000000000000000000000000",
|
|
390
397
|
"sweepThreshold": 10,
|
|
391
398
|
"sweepWalletMinBalance": 0.1
|
|
@@ -453,6 +460,7 @@
|
|
|
453
460
|
"symbol": "AVAX",
|
|
454
461
|
"token_standard": "AVAXC",
|
|
455
462
|
"type": "native",
|
|
463
|
+
"isStableCoin": false,
|
|
456
464
|
"decimals": 18,
|
|
457
465
|
"address": "0x0000000000000000000000000000000000000000",
|
|
458
466
|
"sweepThreshold": 0.05,
|
|
@@ -463,10 +471,11 @@
|
|
|
463
471
|
"symbol": "USDT",
|
|
464
472
|
"token_standard": "AVAXC",
|
|
465
473
|
"type": "erc20",
|
|
474
|
+
"isStableCoin": true,
|
|
466
475
|
"decimals": 6,
|
|
467
476
|
"address": "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
|
|
468
|
-
"sweepThreshold":
|
|
469
|
-
"sweepWalletMinBalance": 1
|
|
477
|
+
"sweepThreshold": 1,
|
|
478
|
+
"sweepWalletMinBalance": 0.1
|
|
470
479
|
}
|
|
471
480
|
]
|
|
472
481
|
},
|
|
@@ -522,6 +531,7 @@
|
|
|
522
531
|
"symbol": "TRX",
|
|
523
532
|
"token_standard": "TRX",
|
|
524
533
|
"type": "native",
|
|
534
|
+
"isStableCoin": false,
|
|
525
535
|
"decimals": 6,
|
|
526
536
|
"address": "0000000000000000000000000000000000000000",
|
|
527
537
|
"sweepThreshold": 10,
|
|
@@ -532,10 +542,11 @@
|
|
|
532
542
|
"symbol": "USDT",
|
|
533
543
|
"token_standard": "TRC-20",
|
|
534
544
|
"type": "trc20",
|
|
545
|
+
"isStableCoin": true,
|
|
535
546
|
"decimals": 6,
|
|
536
547
|
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
|
|
537
|
-
"sweepThreshold":
|
|
538
|
-
"sweepWalletMinBalance": 1
|
|
548
|
+
"sweepThreshold": 1,
|
|
549
|
+
"sweepWalletMinBalance": 0.1
|
|
539
550
|
}
|
|
540
551
|
]
|
|
541
552
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/utils/Logger.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAItD,MAAM,WAAW,UAAU;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AASD,cAAM,MAAM;IACR,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAuB;IAC9C,OAAO,CAAC,MAAM,CAAC,OAAO,CAA8B;IACpD,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO;IAkCP;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,MAAM,GAAE,MAAc,EAAE,WAAW,GAAE,MAAsB,GAAG,MAAM;IAOvF;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAI/C;;;OAGG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,MAAM;IAcxE;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI;IAI/C;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI;IAI9C;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/utils/Logger.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAItD,MAAM,WAAW,UAAU;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AASD,cAAM,MAAM;IACR,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAuB;IAC9C,OAAO,CA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
|
87
|
+
const logData = this.normalizeData(data);
|
|
88
|
+
this.pino.warn(Object.assign({ source: this.source }, logData), message);
|
|
89
|
+
this.indexToElastic('Warning', message, logData);
|
|
89
90
|
}
|
|
90
91
|
/**
|
|
91
92
|
* Error level - sent to ElasticSearch
|
|
@@ -129,6 +130,16 @@ class Logger {
|
|
|
129
130
|
stack: value.stack,
|
|
130
131
|
};
|
|
131
132
|
}
|
|
133
|
+
else if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
|
|
134
|
+
// Recurse one level to catch nested Error objects (e.g. { data: { err: Error } })
|
|
135
|
+
const nested = {};
|
|
136
|
+
for (const [nk, nv] of Object.entries(value)) {
|
|
137
|
+
nested[nk] = nv instanceof Error
|
|
138
|
+
? { name: nv.name, message: nv.message, stack: nv.stack }
|
|
139
|
+
: nv;
|
|
140
|
+
}
|
|
141
|
+
normalized[key] = nested;
|
|
142
|
+
}
|
|
132
143
|
else {
|
|
133
144
|
normalized[key] = value;
|
|
134
145
|
}
|