@clonegod/ttd-core 3.1.35 → 3.1.36
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/constants/block_time.js +14 -15
- package/dist/index.js +11 -1
- package/package.json +1 -1
|
@@ -2,22 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_BLOCK_TIME_MS = exports.BLOCK_TIME_MS = void 0;
|
|
4
4
|
exports.getBlockTimeMs = getBlockTimeMs;
|
|
5
|
-
const index_1 = require("../index");
|
|
6
5
|
exports.BLOCK_TIME_MS = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
BSC: 450,
|
|
7
|
+
ETH: 12000,
|
|
8
|
+
BASE: 2000,
|
|
9
|
+
ARBITRUM: 250,
|
|
10
|
+
AVAX: 2000,
|
|
11
|
+
XLAYER: 3000,
|
|
12
|
+
POLYGON: 2000,
|
|
13
|
+
OPTIMISM: 2000,
|
|
14
|
+
LINEA: 2000,
|
|
15
|
+
SONIC: 1000,
|
|
16
|
+
TRON: 3000,
|
|
17
|
+
SOLANA: 400,
|
|
18
|
+
SUI: 400,
|
|
19
|
+
APTOS: 250,
|
|
21
20
|
};
|
|
22
21
|
exports.DEFAULT_BLOCK_TIME_MS = 2000;
|
|
23
22
|
function getBlockTimeMs(chain_id) {
|
package/dist/index.js
CHANGED
|
@@ -407,6 +407,16 @@ function log_warn(msg, data = {}, traceId = '') {
|
|
|
407
407
|
ts: Date.now(),
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
|
+
function _omitUndefined(o) {
|
|
411
|
+
if (!o || typeof o !== 'object' || Array.isArray(o))
|
|
412
|
+
return o;
|
|
413
|
+
const out = {};
|
|
414
|
+
for (const k of Object.keys(o)) {
|
|
415
|
+
if (o[k] !== undefined)
|
|
416
|
+
out[k] = o[k];
|
|
417
|
+
}
|
|
418
|
+
return out;
|
|
419
|
+
}
|
|
410
420
|
function log_info(msg, data = {}, traceId = '', caller = undefined, level = LOG_LEVEL.INFO) {
|
|
411
421
|
var _a;
|
|
412
422
|
if (level < _log_level) {
|
|
@@ -422,7 +432,7 @@ function log_info(msg, data = {}, traceId = '', caller = undefined, level = LOG_
|
|
|
422
432
|
console.log(`${getCurDateTime()} - [${level}] - [${caller.module}] - ${msg}`);
|
|
423
433
|
}
|
|
424
434
|
if (!isEmpty(data)) {
|
|
425
|
-
console.dir(data, { depth: Number((_a = process.env.LOG_DEPTH) !== null && _a !== void 0 ? _a : 4) });
|
|
435
|
+
console.dir(_omitUndefined(data), { depth: Number((_a = process.env.LOG_DEPTH) !== null && _a !== void 0 ? _a : 4) });
|
|
426
436
|
}
|
|
427
437
|
}
|
|
428
438
|
function log_error(msg, err, traceId = '', caller = undefined) {
|