envio 3.0.0-alpha-main-clickhouse-sink → 3.0.0-alpha.0
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/bin.js +5 -3
- package/evm.schema.json +23 -6
- package/fuel.schema.json +17 -5
- package/index.d.ts +0 -27
- package/index.js +9 -6
- package/package.json +11 -7
- package/rescript.json +4 -3
- package/src/{Address.res.js → Address.res.mjs} +7 -6
- package/src/{Batch.res.js → Batch.res.mjs} +19 -18
- package/src/{ChainMap.res.js → ChainMap.res.mjs} +20 -19
- package/src/{Config.res.js → Config.res.mjs} +11 -10
- package/src/Envio.gen.ts +2 -15
- package/src/Envio.res +0 -36
- package/src/{Envio.res.js → Envio.res.mjs} +5 -16
- package/src/{ErrorHandling.res.js → ErrorHandling.res.mjs} +10 -9
- package/src/EventRegister.res +7 -0
- package/src/{EventRegister.res.js → EventRegister.res.mjs} +29 -18
- package/src/EventRegister.resi +1 -0
- package/src/{EventUtils.res.js → EventUtils.res.mjs} +10 -9
- package/src/{EvmTypes.res.js → EvmTypes.res.mjs} +5 -4
- package/src/{FetchState.res.js → FetchState.res.mjs} +44 -43
- package/src/{Hasura.res.js → Hasura.res.mjs} +25 -24
- package/src/{InMemoryStore.res.js → InMemoryStore.res.mjs} +19 -18
- package/src/{InMemoryTable.res.js → InMemoryTable.res.mjs} +21 -20
- package/src/Internal.gen.ts +1 -3
- package/src/Internal.res +9 -2
- package/src/{Internal.res.js → Internal.res.mjs} +21 -11
- package/src/{LazyLoader.res.js → LazyLoader.res.mjs} +14 -13
- package/src/{LoadManager.res.js → LoadManager.res.mjs} +11 -10
- package/src/{LogSelection.res.js → LogSelection.res.mjs} +14 -13
- package/src/{Logging.res.js → Logging.res.mjs} +37 -36
- package/src/{Persistence.res.js → Persistence.res.mjs} +22 -21
- package/src/{PgStorage.res.js → PgStorage.res.mjs} +58 -57
- package/src/Platform.res +4 -5
- package/src/{Platform.res.js → Platform.res.mjs} +10 -10
- package/src/{Prometheus.res.js → Prometheus.res.mjs} +66 -65
- package/src/{ReorgDetection.res.js → ReorgDetection.res.mjs} +12 -11
- package/src/{SafeCheckpointTracking.res.js → SafeCheckpointTracking.res.mjs} +6 -5
- package/src/{Sink.res.js → Sink.res.mjs} +6 -5
- package/src/{TableIndices.res.js → TableIndices.res.mjs} +8 -7
- package/src/{Throttler.res.js → Throttler.res.mjs} +7 -6
- package/src/{Time.res.js → Time.res.mjs} +8 -7
- package/src/{TopicFilter.res.js → TopicFilter.res.mjs} +18 -17
- package/src/Utils.res +40 -0
- package/src/{Utils.res.js → Utils.res.mjs} +68 -34
- package/src/bindings/BigDecimal.gen.ts +2 -2
- package/src/bindings/BigDecimal.res +5 -5
- package/src/bindings/BigDecimal.res.d.mts +5 -0
- package/src/bindings/{BigDecimal.res.js → BigDecimal.res.mjs} +10 -9
- package/src/bindings/BigInt.gen.ts +2 -2
- package/src/bindings/BigInt.res.d.mts +5 -0
- package/src/bindings/{BigInt.res.js → BigInt.res.mjs} +25 -24
- package/src/bindings/ClickHouse.res +2 -2
- package/src/bindings/{ClickHouse.res.js → ClickHouse.res.mjs} +22 -21
- package/src/bindings/Ethers.gen.ts +2 -2
- package/src/bindings/Ethers.res.d.mts +5 -0
- package/src/bindings/{Ethers.res.js → Ethers.res.mjs} +18 -17
- package/src/bindings/{Hrtime.res.js → Hrtime.res.mjs} +13 -12
- package/src/bindings/{Lodash.res.js → Lodash.res.mjs} +4 -3
- package/src/bindings/NodeJs.res +13 -1
- package/src/bindings/NodeJs.res.mjs +48 -0
- package/src/bindings/Pino.res +4 -4
- package/src/bindings/{Pino.res.js → Pino.res.mjs} +16 -15
- package/src/bindings/Postgres.res +2 -2
- package/src/bindings/{Postgres.res.js → Postgres.res.mjs} +4 -3
- package/src/bindings/{PromClient.res.js → PromClient.res.mjs} +6 -5
- package/src/bindings/{Promise.res.js → Promise.res.mjs} +6 -5
- package/src/bindings/{SDSL.res.js → SDSL.res.mjs} +3 -2
- package/src/bindings/{Viem.res.js → Viem.res.mjs} +9 -8
- package/src/bindings/vendored-lodash-fns.js +3 -35
- package/src/db/{EntityHistory.res.js → EntityHistory.res.mjs} +21 -20
- package/src/db/InternalTable.gen.ts +2 -2
- package/src/db/InternalTable.res +0 -2
- package/src/db/{InternalTable.res.js → InternalTable.res.mjs} +19 -19
- package/src/db/{Schema.res.js → Schema.res.mjs} +10 -9
- package/src/db/{Table.res.js → Table.res.mjs} +34 -33
- package/src/sources/{EventRouter.res.js → EventRouter.res.mjs} +17 -16
- package/src/sources/{Fuel.res.js → Fuel.res.mjs} +6 -5
- package/src/sources/{HyperFuel.res.js → HyperFuel.res.mjs} +14 -13
- package/src/sources/{HyperFuelClient.res.js → HyperFuelClient.res.mjs} +7 -6
- package/src/sources/{HyperFuelSource.res.js → HyperFuelSource.res.mjs} +28 -27
- package/src/sources/{HyperSync.res.js → HyperSync.res.mjs} +21 -20
- package/src/sources/HyperSyncClient.gen.ts +1 -1
- package/src/sources/HyperSyncClient.res +78 -20
- package/src/sources/{HyperSyncClient.res.js → HyperSyncClient.res.mjs} +32 -15
- package/src/sources/{HyperSyncJsonApi.res.js → HyperSyncJsonApi.res.mjs} +10 -9
- package/src/sources/HyperSyncSource.res +77 -9
- package/src/sources/{HyperSyncSource.res.js → HyperSyncSource.res.mjs} +99 -38
- package/src/sources/{Rpc.res.js → Rpc.res.mjs} +16 -15
- package/src/sources/{RpcSource.res.js → RpcSource.res.mjs} +40 -39
- package/src/sources/Source.res +1 -1
- package/src/sources/{Source.res.js → Source.res.mjs} +4 -3
- package/src/sources/SourceManager.res +12 -1
- package/src/sources/{SourceManager.res.js → SourceManager.res.mjs} +32 -21
- package/src/sources/vendored-fuel-abi-coder.js +94 -149
- package/src/vendored/{Rest.res.js → Rest.res.mjs} +12 -11
- package/src/bindings/NodeJs.res.js +0 -35
- /package/src/{Change.res.js → Change.res.mjs} +0 -0
- /package/src/{Indexer.res.js → Indexer.res.mjs} +0 -0
- /package/src/bindings/{Express.res.js → Express.res.mjs} +0 -0
package/src/EventRegister.resi
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
'use strict';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import * as $$BigInt from "./bindings/BigInt.res.mjs";
|
|
4
|
+
import * as Js_exn from "rescript/lib/es6/js_exn.js";
|
|
5
|
+
import * as Caml_obj from "rescript/lib/es6/caml_obj.js";
|
|
7
6
|
|
|
8
7
|
function getOrderedBatchItemComparator(item) {
|
|
9
8
|
if (item.kind === 0) {
|
|
@@ -34,9 +33,11 @@ function getEventIdKeyString(chainId, eventId) {
|
|
|
34
33
|
return chainIdStr + "_" + eventId;
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
export {
|
|
37
|
+
getOrderedBatchItemComparator ,
|
|
38
|
+
isEarlier ,
|
|
39
|
+
isEarlierUnordered ,
|
|
40
|
+
packEventIndex ,
|
|
41
|
+
getEventIdKeyString ,
|
|
42
|
+
}
|
|
42
43
|
/* BigInt Not a pure module */
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
'use strict';
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
import * as S$RescriptSchema from "rescript-schema/src/S.res.mjs";
|
|
5
4
|
|
|
6
5
|
var schema = S$RescriptSchema.setName(S$RescriptSchema.string, "EVM.Hex");
|
|
7
6
|
|
|
@@ -11,6 +10,8 @@ var Hex = {
|
|
|
11
10
|
|
|
12
11
|
var Abi = {};
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
export {
|
|
14
|
+
Hex ,
|
|
15
|
+
Abi ,
|
|
16
|
+
}
|
|
16
17
|
/* schema Not a pure module */
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
'use strict';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
import * as Caml from "rescript/lib/es6/caml.js";
|
|
4
|
+
import * as Utils from "./Utils.res.mjs";
|
|
5
|
+
import * as Js_exn from "rescript/lib/es6/js_exn.js";
|
|
6
|
+
import * as Js_dict from "rescript/lib/es6/js_dict.js";
|
|
7
|
+
import * as Js_math from "rescript/lib/es6/js_math.js";
|
|
8
|
+
import * as Logging from "./Logging.res.mjs";
|
|
9
|
+
import * as Belt_Int from "rescript/lib/es6/belt_Int.js";
|
|
10
|
+
import * as Belt_Array from "rescript/lib/es6/belt_Array.js";
|
|
11
|
+
import * as Caml_int32 from "rescript/lib/es6/caml_int32.js";
|
|
12
|
+
import * as Prometheus from "./Prometheus.res.mjs";
|
|
13
|
+
import * as Belt_Option from "rescript/lib/es6/belt_Option.js";
|
|
14
|
+
import * as Belt_Result from "rescript/lib/es6/belt_Result.js";
|
|
15
|
+
import * as Caml_exceptions from "rescript/lib/es6/caml_exceptions.js";
|
|
17
16
|
|
|
18
17
|
function mergeIntoPartition(p, target, maxAddrInPartition) {
|
|
19
18
|
if (!p.selection.dependsOnAddresses) {
|
|
@@ -1048,33 +1047,35 @@ function getUnorderedMultichainProgressBlockNumberAt(fetchState, index) {
|
|
|
1048
1047
|
|
|
1049
1048
|
var blockItemLogIndex = 16777216;
|
|
1050
1049
|
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1050
|
+
export {
|
|
1051
|
+
mergeIntoPartition ,
|
|
1052
|
+
bufferBlockNumber ,
|
|
1053
|
+
bufferBlock ,
|
|
1054
|
+
compareBufferItem ,
|
|
1055
|
+
blockItemLogIndex ,
|
|
1056
|
+
updateInternal ,
|
|
1057
|
+
numAddresses ,
|
|
1058
|
+
warnDifferentContractType ,
|
|
1059
|
+
registerDynamicContracts ,
|
|
1060
|
+
UnexpectedPartitionNotFound ,
|
|
1061
|
+
UnexpectedMergeQueryResponse ,
|
|
1062
|
+
handleQueryResult ,
|
|
1063
|
+
makePartitionQuery ,
|
|
1064
|
+
startFetchingQueries ,
|
|
1065
|
+
addressesByContractNameCount ,
|
|
1066
|
+
addressesByContractNameGetAll ,
|
|
1067
|
+
isFullPartition ,
|
|
1068
|
+
getNextQuery ,
|
|
1069
|
+
getTimestampAt ,
|
|
1070
|
+
hasReadyItem ,
|
|
1071
|
+
getReadyItemsCount ,
|
|
1072
|
+
make ,
|
|
1073
|
+
bufferSize ,
|
|
1074
|
+
rollbackPartition ,
|
|
1075
|
+
rollback ,
|
|
1076
|
+
isActivelyIndexing ,
|
|
1077
|
+
isReadyToEnterReorgThreshold ,
|
|
1078
|
+
sortForUnorderedBatch ,
|
|
1079
|
+
getUnorderedMultichainProgressBlockNumberAt ,
|
|
1080
|
+
}
|
|
1080
1081
|
/* Utils Not a pure module */
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
'use strict';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import * as Rest from "./vendored/Rest.res.mjs";
|
|
4
|
+
import * as Table from "./db/Table.res.mjs";
|
|
5
|
+
import * as Utils from "./Utils.res.mjs";
|
|
6
|
+
import * as Schema from "./db/Schema.res.mjs";
|
|
7
|
+
import * as Logging from "./Logging.res.mjs";
|
|
8
|
+
import * as Belt_Array from "rescript/lib/es6/belt_Array.js";
|
|
9
|
+
import * as InternalTable from "./db/InternalTable.res.mjs";
|
|
10
|
+
import * as S$RescriptSchema from "rescript-schema/src/S.res.mjs";
|
|
11
|
+
import * as Caml_js_exceptions from "rescript/lib/es6/caml_js_exceptions.js";
|
|
13
12
|
|
|
14
13
|
function auth(s) {
|
|
15
14
|
return {
|
|
@@ -296,18 +295,20 @@ async function trackDatabase(endpoint, auth, pgSchema, userEntities, aggregateEn
|
|
|
296
295
|
return await executeBulkKeepGoing(endpoint, auth, allOperations);
|
|
297
296
|
}
|
|
298
297
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
298
|
+
export {
|
|
299
|
+
auth ,
|
|
300
|
+
responses ,
|
|
301
|
+
clearMetadataRoute ,
|
|
302
|
+
trackTablesRoute ,
|
|
303
|
+
createSelectPermissionRoute ,
|
|
304
|
+
rawBodyRoute ,
|
|
305
|
+
bulkKeepGoingRoute ,
|
|
306
|
+
bulkKeepGoingErrorsSchema ,
|
|
307
|
+
clearHasuraMetadata ,
|
|
308
|
+
trackTables ,
|
|
309
|
+
createSelectPermissionOperation ,
|
|
310
|
+
createEntityRelationshipOperation ,
|
|
311
|
+
executeBulkKeepGoing ,
|
|
312
|
+
trackDatabase ,
|
|
313
|
+
}
|
|
313
314
|
/* bulkKeepGoingErrorsSchema Not a pure module */
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
'use strict';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import * as $$Array from "rescript/lib/es6/array.js";
|
|
4
|
+
import * as Utils from "./Utils.res.mjs";
|
|
5
|
+
import * as Js_dict from "rescript/lib/es6/js_dict.js";
|
|
6
|
+
import * as Belt_Array from "rescript/lib/es6/belt_Array.js";
|
|
7
|
+
import * as EventUtils from "./EventUtils.res.mjs";
|
|
8
|
+
import * as ErrorHandling from "./ErrorHandling.res.mjs";
|
|
9
|
+
import * as InMemoryTable from "./InMemoryTable.res.mjs";
|
|
10
|
+
import * as InternalTable from "./db/InternalTable.res.mjs";
|
|
11
|
+
import * as Caml_exceptions from "rescript/lib/es6/caml_exceptions.js";
|
|
13
12
|
|
|
14
13
|
function hashRawEventsKey(key) {
|
|
15
14
|
return EventUtils.getEventIdKeyString(key.chainId, key.eventId);
|
|
@@ -150,12 +149,14 @@ function setBatchDcs(inMemoryStore, batch, shouldSaveHistory) {
|
|
|
150
149
|
}
|
|
151
150
|
}
|
|
152
151
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
152
|
+
export {
|
|
153
|
+
hashRawEventsKey ,
|
|
154
|
+
EntityTables ,
|
|
155
|
+
make$1 as make,
|
|
156
|
+
clone$1 as clone,
|
|
157
|
+
getEffectInMemTable ,
|
|
158
|
+
getInMemTable ,
|
|
159
|
+
isRollingBack ,
|
|
160
|
+
setBatchDcs ,
|
|
161
|
+
}
|
|
161
162
|
/* Utils Not a pure module */
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
'use strict';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import * as Utils from "./Utils.res.mjs";
|
|
4
|
+
import * as Js_exn from "rescript/lib/es6/js_exn.js";
|
|
5
|
+
import * as Lodash from "./bindings/Lodash.res.mjs";
|
|
6
|
+
import * as Js_dict from "rescript/lib/es6/js_dict.js";
|
|
7
|
+
import * as Belt_Array from "rescript/lib/es6/belt_Array.js";
|
|
8
|
+
import * as Belt_Option from "rescript/lib/es6/belt_Option.js";
|
|
9
|
+
import * as Caml_option from "rescript/lib/es6/caml_option.js";
|
|
10
|
+
import * as TableIndices from "./TableIndices.res.mjs";
|
|
11
|
+
import * as ErrorHandling from "./ErrorHandling.res.mjs";
|
|
12
|
+
import * as Caml_exceptions from "rescript/lib/es6/caml_exceptions.js";
|
|
14
13
|
|
|
15
14
|
function make(hash) {
|
|
16
15
|
return {
|
|
@@ -357,13 +356,15 @@ var Entity = {
|
|
|
357
356
|
clone: clone$1
|
|
358
357
|
};
|
|
359
358
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
359
|
+
export {
|
|
360
|
+
make ,
|
|
361
|
+
set ,
|
|
362
|
+
setByHash ,
|
|
363
|
+
hasByHash ,
|
|
364
|
+
getUnsafeByHash ,
|
|
365
|
+
get ,
|
|
366
|
+
values ,
|
|
367
|
+
clone ,
|
|
368
|
+
Entity ,
|
|
369
|
+
}
|
|
369
370
|
/* Utils Not a pure module */
|
package/src/Internal.gen.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type {GenericContractRegister as $$genericContractRegister} from './Types
|
|
|
7
7
|
|
|
8
8
|
import type {Invalid as $$noEventFilters} from './Types.ts';
|
|
9
9
|
|
|
10
|
-
import type {t as Address_t} from './Address.gen';
|
|
10
|
+
import type {t as Address_t} from './Address.gen.js';
|
|
11
11
|
|
|
12
12
|
export type genericEvent<params,block,transaction> = {
|
|
13
13
|
readonly params: params;
|
|
@@ -42,8 +42,6 @@ export type entityHandlerContext<entity> = {
|
|
|
42
42
|
readonly deleteUnsafe: (_1:string) => void
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
export type chainInfo = { readonly isReady: boolean };
|
|
46
|
-
|
|
47
45
|
export type genericHandlerWithLoader<loader,handler,eventFilters> = {
|
|
48
46
|
readonly loader: loader;
|
|
49
47
|
readonly handler: handler;
|
package/src/Internal.res
CHANGED
|
@@ -54,11 +54,11 @@ type entityHandlerContext<'entity> = {
|
|
|
54
54
|
deleteUnsafe: string => unit,
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
@genType
|
|
58
57
|
type chainInfo = {
|
|
58
|
+
id: int,
|
|
59
59
|
// true when the chain has completed initial sync and is processing live events
|
|
60
60
|
// false during historical synchronization
|
|
61
|
-
|
|
61
|
+
isLive: bool,
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
type chains = dict<chainInfo>
|
|
@@ -67,6 +67,7 @@ type loaderReturn
|
|
|
67
67
|
type handlerContext = private {
|
|
68
68
|
isPreload: bool,
|
|
69
69
|
chains: chains,
|
|
70
|
+
chain: chainInfo,
|
|
70
71
|
}
|
|
71
72
|
type handlerArgs = {
|
|
72
73
|
event: event,
|
|
@@ -209,6 +210,12 @@ external getItemBlockNumber: item => int = "blockNumber"
|
|
|
209
210
|
@get
|
|
210
211
|
external getItemLogIndex: item => int = "logIndex"
|
|
211
212
|
|
|
213
|
+
let getItemChainId = item =>
|
|
214
|
+
switch item {
|
|
215
|
+
| Event({chain}) => chain->ChainMap.Chain.toChainId
|
|
216
|
+
| Block({onBlockConfig: {chainId}}) => chainId
|
|
217
|
+
}
|
|
218
|
+
|
|
212
219
|
@get
|
|
213
220
|
external getItemDcs: item => option<dcs> = "dcs"
|
|
214
221
|
@set
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
'use strict';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import * as Table from "./db/Table.res.mjs";
|
|
4
|
+
import * as $$BigInt from "./bindings/BigInt.res.mjs";
|
|
5
|
+
import * as Address from "./Address.res.mjs";
|
|
6
|
+
import * as S$RescriptSchema from "rescript-schema/src/S.res.mjs";
|
|
7
|
+
|
|
8
|
+
function getItemChainId(item) {
|
|
9
|
+
if (item.kind === 0) {
|
|
10
|
+
return item.chain;
|
|
11
|
+
} else {
|
|
12
|
+
return item.onBlockConfig.chainId;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
|
|
9
16
|
var fuelSupplyParamsSchema = S$RescriptSchema.schema(function (s) {
|
|
10
17
|
return {
|
|
@@ -39,10 +46,13 @@ function makeCacheTable(effectName) {
|
|
|
39
46
|
]);
|
|
40
47
|
}
|
|
41
48
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
export {
|
|
50
|
+
getItemChainId ,
|
|
51
|
+
fuelSupplyParamsSchema ,
|
|
52
|
+
fuelTransferParamsSchema ,
|
|
53
|
+
cacheTablePrefix ,
|
|
54
|
+
cacheOutputSchema ,
|
|
55
|
+
effectCacheItemRowsSchema ,
|
|
56
|
+
makeCacheTable ,
|
|
57
|
+
}
|
|
48
58
|
/* fuelSupplyParamsSchema Not a pure module */
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
'use strict';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import * as Utils from "./Utils.res.mjs";
|
|
4
|
+
import * as JsSdsl from "js-sdsl";
|
|
5
|
+
import * as Belt_Option from "rescript/lib/es6/belt_Option.js";
|
|
6
|
+
import * as Caml_option from "rescript/lib/es6/caml_option.js";
|
|
7
|
+
import * as Caml_exceptions from "rescript/lib/es6/caml_exceptions.js";
|
|
8
|
+
import * as Caml_js_exceptions from "rescript/lib/es6/caml_js_exceptions.js";
|
|
10
9
|
|
|
11
10
|
var LoaderTimeout = /* @__PURE__ */Caml_exceptions.create("LazyLoader.LoaderTimeout");
|
|
12
11
|
|
|
@@ -108,10 +107,12 @@ function get(am, k) {
|
|
|
108
107
|
return promise;
|
|
109
108
|
}
|
|
110
109
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
export {
|
|
111
|
+
LoaderTimeout ,
|
|
112
|
+
make ,
|
|
113
|
+
deleteKey ,
|
|
114
|
+
timeoutAfter ,
|
|
115
|
+
loadNext ,
|
|
116
|
+
get ,
|
|
117
|
+
}
|
|
117
118
|
/* Utils Not a pure module */
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
'use strict';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import * as Utils from "./Utils.res.mjs";
|
|
4
|
+
import * as Belt_Array from "rescript/lib/es6/belt_Array.js";
|
|
5
|
+
import * as Caml_js_exceptions from "rescript/lib/es6/caml_js_exceptions.js";
|
|
7
6
|
|
|
8
7
|
var Call = {};
|
|
9
8
|
|
|
@@ -123,10 +122,12 @@ function call(loadManager, input, key, load, hasher, shouldGroup, hasInMemory, g
|
|
|
123
122
|
return promise;
|
|
124
123
|
}
|
|
125
124
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
125
|
+
export {
|
|
126
|
+
Call ,
|
|
127
|
+
Group ,
|
|
128
|
+
make ,
|
|
129
|
+
schedule ,
|
|
130
|
+
noopHasher ,
|
|
131
|
+
call ,
|
|
132
|
+
}
|
|
132
133
|
/* Utils Not a pure module */
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
'use strict';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import * as Utils from "./Utils.res.mjs";
|
|
4
|
+
import * as Js_exn from "rescript/lib/es6/js_exn.js";
|
|
5
|
+
import * as Belt_Array from "rescript/lib/es6/belt_Array.js";
|
|
6
|
+
import * as Belt_Option from "rescript/lib/es6/belt_Option.js";
|
|
7
|
+
import * as Caml_option from "rescript/lib/es6/caml_option.js";
|
|
8
|
+
import * as Caml_exceptions from "rescript/lib/es6/caml_exceptions.js";
|
|
10
9
|
|
|
11
10
|
var MissingRequiredTopic0 = /* @__PURE__ */Caml_exceptions.create("LogSelection.MissingRequiredTopic0");
|
|
12
11
|
|
|
@@ -194,10 +193,12 @@ function parseEventFiltersOrThrow(eventFilters, sighash, params, topic1Opt, topi
|
|
|
194
193
|
};
|
|
195
194
|
}
|
|
196
195
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
196
|
+
export {
|
|
197
|
+
MissingRequiredTopic0 ,
|
|
198
|
+
makeTopicSelection ,
|
|
199
|
+
hasFilters ,
|
|
200
|
+
compressTopicSelections ,
|
|
201
|
+
make ,
|
|
202
|
+
parseEventFiltersOrThrow ,
|
|
203
|
+
}
|
|
203
204
|
/* Utils Not a pure module */
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
'use strict';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import * as Pino from "./bindings/Pino.res.mjs";
|
|
4
|
+
import * as Pino$1 from "pino";
|
|
5
|
+
import * as Utils from "./Utils.res.mjs";
|
|
6
|
+
import * as Js_exn from "rescript/lib/es6/js_exn.js";
|
|
7
|
+
import * as Js_dict from "rescript/lib/es6/js_dict.js";
|
|
8
|
+
import * as Caml_obj from "rescript/lib/es6/caml_obj.js";
|
|
9
|
+
import * as Caml_option from "rescript/lib/es6/caml_option.js";
|
|
11
10
|
|
|
12
11
|
var logLevels = Js_dict.fromArray([
|
|
13
12
|
[
|
|
@@ -75,14 +74,14 @@ function makeLogger(logStrategy, logFilePath, defaultFileLogLevel, userLogLevel)
|
|
|
75
74
|
switch (logStrategy) {
|
|
76
75
|
case "ecs-file" :
|
|
77
76
|
var newrecord = Caml_obj.obj_dup(Pino.ECS.make());
|
|
78
|
-
return Pino$1((newrecord.customLevels = logLevels, newrecord), Pino$1.transport(pinoFile));
|
|
77
|
+
return Pino$1.pino((newrecord.customLevels = logLevels, newrecord), Pino$1.transport(pinoFile));
|
|
79
78
|
case "ecs-console" :
|
|
80
79
|
var newrecord$1 = Caml_obj.obj_dup(Pino.ECS.make());
|
|
81
|
-
return Pino$1((newrecord$1.customLevels = logLevels, newrecord$1.level = userLogLevel, newrecord$1));
|
|
80
|
+
return Pino$1.pino((newrecord$1.customLevels = logLevels, newrecord$1.level = userLogLevel, newrecord$1));
|
|
82
81
|
case "ecs-console-multistream" :
|
|
83
82
|
return makeMultiStreamLogger(undefined, Pino.ECS.make());
|
|
84
83
|
case "file-only" :
|
|
85
|
-
return Pino$1({
|
|
84
|
+
return Pino$1.pino({
|
|
86
85
|
level: defaultFileLogLevel,
|
|
87
86
|
customLevels: logLevels
|
|
88
87
|
}, Pino$1.transport(pinoFile));
|
|
@@ -262,29 +261,31 @@ function getUserLogger(item) {
|
|
|
262
261
|
};
|
|
263
262
|
}
|
|
264
263
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
264
|
+
export {
|
|
265
|
+
logLevels ,
|
|
266
|
+
makeLogger ,
|
|
267
|
+
setLogger ,
|
|
268
|
+
getLogger ,
|
|
269
|
+
setLogLevel ,
|
|
270
|
+
trace ,
|
|
271
|
+
debug ,
|
|
272
|
+
info ,
|
|
273
|
+
warn ,
|
|
274
|
+
error ,
|
|
275
|
+
errorWithExn ,
|
|
276
|
+
fatal ,
|
|
277
|
+
childTrace ,
|
|
278
|
+
childDebug ,
|
|
279
|
+
childInfo ,
|
|
280
|
+
childWarn ,
|
|
281
|
+
childError ,
|
|
282
|
+
childErrorWithExn ,
|
|
283
|
+
childFatal ,
|
|
284
|
+
createChild ,
|
|
285
|
+
createChildFrom ,
|
|
286
|
+
getItemLogger ,
|
|
287
|
+
logForItem ,
|
|
288
|
+
noopLogger ,
|
|
289
|
+
getUserLogger ,
|
|
290
|
+
}
|
|
290
291
|
/* logLevels Not a pure module */
|