envio 3.0.0-alpha.21 → 3.0.0-alpha.23
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 +3 -3
- package/bin.mjs +2 -48
- package/evm.schema.json +67 -0
- package/fuel.schema.json +67 -0
- package/index.d.ts +822 -38
- package/index.js +5 -3
- package/package.json +10 -8
- package/rescript.json +5 -9
- package/src/Address.res +4 -5
- package/src/Address.res.mjs +9 -12
- package/src/Api.res +15 -0
- package/src/Api.res.mjs +20 -0
- package/src/Batch.res +32 -34
- package/src/Batch.res.mjs +172 -187
- package/src/Bin.res +89 -0
- package/src/Bin.res.mjs +97 -0
- package/src/ChainFetcher.res +33 -57
- package/src/ChainFetcher.res.mjs +197 -227
- package/src/ChainManager.res +6 -14
- package/src/ChainManager.res.mjs +74 -85
- package/src/ChainMap.res +14 -16
- package/src/ChainMap.res.mjs +38 -38
- package/src/Config.res +193 -135
- package/src/Config.res.mjs +566 -592
- package/src/Core.res +182 -0
- package/src/Core.res.mjs +207 -0
- package/src/Ecosystem.res +25 -4
- package/src/Ecosystem.res.mjs +12 -13
- package/src/Env.res +20 -13
- package/src/Env.res.mjs +124 -113
- package/src/EnvSafe.res +269 -0
- package/src/EnvSafe.res.mjs +296 -0
- package/src/EnvSafe.resi +18 -0
- package/src/Envio.res +37 -26
- package/src/Envio.res.mjs +59 -60
- package/src/ErrorHandling.res +2 -2
- package/src/ErrorHandling.res.mjs +15 -15
- package/src/EventConfigBuilder.res +219 -81
- package/src/EventConfigBuilder.res.mjs +259 -202
- package/src/EventProcessing.res +27 -38
- package/src/EventProcessing.res.mjs +165 -183
- package/src/EventUtils.res +11 -11
- package/src/EventUtils.res.mjs +21 -22
- package/src/EvmTypes.res +0 -1
- package/src/EvmTypes.res.mjs +5 -5
- package/src/FetchState.res +360 -256
- package/src/FetchState.res.mjs +958 -914
- package/src/GlobalState.res +365 -351
- package/src/GlobalState.res.mjs +958 -992
- package/src/GlobalStateManager.res +1 -2
- package/src/GlobalStateManager.res.mjs +36 -44
- package/src/HandlerLoader.res +107 -23
- package/src/HandlerLoader.res.mjs +128 -38
- package/src/HandlerRegister.res +127 -103
- package/src/HandlerRegister.res.mjs +164 -164
- package/src/HandlerRegister.resi +12 -4
- package/src/Hasura.res +35 -22
- package/src/Hasura.res.mjs +158 -167
- package/src/InMemoryStore.res +20 -27
- package/src/InMemoryStore.res.mjs +64 -80
- package/src/InMemoryTable.res +34 -39
- package/src/InMemoryTable.res.mjs +165 -170
- package/src/Internal.res +52 -33
- package/src/Internal.res.mjs +84 -81
- package/src/LazyLoader.res.mjs +55 -61
- package/src/LoadLayer.res +77 -78
- package/src/LoadLayer.res.mjs +160 -189
- package/src/LoadManager.res +16 -21
- package/src/LoadManager.res.mjs +79 -84
- package/src/LogSelection.res +236 -68
- package/src/LogSelection.res.mjs +211 -141
- package/src/Logging.res +13 -9
- package/src/Logging.res.mjs +130 -143
- package/src/Main.res +430 -51
- package/src/Main.res.mjs +530 -271
- package/src/Persistence.res +80 -84
- package/src/Persistence.res.mjs +131 -132
- package/src/PgStorage.res +294 -167
- package/src/PgStorage.res.mjs +799 -817
- package/src/Prometheus.res +50 -58
- package/src/Prometheus.res.mjs +345 -373
- package/src/ReorgDetection.res +22 -24
- package/src/ReorgDetection.res.mjs +100 -106
- package/src/SafeCheckpointTracking.res +7 -7
- package/src/SafeCheckpointTracking.res.mjs +40 -43
- package/src/SimulateItems.res +41 -49
- package/src/SimulateItems.res.mjs +257 -272
- package/src/Sink.res +2 -2
- package/src/Sink.res.mjs +22 -26
- package/src/TableIndices.res +1 -2
- package/src/TableIndices.res.mjs +42 -48
- package/src/TestIndexer.res +196 -189
- package/src/TestIndexer.res.mjs +536 -536
- package/src/TestIndexerProxyStorage.res +16 -16
- package/src/TestIndexerProxyStorage.res.mjs +99 -122
- package/src/TestIndexerWorker.res +4 -0
- package/src/TestIndexerWorker.res.mjs +7 -0
- package/src/Throttler.res +3 -3
- package/src/Throttler.res.mjs +23 -24
- package/src/Time.res +1 -1
- package/src/Time.res.mjs +18 -21
- package/src/TopicFilter.res +3 -3
- package/src/TopicFilter.res.mjs +29 -30
- package/src/UserContext.res +93 -54
- package/src/UserContext.res.mjs +197 -182
- package/src/Utils.res +141 -86
- package/src/Utils.res.mjs +334 -295
- package/src/bindings/BigDecimal.res +0 -2
- package/src/bindings/BigDecimal.res.mjs +19 -23
- package/src/bindings/ClickHouse.res +28 -27
- package/src/bindings/ClickHouse.res.mjs +243 -240
- package/src/bindings/DateFns.res +11 -11
- package/src/bindings/DateFns.res.mjs +7 -7
- package/src/bindings/EventSource.res.mjs +2 -2
- package/src/bindings/Express.res +2 -5
- package/src/bindings/Hrtime.res +2 -2
- package/src/bindings/Hrtime.res.mjs +30 -32
- package/src/bindings/Lodash.res.mjs +1 -1
- package/src/bindings/NodeJs.res +14 -9
- package/src/bindings/NodeJs.res.mjs +20 -20
- package/src/bindings/Pino.res +8 -10
- package/src/bindings/Pino.res.mjs +40 -43
- package/src/bindings/Postgres.res +7 -5
- package/src/bindings/Postgres.res.mjs +9 -9
- package/src/bindings/PromClient.res +17 -2
- package/src/bindings/PromClient.res.mjs +30 -7
- package/src/bindings/SDSL.res.mjs +2 -2
- package/src/bindings/Viem.res +4 -4
- package/src/bindings/Viem.res.mjs +20 -22
- package/src/bindings/Vitest.res +1 -1
- package/src/bindings/Vitest.res.mjs +2 -2
- package/src/bindings/WebSocket.res +1 -1
- package/src/db/EntityHistory.res +9 -3
- package/src/db/EntityHistory.res.mjs +84 -59
- package/src/db/InternalTable.res +62 -60
- package/src/db/InternalTable.res.mjs +271 -203
- package/src/db/Schema.res +1 -2
- package/src/db/Schema.res.mjs +28 -32
- package/src/db/Table.res +28 -27
- package/src/db/Table.res.mjs +276 -292
- package/src/sources/EventRouter.res +21 -16
- package/src/sources/EventRouter.res.mjs +55 -57
- package/src/sources/Evm.res +17 -1
- package/src/sources/Evm.res.mjs +16 -8
- package/src/sources/EvmChain.res +15 -17
- package/src/sources/EvmChain.res.mjs +40 -42
- package/src/sources/Fuel.res +14 -1
- package/src/sources/Fuel.res.mjs +16 -8
- package/src/sources/FuelSDK.res +1 -1
- package/src/sources/FuelSDK.res.mjs +6 -8
- package/src/sources/HyperFuel.res +8 -10
- package/src/sources/HyperFuel.res.mjs +113 -123
- package/src/sources/HyperFuelClient.res.mjs +6 -7
- package/src/sources/HyperFuelSource.res +19 -20
- package/src/sources/HyperFuelSource.res.mjs +339 -356
- package/src/sources/HyperSync.res +11 -13
- package/src/sources/HyperSync.res.mjs +206 -220
- package/src/sources/HyperSyncClient.res +5 -7
- package/src/sources/HyperSyncClient.res.mjs +70 -75
- package/src/sources/HyperSyncHeightStream.res +8 -9
- package/src/sources/HyperSyncHeightStream.res.mjs +78 -86
- package/src/sources/HyperSyncJsonApi.res +18 -15
- package/src/sources/HyperSyncJsonApi.res.mjs +201 -231
- package/src/sources/HyperSyncSource.res +17 -21
- package/src/sources/HyperSyncSource.res.mjs +268 -290
- package/src/sources/Rpc.res +5 -5
- package/src/sources/Rpc.res.mjs +168 -192
- package/src/sources/RpcSource.res +166 -167
- package/src/sources/RpcSource.res.mjs +972 -1046
- package/src/sources/RpcWebSocketHeightStream.res +10 -11
- package/src/sources/RpcWebSocketHeightStream.res.mjs +131 -145
- package/src/sources/SimulateSource.res +1 -1
- package/src/sources/SimulateSource.res.mjs +35 -38
- package/src/sources/Source.res +1 -1
- package/src/sources/Source.res.mjs +3 -3
- package/src/sources/SourceManager.res +39 -20
- package/src/sources/SourceManager.res.mjs +340 -371
- package/src/sources/SourceManager.resi +2 -1
- package/src/sources/Svm.res +12 -5
- package/src/sources/Svm.res.mjs +44 -41
- package/src/tui/Tui.res +23 -12
- package/src/tui/Tui.res.mjs +292 -290
- package/src/tui/bindings/Ink.res +2 -4
- package/src/tui/bindings/Ink.res.mjs +35 -41
- package/src/tui/components/BufferedProgressBar.res +7 -7
- package/src/tui/components/BufferedProgressBar.res.mjs +46 -46
- package/src/tui/components/CustomHooks.res +1 -2
- package/src/tui/components/CustomHooks.res.mjs +102 -122
- package/src/tui/components/Messages.res +1 -2
- package/src/tui/components/Messages.res.mjs +38 -42
- package/src/tui/components/SyncETA.res +10 -11
- package/src/tui/components/SyncETA.res.mjs +178 -196
- package/src/tui/components/TuiData.res +1 -1
- package/src/tui/components/TuiData.res.mjs +7 -6
- package/src/vendored/Rest.res +52 -66
- package/src/vendored/Rest.res.mjs +324 -364
- package/svm.schema.json +67 -0
- package/src/Address.gen.ts +0 -8
- package/src/Config.gen.ts +0 -19
- package/src/Envio.gen.ts +0 -55
- package/src/EvmTypes.gen.ts +0 -6
- package/src/InMemoryStore.gen.ts +0 -6
- package/src/Internal.gen.ts +0 -64
- package/src/PgStorage.gen.ts +0 -10
- package/src/PgStorage.res.d.mts +0 -5
- package/src/Types.ts +0 -56
- package/src/bindings/BigDecimal.gen.ts +0 -14
- package/src/bindings/BigDecimal.res.d.mts +0 -5
- package/src/bindings/BigInt.gen.ts +0 -10
- package/src/bindings/BigInt.res +0 -70
- package/src/bindings/BigInt.res.d.mts +0 -5
- package/src/bindings/BigInt.res.mjs +0 -154
- package/src/bindings/Ethers.res.d.mts +0 -5
- package/src/bindings/Pino.gen.ts +0 -17
- package/src/bindings/Postgres.gen.ts +0 -8
- package/src/bindings/Postgres.res.d.mts +0 -5
- package/src/bindings/Promise.res +0 -67
- package/src/bindings/Promise.res.mjs +0 -26
- package/src/db/InternalTable.gen.ts +0 -36
- package/src/sources/HyperSyncClient.gen.ts +0 -19
package/src/Config.res.mjs
CHANGED
|
@@ -1,62 +1,55 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
+
import * as Env from "./Env.res.mjs";
|
|
3
4
|
import * as Evm from "./sources/Evm.res.mjs";
|
|
4
5
|
import * as Svm from "./sources/Svm.res.mjs";
|
|
6
|
+
import * as Core from "./Core.res.mjs";
|
|
5
7
|
import * as Fuel from "./sources/Fuel.res.mjs";
|
|
6
8
|
import * as Table from "./db/Table.res.mjs";
|
|
7
9
|
import * as Utils from "./Utils.res.mjs";
|
|
8
|
-
import * as $$BigInt from "./bindings/BigInt.res.mjs";
|
|
9
|
-
import * as Js_exn from "rescript/lib/es6/js_exn.js";
|
|
10
10
|
import * as Address from "./Address.res.mjs";
|
|
11
|
-
import * as Js_dict from "rescript/lib/es6/js_dict.js";
|
|
12
11
|
import * as ChainMap from "./ChainMap.res.mjs";
|
|
13
12
|
import * as Internal from "./Internal.res.mjs";
|
|
14
|
-
import * as Belt_Array from "rescript/lib/es6/belt_Array.js";
|
|
15
13
|
import * as BigDecimal from "./bindings/BigDecimal.res.mjs";
|
|
16
|
-
import * as Belt_Option from "rescript/lib/es6/
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
14
|
+
import * as Belt_Option from "@rescript/runtime/lib/es6/Belt_Option.js";
|
|
15
|
+
import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
|
|
16
|
+
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
17
|
+
import * as Stdlib_JsError from "@rescript/runtime/lib/es6/Stdlib_JsError.js";
|
|
18
|
+
import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
|
|
19
19
|
import * as S$RescriptSchema from "rescript-schema/src/S.res.mjs";
|
|
20
|
-
import * as Caml_js_exceptions from "rescript/lib/es6/caml_js_exceptions.js";
|
|
21
20
|
import * as EventConfigBuilder from "./EventConfigBuilder.res.mjs";
|
|
21
|
+
import * as Primitive_exceptions from "@rescript/runtime/lib/es6/Primitive_exceptions.js";
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
let name = "envio_addresses";
|
|
24
24
|
|
|
25
|
-
function makeId(chainId,
|
|
26
|
-
return String(chainId) + "-" +
|
|
25
|
+
function makeId(chainId, address) {
|
|
26
|
+
return String(chainId) + "-" + address;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
});
|
|
29
|
+
function getAddress(entity) {
|
|
30
|
+
let sepIdx = entity.id.indexOf("-");
|
|
31
|
+
return entity.id.slice(sepIdx + 1 | 0, entity.id.length);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let schema = S$RescriptSchema.schema(s => ({
|
|
35
|
+
id: s.m(S$RescriptSchema.string),
|
|
36
|
+
chain_id: s.m(S$RescriptSchema.int),
|
|
37
|
+
registration_block: s.m(S$RescriptSchema.int),
|
|
38
|
+
registration_log_index: s.m(S$RescriptSchema.int),
|
|
39
|
+
contract_name: s.m(S$RescriptSchema.string)
|
|
40
|
+
}));
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Table.mkField("contract_address", "String", Address.schema, undefined, undefined, undefined, undefined, undefined, undefined),
|
|
56
|
-
Table.mkField("contract_name", "String", S$RescriptSchema.string, undefined, undefined, undefined, undefined, undefined, undefined)
|
|
57
|
-
]);
|
|
58
|
-
|
|
59
|
-
var entityConfig = {
|
|
42
|
+
let rowsSchema = S$RescriptSchema.array(schema);
|
|
43
|
+
|
|
44
|
+
let table = Table.mkTable(name, undefined, [
|
|
45
|
+
Table.mkField("id", "String", S$RescriptSchema.string, undefined, undefined, undefined, true, undefined, undefined),
|
|
46
|
+
Table.mkField("chain_id", "Int32", S$RescriptSchema.int, undefined, undefined, undefined, undefined, undefined, undefined),
|
|
47
|
+
Table.mkField("registration_block", "Int32", S$RescriptSchema.int, undefined, undefined, undefined, undefined, undefined, undefined),
|
|
48
|
+
Table.mkField("registration_log_index", "Int32", S$RescriptSchema.int, undefined, undefined, undefined, undefined, undefined, undefined),
|
|
49
|
+
Table.mkField("contract_name", "String", S$RescriptSchema.string, undefined, undefined, undefined, undefined, undefined, undefined)
|
|
50
|
+
]);
|
|
51
|
+
|
|
52
|
+
let entityConfig = {
|
|
60
53
|
name: name,
|
|
61
54
|
index: -1,
|
|
62
55
|
schema: schema,
|
|
@@ -64,375 +57,357 @@ var entityConfig = {
|
|
|
64
57
|
table: table
|
|
65
58
|
};
|
|
66
59
|
|
|
67
|
-
|
|
60
|
+
let EnvioAddresses = {
|
|
68
61
|
name: name,
|
|
69
62
|
index: -1,
|
|
70
63
|
makeId: makeId,
|
|
64
|
+
getAddress: getAddress,
|
|
71
65
|
schema: schema,
|
|
72
66
|
rowsSchema: rowsSchema,
|
|
73
67
|
table: table,
|
|
74
68
|
entityConfig: entityConfig
|
|
75
69
|
};
|
|
76
70
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
let rpcSourceForSchema = S$RescriptSchema.$$enum([
|
|
72
|
+
"sync",
|
|
73
|
+
"fallback",
|
|
74
|
+
"live"
|
|
75
|
+
]);
|
|
82
76
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
};
|
|
97
|
-
});
|
|
77
|
+
let rpcConfigSchema = S$RescriptSchema.schema(s => ({
|
|
78
|
+
url: s.m(S$RescriptSchema.string),
|
|
79
|
+
for: s.m(rpcSourceForSchema),
|
|
80
|
+
ws: s.m(S$RescriptSchema.option(S$RescriptSchema.string)),
|
|
81
|
+
initialBlockInterval: s.m(S$RescriptSchema.option(S$RescriptSchema.int)),
|
|
82
|
+
backoffMultiplicative: s.m(S$RescriptSchema.option(S$RescriptSchema.float)),
|
|
83
|
+
accelerationAdditive: s.m(S$RescriptSchema.option(S$RescriptSchema.int)),
|
|
84
|
+
intervalCeiling: s.m(S$RescriptSchema.option(S$RescriptSchema.int)),
|
|
85
|
+
backoffMillis: s.m(S$RescriptSchema.option(S$RescriptSchema.int)),
|
|
86
|
+
fallbackStallTimeout: s.m(S$RescriptSchema.option(S$RescriptSchema.int)),
|
|
87
|
+
queryTimeoutMillis: s.m(S$RescriptSchema.option(S$RescriptSchema.int)),
|
|
88
|
+
pollingInterval: s.m(S$RescriptSchema.option(S$RescriptSchema.int))
|
|
89
|
+
}));
|
|
98
90
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
};
|
|
104
|
-
});
|
|
91
|
+
let chainContractSchema = S$RescriptSchema.schema(s => ({
|
|
92
|
+
addresses: s.m(S$RescriptSchema.option(S$RescriptSchema.array(S$RescriptSchema.string))),
|
|
93
|
+
startBlock: s.m(S$RescriptSchema.option(S$RescriptSchema.int))
|
|
94
|
+
}));
|
|
105
95
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
};
|
|
118
|
-
});
|
|
96
|
+
let publicConfigChainSchema = S$RescriptSchema.schema(s => ({
|
|
97
|
+
id: s.m(S$RescriptSchema.int),
|
|
98
|
+
startBlock: s.m(S$RescriptSchema.int),
|
|
99
|
+
endBlock: s.m(S$RescriptSchema.option(S$RescriptSchema.int)),
|
|
100
|
+
maxReorgDepth: s.m(S$RescriptSchema.option(S$RescriptSchema.int)),
|
|
101
|
+
blockLag: s.m(S$RescriptSchema.option(S$RescriptSchema.int)),
|
|
102
|
+
hypersync: s.m(S$RescriptSchema.option(S$RescriptSchema.string)),
|
|
103
|
+
rpcs: s.m(S$RescriptSchema.option(S$RescriptSchema.array(rpcConfigSchema))),
|
|
104
|
+
rpc: s.m(S$RescriptSchema.option(S$RescriptSchema.string)),
|
|
105
|
+
contracts: s.m(S$RescriptSchema.option(S$RescriptSchema.dict(chainContractSchema)))
|
|
106
|
+
}));
|
|
119
107
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
};
|
|
130
|
-
});
|
|
108
|
+
let contractEventItemSchema = S$RescriptSchema.schema(s => ({
|
|
109
|
+
event: s.m(S$RescriptSchema.string),
|
|
110
|
+
name: s.m(S$RescriptSchema.string),
|
|
111
|
+
sighash: s.m(S$RescriptSchema.string),
|
|
112
|
+
params: s.m(S$RescriptSchema.option(S$RescriptSchema.array(EventConfigBuilder.eventParamSchema))),
|
|
113
|
+
kind: s.m(S$RescriptSchema.option(S$RescriptSchema.string)),
|
|
114
|
+
blockFields: s.m(S$RescriptSchema.option(S$RescriptSchema.array(Internal.evmBlockFieldSchema))),
|
|
115
|
+
transactionFields: s.m(S$RescriptSchema.option(S$RescriptSchema.array(Internal.evmTransactionFieldSchema)))
|
|
116
|
+
}));
|
|
131
117
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
};
|
|
138
|
-
});
|
|
118
|
+
let contractConfigSchema = S$RescriptSchema.schema(s => ({
|
|
119
|
+
abi: s.m(S$RescriptSchema.json(false)),
|
|
120
|
+
handler: s.m(S$RescriptSchema.option(S$RescriptSchema.string)),
|
|
121
|
+
events: s.m(S$RescriptSchema.option(S$RescriptSchema.array(contractEventItemSchema)))
|
|
122
|
+
}));
|
|
139
123
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
};
|
|
145
|
-
});
|
|
124
|
+
let publicConfigEcosystemSchema = S$RescriptSchema.schema(s => ({
|
|
125
|
+
chains: s.m(S$RescriptSchema.dict(publicConfigChainSchema)),
|
|
126
|
+
contracts: s.m(S$RescriptSchema.option(S$RescriptSchema.dict(contractConfigSchema)))
|
|
127
|
+
}));
|
|
146
128
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
};
|
|
158
|
-
});
|
|
129
|
+
let publicConfigEvmSchema = S$RescriptSchema.schema(s => ({
|
|
130
|
+
chains: s.m(S$RescriptSchema.dict(publicConfigChainSchema)),
|
|
131
|
+
contracts: s.m(S$RescriptSchema.option(S$RescriptSchema.dict(contractConfigSchema))),
|
|
132
|
+
addressFormat: s.m(S$RescriptSchema.option(S$RescriptSchema.$$enum([
|
|
133
|
+
"lowercase",
|
|
134
|
+
"checksum"
|
|
135
|
+
]))),
|
|
136
|
+
globalBlockFields: s.m(S$RescriptSchema.option(S$RescriptSchema.array(Internal.evmBlockFieldSchema))),
|
|
137
|
+
globalTransactionFields: s.m(S$RescriptSchema.option(S$RescriptSchema.array(Internal.evmTransactionFieldSchema)))
|
|
138
|
+
}));
|
|
159
139
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
140
|
+
let multichainSchema = S$RescriptSchema.$$enum([
|
|
141
|
+
"ordered",
|
|
142
|
+
"unordered"
|
|
143
|
+
]);
|
|
164
144
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
};
|
|
170
|
-
});
|
|
145
|
+
let compositeIndexFieldSchema = S$RescriptSchema.schema(s => ({
|
|
146
|
+
fieldName: s.m(S$RescriptSchema.string),
|
|
147
|
+
direction: s.m(S$RescriptSchema.string)
|
|
148
|
+
}));
|
|
171
149
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
};
|
|
178
|
-
});
|
|
150
|
+
let derivedFieldSchema = S$RescriptSchema.schema(s => ({
|
|
151
|
+
fieldName: s.m(S$RescriptSchema.string),
|
|
152
|
+
derivedFromEntity: s.m(S$RescriptSchema.string),
|
|
153
|
+
derivedFromField: s.m(S$RescriptSchema.string)
|
|
154
|
+
}));
|
|
179
155
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
};
|
|
193
|
-
});
|
|
156
|
+
let propertySchema = S$RescriptSchema.schema(s => ({
|
|
157
|
+
name: s.m(S$RescriptSchema.string),
|
|
158
|
+
type: s.m(S$RescriptSchema.string),
|
|
159
|
+
isNullable: s.m(S$RescriptSchema.option(S$RescriptSchema.bool)),
|
|
160
|
+
isArray: s.m(S$RescriptSchema.option(S$RescriptSchema.bool)),
|
|
161
|
+
isIndex: s.m(S$RescriptSchema.option(S$RescriptSchema.bool)),
|
|
162
|
+
linkedEntity: s.m(S$RescriptSchema.option(S$RescriptSchema.string)),
|
|
163
|
+
enum: s.m(S$RescriptSchema.option(S$RescriptSchema.string)),
|
|
164
|
+
entity: s.m(S$RescriptSchema.option(S$RescriptSchema.string)),
|
|
165
|
+
precision: s.m(S$RescriptSchema.option(S$RescriptSchema.int)),
|
|
166
|
+
scale: s.m(S$RescriptSchema.option(S$RescriptSchema.int))
|
|
167
|
+
}));
|
|
194
168
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
};
|
|
202
|
-
});
|
|
169
|
+
let entityJsonSchema = S$RescriptSchema.schema(s => ({
|
|
170
|
+
name: s.m(S$RescriptSchema.string),
|
|
171
|
+
properties: s.m(S$RescriptSchema.array(propertySchema)),
|
|
172
|
+
derivedFields: s.m(S$RescriptSchema.option(S$RescriptSchema.array(derivedFieldSchema))),
|
|
173
|
+
compositeIndices: s.m(S$RescriptSchema.option(S$RescriptSchema.array(S$RescriptSchema.array(compositeIndexFieldSchema))))
|
|
174
|
+
}));
|
|
203
175
|
|
|
204
176
|
function getFieldTypeAndSchema(prop, enumConfigsByName) {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
177
|
+
let typ = prop.type;
|
|
178
|
+
let isNullable = Stdlib_Option.getOr(prop.isNullable, false);
|
|
179
|
+
let isArray = Stdlib_Option.getOr(prop.isArray, false);
|
|
180
|
+
let isIndex = Stdlib_Option.getOr(prop.isIndex, false);
|
|
181
|
+
let match;
|
|
210
182
|
switch (typ) {
|
|
211
183
|
case "bigdecimal" :
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
];
|
|
224
|
-
break;
|
|
184
|
+
match = [
|
|
185
|
+
{
|
|
186
|
+
type: "BigDecimal",
|
|
187
|
+
config: Stdlib_Option.map(prop.precision, p => [
|
|
188
|
+
p,
|
|
189
|
+
Stdlib_Option.getOr(prop.scale, 0)
|
|
190
|
+
])
|
|
191
|
+
},
|
|
192
|
+
BigDecimal.schema
|
|
193
|
+
];
|
|
194
|
+
break;
|
|
225
195
|
case "bigint" :
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
196
|
+
match = [
|
|
197
|
+
{
|
|
198
|
+
type: "BigInt",
|
|
199
|
+
precision: prop.precision
|
|
200
|
+
},
|
|
201
|
+
Utils.$$BigInt.schema
|
|
202
|
+
];
|
|
203
|
+
break;
|
|
234
204
|
case "boolean" :
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
205
|
+
match = [
|
|
206
|
+
"Boolean",
|
|
207
|
+
S$RescriptSchema.bool
|
|
208
|
+
];
|
|
209
|
+
break;
|
|
240
210
|
case "date" :
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
211
|
+
match = [
|
|
212
|
+
"Date",
|
|
213
|
+
Utils.Schema.dbDate
|
|
214
|
+
];
|
|
215
|
+
break;
|
|
246
216
|
case "entity" :
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
217
|
+
let entityName = Stdlib_Option.getOrThrow(prop.entity, undefined);
|
|
218
|
+
match = [
|
|
219
|
+
{
|
|
220
|
+
type: "Entity",
|
|
221
|
+
name: entityName
|
|
222
|
+
},
|
|
223
|
+
S$RescriptSchema.string
|
|
224
|
+
];
|
|
225
|
+
break;
|
|
256
226
|
case "enum" :
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
227
|
+
let enumName = Stdlib_Option.getOrThrow(prop.enum, undefined);
|
|
228
|
+
let enumConfig = Stdlib_Option.getOrThrow(enumConfigsByName[enumName], undefined);
|
|
229
|
+
match = [
|
|
230
|
+
{
|
|
231
|
+
type: "Enum",
|
|
232
|
+
config: enumConfig
|
|
233
|
+
},
|
|
234
|
+
enumConfig.schema
|
|
235
|
+
];
|
|
236
|
+
break;
|
|
267
237
|
case "float" :
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
238
|
+
match = [
|
|
239
|
+
"Number",
|
|
240
|
+
S$RescriptSchema.float
|
|
241
|
+
];
|
|
242
|
+
break;
|
|
273
243
|
case "int" :
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
244
|
+
match = [
|
|
245
|
+
"Int32",
|
|
246
|
+
S$RescriptSchema.int
|
|
247
|
+
];
|
|
248
|
+
break;
|
|
279
249
|
case "json" :
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
250
|
+
match = [
|
|
251
|
+
"Json",
|
|
252
|
+
S$RescriptSchema.json(false)
|
|
253
|
+
];
|
|
254
|
+
break;
|
|
285
255
|
case "serial" :
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
256
|
+
match = [
|
|
257
|
+
"Serial",
|
|
258
|
+
S$RescriptSchema.int
|
|
259
|
+
];
|
|
260
|
+
break;
|
|
291
261
|
case "string" :
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
262
|
+
match = [
|
|
263
|
+
"String",
|
|
264
|
+
S$RescriptSchema.string
|
|
265
|
+
];
|
|
266
|
+
break;
|
|
297
267
|
default:
|
|
298
|
-
match =
|
|
268
|
+
match = Stdlib_JsError.throwWithMessage("Unknown field type in entity config: " + typ);
|
|
299
269
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
270
|
+
let baseSchema = match[1];
|
|
271
|
+
let fieldSchema = isArray ? S$RescriptSchema.array(baseSchema) : baseSchema;
|
|
272
|
+
let fieldSchema$1 = isNullable ? S$RescriptSchema.$$null(fieldSchema) : fieldSchema;
|
|
303
273
|
return [
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
274
|
+
match[0],
|
|
275
|
+
fieldSchema$1,
|
|
276
|
+
isNullable,
|
|
277
|
+
isArray,
|
|
278
|
+
isIndex
|
|
279
|
+
];
|
|
310
280
|
}
|
|
311
281
|
|
|
312
282
|
function parseEnumsFromJson(enumsJson) {
|
|
313
|
-
return
|
|
314
|
-
return Table.makeEnumConfig(param[0], param[1]);
|
|
315
|
-
}));
|
|
283
|
+
return Object.entries(enumsJson).map(param => Table.makeEnumConfig(param[0], param[1]));
|
|
316
284
|
}
|
|
317
285
|
|
|
318
286
|
function parseEntitiesFromJson(entitiesJson, enumConfigsByName) {
|
|
319
|
-
return
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
index: index,
|
|
350
|
-
schema: schema,
|
|
351
|
-
rowsSchema: S$RescriptSchema.array(schema),
|
|
352
|
-
table: table
|
|
353
|
-
};
|
|
354
|
-
}));
|
|
287
|
+
return entitiesJson.map((entityJson, index) => {
|
|
288
|
+
let entityName = entityJson.name;
|
|
289
|
+
let fields = entityJson.properties.map(prop => {
|
|
290
|
+
let match = getFieldTypeAndSchema(prop, enumConfigsByName);
|
|
291
|
+
return Table.mkField(prop.name, match[0], match[1], undefined, match[3], match[2], prop.name === "id", match[4], prop.linkedEntity);
|
|
292
|
+
});
|
|
293
|
+
let derivedFields = Stdlib_Option.getOr(entityJson.derivedFields, []).map(df => Table.mkDerivedFromField(df.fieldName, df.derivedFromEntity, df.derivedFromField));
|
|
294
|
+
let compositeIndices = Stdlib_Option.getOr(entityJson.compositeIndices, []).map(ci => ci.map(f => ({
|
|
295
|
+
fieldName: f.fieldName,
|
|
296
|
+
direction: f.direction === "Asc" ? "Asc" : "Desc"
|
|
297
|
+
})));
|
|
298
|
+
let table = Table.mkTable(entityName, compositeIndices, fields.concat(derivedFields));
|
|
299
|
+
let schema = S$RescriptSchema.schema(s => {
|
|
300
|
+
let dict = {};
|
|
301
|
+
entityJson.properties.forEach(prop => {
|
|
302
|
+
let match = getFieldTypeAndSchema(prop, enumConfigsByName);
|
|
303
|
+
let match$1 = prop.linkedEntity;
|
|
304
|
+
let dbFieldName = match$1 !== undefined ? prop.name + "_id" : prop.name;
|
|
305
|
+
dict[dbFieldName] = s.m(match[1]);
|
|
306
|
+
});
|
|
307
|
+
return dict;
|
|
308
|
+
});
|
|
309
|
+
return {
|
|
310
|
+
name: entityName,
|
|
311
|
+
index: index,
|
|
312
|
+
schema: schema,
|
|
313
|
+
rowsSchema: S$RescriptSchema.array(schema),
|
|
314
|
+
table: table
|
|
315
|
+
};
|
|
316
|
+
});
|
|
355
317
|
}
|
|
356
318
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
handlers: s.m(S$RescriptSchema.option(S$RescriptSchema.string)),
|
|
362
|
-
multichain: s.m(S$RescriptSchema.option(multichainSchema)),
|
|
363
|
-
fullBatchSize: s.m(S$RescriptSchema.option(S$RescriptSchema.$$int)),
|
|
364
|
-
rollbackOnReorg: s.m(S$RescriptSchema.option(S$RescriptSchema.bool)),
|
|
365
|
-
saveFullHistory: s.m(S$RescriptSchema.option(S$RescriptSchema.bool)),
|
|
366
|
-
rawEvents: s.m(S$RescriptSchema.option(S$RescriptSchema.bool)),
|
|
367
|
-
evm: s.m(S$RescriptSchema.option(publicConfigEvmSchema)),
|
|
368
|
-
fuel: s.m(S$RescriptSchema.option(publicConfigEcosystemSchema)),
|
|
369
|
-
svm: s.m(S$RescriptSchema.option(publicConfigEcosystemSchema)),
|
|
370
|
-
enums: s.m(S$RescriptSchema.option(S$RescriptSchema.dict(S$RescriptSchema.array(S$RescriptSchema.string)))),
|
|
371
|
-
entities: s.m(S$RescriptSchema.option(S$RescriptSchema.array(entityJsonSchema)))
|
|
372
|
-
};
|
|
373
|
-
});
|
|
319
|
+
let publicConfigStorageSchema = S$RescriptSchema.schema(s => ({
|
|
320
|
+
postgres: s.m(S$RescriptSchema.bool),
|
|
321
|
+
clickhouse: s.m(S$RescriptSchema.option(S$RescriptSchema.bool))
|
|
322
|
+
}));
|
|
374
323
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
324
|
+
let publicConfigSchema = S$RescriptSchema.schema(s => ({
|
|
325
|
+
name: s.m(S$RescriptSchema.string),
|
|
326
|
+
description: s.m(S$RescriptSchema.option(S$RescriptSchema.string)),
|
|
327
|
+
handlers: s.m(S$RescriptSchema.option(S$RescriptSchema.string)),
|
|
328
|
+
multichain: s.m(S$RescriptSchema.option(multichainSchema)),
|
|
329
|
+
fullBatchSize: s.m(S$RescriptSchema.option(S$RescriptSchema.int)),
|
|
330
|
+
rollbackOnReorg: s.m(S$RescriptSchema.option(S$RescriptSchema.bool)),
|
|
331
|
+
saveFullHistory: s.m(S$RescriptSchema.option(S$RescriptSchema.bool)),
|
|
332
|
+
rawEvents: s.m(S$RescriptSchema.option(S$RescriptSchema.bool)),
|
|
333
|
+
storage: s.m(publicConfigStorageSchema),
|
|
334
|
+
evm: s.m(S$RescriptSchema.option(publicConfigEvmSchema)),
|
|
335
|
+
fuel: s.m(S$RescriptSchema.option(publicConfigEcosystemSchema)),
|
|
336
|
+
svm: s.m(S$RescriptSchema.option(publicConfigEcosystemSchema)),
|
|
337
|
+
enums: s.m(S$RescriptSchema.option(S$RescriptSchema.dict(S$RescriptSchema.array(S$RescriptSchema.string)))),
|
|
338
|
+
entities: s.m(S$RescriptSchema.option(S$RescriptSchema.array(entityJsonSchema)))
|
|
339
|
+
}));
|
|
340
|
+
|
|
341
|
+
function fromPublic(publicConfigJson) {
|
|
342
|
+
let publicConfig;
|
|
378
343
|
try {
|
|
379
344
|
publicConfig = S$RescriptSchema.parseOrThrow(publicConfigJson, publicConfigSchema);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
var exn = Caml_js_exceptions.internalToOCamlException(raw_exn);
|
|
345
|
+
} catch (raw_exn) {
|
|
346
|
+
let exn = Primitive_exceptions.internalToException(raw_exn);
|
|
383
347
|
if (exn.RE_EXN_ID === S$RescriptSchema.Raised) {
|
|
384
|
-
publicConfig =
|
|
348
|
+
publicConfig = Stdlib_JsError.throwWithMessage(`Invalid indexer config: ` + Utils.prettifyExn(exn._1));
|
|
385
349
|
} else {
|
|
386
350
|
throw exn;
|
|
387
351
|
}
|
|
388
352
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
match$1 !== undefined || match$2 !== undefined ?
|
|
394
|
-
|
|
353
|
+
let match = publicConfig.evm;
|
|
354
|
+
let match$1 = publicConfig.fuel;
|
|
355
|
+
let match$2 = publicConfig.svm;
|
|
356
|
+
let match$3 = match !== undefined ? (
|
|
357
|
+
match$1 !== undefined || match$2 !== undefined ? Stdlib_JsError.throwWithMessage("Invalid indexer config: Multiple ecosystems are not supported for a single indexer") : [
|
|
358
|
+
Primitive_option.valFromOption(match).chains,
|
|
395
359
|
"evm"
|
|
396
360
|
]
|
|
397
361
|
) : (
|
|
398
362
|
match$1 !== undefined ? (
|
|
399
|
-
match$2 !== undefined ?
|
|
400
|
-
|
|
363
|
+
match$2 !== undefined ? Stdlib_JsError.throwWithMessage("Invalid indexer config: Multiple ecosystems are not supported for a single indexer") : [
|
|
364
|
+
Primitive_option.valFromOption(match$1).chains,
|
|
401
365
|
"fuel"
|
|
402
366
|
]
|
|
403
367
|
) : (
|
|
404
368
|
match$2 !== undefined ? [
|
|
405
|
-
|
|
369
|
+
Primitive_option.valFromOption(match$2).chains,
|
|
406
370
|
"svm"
|
|
407
|
-
] :
|
|
371
|
+
] : Stdlib_JsError.throwWithMessage("Invalid indexer config: No ecosystem configured (evm, fuel, or svm)")
|
|
408
372
|
)
|
|
409
373
|
);
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
var lowercaseAddresses = evm !== undefined ? Belt_Option.getWithDefault(Caml_option.valFromOption(evm).addressFormat, "checksum") === "lowercase" : false;
|
|
414
|
-
var match$4 = publicConfig.evm;
|
|
415
|
-
var match$5 = publicConfig.fuel;
|
|
416
|
-
var publicContractsConfig;
|
|
374
|
+
let ecosystemName = match$3[1];
|
|
375
|
+
let publicChainsConfig = match$3[0];
|
|
376
|
+
let ecosystem;
|
|
417
377
|
switch (ecosystemName) {
|
|
418
378
|
case "evm" :
|
|
419
|
-
|
|
420
|
-
|
|
379
|
+
ecosystem = Evm.ecosystem;
|
|
380
|
+
break;
|
|
421
381
|
case "fuel" :
|
|
422
|
-
|
|
423
|
-
|
|
382
|
+
ecosystem = Fuel.ecosystem;
|
|
383
|
+
break;
|
|
424
384
|
case "svm" :
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
385
|
+
ecosystem = Svm.ecosystem;
|
|
386
|
+
break;
|
|
428
387
|
}
|
|
429
|
-
|
|
430
|
-
|
|
388
|
+
let evm = publicConfig.evm;
|
|
389
|
+
let lowercaseAddresses = evm !== undefined ? Stdlib_Option.getOr(Primitive_option.valFromOption(evm).addressFormat, "checksum") === "lowercase" : false;
|
|
390
|
+
let match$4 = publicConfig.evm;
|
|
391
|
+
let match$5 = publicConfig.fuel;
|
|
392
|
+
let publicContractsConfig;
|
|
393
|
+
switch (ecosystemName) {
|
|
394
|
+
case "evm" :
|
|
395
|
+
publicContractsConfig = match$4 !== undefined ? Primitive_option.valFromOption(match$4).contracts : undefined;
|
|
396
|
+
break;
|
|
397
|
+
case "fuel" :
|
|
398
|
+
publicContractsConfig = match$5 !== undefined ? Primitive_option.valFromOption(match$5).contracts : undefined;
|
|
399
|
+
break;
|
|
400
|
+
case "svm" :
|
|
401
|
+
publicContractsConfig = undefined;
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
let evm$1 = publicConfig.evm;
|
|
405
|
+
let match$6;
|
|
431
406
|
if (evm$1 !== undefined) {
|
|
432
|
-
|
|
407
|
+
let evm$2 = Primitive_option.valFromOption(evm$1);
|
|
433
408
|
match$6 = [
|
|
434
|
-
new Set(
|
|
435
|
-
new Set(
|
|
409
|
+
new Set(EventConfigBuilder.alwaysIncludedBlockFields.concat(Stdlib_Option.getOr(evm$2.globalBlockFields, []))),
|
|
410
|
+
new Set(Stdlib_Option.getOr(evm$2.globalTransactionFields, []))
|
|
436
411
|
];
|
|
437
412
|
} else {
|
|
438
413
|
match$6 = [
|
|
@@ -440,260 +415,232 @@ function fromPublic(publicConfigJson, maxAddrInPartitionOpt) {
|
|
|
440
415
|
new Set()
|
|
441
416
|
];
|
|
442
417
|
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
418
|
+
let globalTransactionFieldsSet = match$6[1];
|
|
419
|
+
let globalBlockFieldsSet = match$6[0];
|
|
420
|
+
let contractDataByName = {};
|
|
446
421
|
if (publicContractsConfig !== undefined) {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
};
|
|
460
|
-
}));
|
|
422
|
+
Object.entries(publicContractsConfig).forEach(param => {
|
|
423
|
+
let contractConfig = param[1];
|
|
424
|
+
let capitalizedName = Utils.$$String.capitalize(param[0]);
|
|
425
|
+
let abi = contractConfig.abi;
|
|
426
|
+
let events = contractConfig.events;
|
|
427
|
+
let eventSignatures = events !== undefined ? events.map(eventItem => eventItem.event) : [];
|
|
428
|
+
contractDataByName[capitalizedName] = {
|
|
429
|
+
abi: abi,
|
|
430
|
+
eventSignatures: eventSignatures,
|
|
431
|
+
events: contractConfig.events
|
|
432
|
+
};
|
|
433
|
+
});
|
|
461
434
|
}
|
|
462
|
-
|
|
435
|
+
let buildContractEvents = (contractName, events, abi, chainId, startBlock) => {
|
|
463
436
|
if (events !== undefined) {
|
|
464
|
-
return
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
}
|
|
484
|
-
return EventConfigBuilder.buildEvmEventConfig(contractName, eventName, sighash, params, isWildcard, handler, contractRegister, HandlerRegister.getEventFilters(contractName, eventName), eventItem.blockFields, eventItem.transactionFields, Caml_option.some(globalBlockFieldsSet), Caml_option.some(globalTransactionFieldsSet));
|
|
485
|
-
}));
|
|
437
|
+
return events.map(eventItem => {
|
|
438
|
+
let eventName = eventItem.name;
|
|
439
|
+
let sighash = eventItem.sighash;
|
|
440
|
+
let params = Stdlib_Option.getOr(eventItem.params, []);
|
|
441
|
+
let kind = eventItem.kind;
|
|
442
|
+
switch (ecosystemName) {
|
|
443
|
+
case "fuel" :
|
|
444
|
+
if (kind !== undefined) {
|
|
445
|
+
return EventConfigBuilder.buildFuelEventConfig(contractName, eventName, kind, sighash, abi, false, undefined, undefined, startBlock);
|
|
446
|
+
} else {
|
|
447
|
+
return Stdlib_JsError.throwWithMessage(`Fuel event ` + contractName + `.` + eventName + ` is missing "kind" in internal config`);
|
|
448
|
+
}
|
|
449
|
+
case "evm" :
|
|
450
|
+
case "svm" :
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
return EventConfigBuilder.buildEvmEventConfig(contractName, eventName, sighash, params, false, undefined, undefined, undefined, chainId, ecosystem.onEventBlockFilterSchema, eventItem.blockFields, eventItem.transactionFields, startBlock, Primitive_option.some(globalBlockFieldsSet), Primitive_option.some(globalTransactionFieldsSet));
|
|
454
|
+
});
|
|
486
455
|
} else {
|
|
487
456
|
return [];
|
|
488
457
|
}
|
|
489
458
|
};
|
|
490
|
-
|
|
459
|
+
let parseAddress = addressString => {
|
|
491
460
|
switch (ecosystemName) {
|
|
492
461
|
case "evm" :
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
462
|
+
if (lowercaseAddresses) {
|
|
463
|
+
return Address.Evm.fromStringLowercaseOrThrow(addressString);
|
|
464
|
+
} else {
|
|
465
|
+
return Address.Evm.fromStringOrThrow(addressString);
|
|
466
|
+
}
|
|
498
467
|
case "fuel" :
|
|
499
468
|
case "svm" :
|
|
500
|
-
|
|
501
|
-
|
|
469
|
+
return addressString;
|
|
502
470
|
}
|
|
503
471
|
};
|
|
504
|
-
|
|
472
|
+
let parseRpcSourceFor = sourceFor => {
|
|
505
473
|
switch (sourceFor) {
|
|
506
474
|
case "sync" :
|
|
507
|
-
|
|
475
|
+
return "Sync";
|
|
508
476
|
case "fallback" :
|
|
509
|
-
|
|
477
|
+
return "Fallback";
|
|
510
478
|
case "live" :
|
|
511
|
-
|
|
512
|
-
|
|
479
|
+
return "Live";
|
|
513
480
|
}
|
|
514
481
|
};
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
TAG: "EvmSourceConfig",
|
|
571
|
-
hypersync: publicChainConfig.hypersync,
|
|
572
|
-
rpcs: rpcs
|
|
573
|
-
};
|
|
574
|
-
break;
|
|
575
|
-
case "fuel" :
|
|
576
|
-
var hypersync = publicChainConfig.hypersync;
|
|
577
|
-
sourceConfig = hypersync !== undefined ? ({
|
|
578
|
-
TAG: "FuelSourceConfig",
|
|
579
|
-
hypersync: hypersync
|
|
580
|
-
}) : Js_exn.raiseError("Chain " + chainName + " is missing hypersync endpoint in config");
|
|
581
|
-
break;
|
|
582
|
-
case "svm" :
|
|
583
|
-
var rpc = publicChainConfig.rpc;
|
|
584
|
-
sourceConfig = rpc !== undefined ? ({
|
|
585
|
-
TAG: "SvmSourceConfig",
|
|
586
|
-
rpc: rpc
|
|
587
|
-
}) : Js_exn.raiseError("Chain " + chainName + " is missing rpc endpoint in config");
|
|
588
|
-
break;
|
|
589
|
-
|
|
590
|
-
}
|
|
591
|
-
var tmp;
|
|
592
|
-
switch (ecosystemName) {
|
|
593
|
-
case "evm" :
|
|
594
|
-
tmp = Belt_Option.getWithDefault(publicChainConfig.maxReorgDepth, 200);
|
|
595
|
-
break;
|
|
596
|
-
case "fuel" :
|
|
597
|
-
case "svm" :
|
|
598
|
-
tmp = 0;
|
|
599
|
-
break;
|
|
600
|
-
|
|
601
|
-
}
|
|
602
|
-
return {
|
|
603
|
-
name: chainName,
|
|
604
|
-
id: chainId,
|
|
605
|
-
startBlock: publicChainConfig.startBlock,
|
|
606
|
-
endBlock: publicChainConfig.endBlock,
|
|
607
|
-
maxReorgDepth: tmp,
|
|
608
|
-
blockLag: Belt_Option.getWithDefault(publicChainConfig.blockLag, 0),
|
|
609
|
-
contracts: contracts,
|
|
610
|
-
sourceConfig: sourceConfig
|
|
611
|
-
};
|
|
612
|
-
});
|
|
613
|
-
var chainMap = ChainMap.fromArrayUnsafe(chains.map(function (chain) {
|
|
614
|
-
return [
|
|
615
|
-
ChainMap.Chain.makeUnsafe(chain.id),
|
|
616
|
-
chain
|
|
617
|
-
];
|
|
618
|
-
}));
|
|
619
|
-
var addContractNameToContractNameMapping = {};
|
|
620
|
-
Belt_Array.forEach(chains, (function (chainConfig) {
|
|
621
|
-
Belt_Array.forEach(chainConfig.contracts, (function (contract) {
|
|
622
|
-
var addKey = "add" + Utils.$$String.capitalize(contract.name);
|
|
623
|
-
addContractNameToContractNameMapping[addKey] = contract.name;
|
|
624
|
-
}));
|
|
625
|
-
}));
|
|
626
|
-
var ecosystem;
|
|
627
|
-
switch (ecosystemName) {
|
|
628
|
-
case "evm" :
|
|
629
|
-
ecosystem = Evm.ecosystem;
|
|
482
|
+
let chains = Object.keys(publicChainsConfig).map(chainName => {
|
|
483
|
+
let publicChainConfig = publicChainsConfig[chainName];
|
|
484
|
+
let chainId = publicChainConfig.id;
|
|
485
|
+
let chainContracts = Stdlib_Option.getOr(publicChainConfig.contracts, {});
|
|
486
|
+
let contracts = Object.entries(contractDataByName).map(param => {
|
|
487
|
+
let contractData = param[1];
|
|
488
|
+
let capitalizedName = param[0];
|
|
489
|
+
let chainContract = chainContracts[capitalizedName];
|
|
490
|
+
let addresses = Stdlib_Option.getOr(Stdlib_Option.flatMap(chainContract, cc => cc.addresses), []).map(parseAddress);
|
|
491
|
+
let startBlock = Stdlib_Option.flatMap(chainContract, cc => cc.startBlock);
|
|
492
|
+
let events = buildContractEvents(capitalizedName, contractData.events, contractData.abi, chainId, startBlock);
|
|
493
|
+
return {
|
|
494
|
+
name: capitalizedName,
|
|
495
|
+
abi: contractData.abi,
|
|
496
|
+
addresses: addresses,
|
|
497
|
+
events: events,
|
|
498
|
+
startBlock: startBlock,
|
|
499
|
+
eventSignatures: contractData.eventSignatures
|
|
500
|
+
};
|
|
501
|
+
});
|
|
502
|
+
let sourceConfig;
|
|
503
|
+
switch (ecosystemName) {
|
|
504
|
+
case "evm" :
|
|
505
|
+
let rpcs = Stdlib_Option.getOr(publicChainConfig.rpcs, []).map(rpcConfig => {
|
|
506
|
+
let initialBlockInterval = rpcConfig.initialBlockInterval;
|
|
507
|
+
let backoffMultiplicative = rpcConfig.backoffMultiplicative;
|
|
508
|
+
let accelerationAdditive = rpcConfig.accelerationAdditive;
|
|
509
|
+
let intervalCeiling = rpcConfig.intervalCeiling;
|
|
510
|
+
let backoffMillis = rpcConfig.backoffMillis;
|
|
511
|
+
let queryTimeoutMillis = rpcConfig.queryTimeoutMillis;
|
|
512
|
+
let fallbackStallTimeout = rpcConfig.fallbackStallTimeout;
|
|
513
|
+
let pollingInterval = rpcConfig.pollingInterval;
|
|
514
|
+
let hasSyncConfig = Stdlib_Option.isSome(initialBlockInterval) || Stdlib_Option.isSome(backoffMultiplicative) || Stdlib_Option.isSome(accelerationAdditive) || Stdlib_Option.isSome(intervalCeiling) || Stdlib_Option.isSome(backoffMillis) || Stdlib_Option.isSome(queryTimeoutMillis) || Stdlib_Option.isSome(fallbackStallTimeout) || Stdlib_Option.isSome(pollingInterval);
|
|
515
|
+
let syncConfig = hasSyncConfig ? ({
|
|
516
|
+
initialBlockInterval: initialBlockInterval,
|
|
517
|
+
backoffMultiplicative: backoffMultiplicative,
|
|
518
|
+
accelerationAdditive: accelerationAdditive,
|
|
519
|
+
intervalCeiling: intervalCeiling,
|
|
520
|
+
backoffMillis: backoffMillis,
|
|
521
|
+
queryTimeoutMillis: queryTimeoutMillis,
|
|
522
|
+
fallbackStallTimeout: fallbackStallTimeout,
|
|
523
|
+
pollingInterval: pollingInterval
|
|
524
|
+
}) : undefined;
|
|
525
|
+
return {
|
|
526
|
+
url: rpcConfig.url,
|
|
527
|
+
sourceFor: parseRpcSourceFor(rpcConfig.for),
|
|
528
|
+
syncConfig: syncConfig,
|
|
529
|
+
ws: rpcConfig.ws
|
|
530
|
+
};
|
|
531
|
+
});
|
|
532
|
+
sourceConfig = {
|
|
533
|
+
TAG: "EvmSourceConfig",
|
|
534
|
+
hypersync: publicChainConfig.hypersync,
|
|
535
|
+
rpcs: rpcs
|
|
536
|
+
};
|
|
630
537
|
break;
|
|
631
|
-
|
|
632
|
-
|
|
538
|
+
case "fuel" :
|
|
539
|
+
let hypersync = publicChainConfig.hypersync;
|
|
540
|
+
sourceConfig = hypersync !== undefined ? ({
|
|
541
|
+
TAG: "FuelSourceConfig",
|
|
542
|
+
hypersync: hypersync
|
|
543
|
+
}) : Stdlib_JsError.throwWithMessage(`Chain ` + chainName + ` is missing hypersync endpoint in config`);
|
|
633
544
|
break;
|
|
634
|
-
|
|
635
|
-
|
|
545
|
+
case "svm" :
|
|
546
|
+
let rpc = publicChainConfig.rpc;
|
|
547
|
+
sourceConfig = rpc !== undefined ? ({
|
|
548
|
+
TAG: "SvmSourceConfig",
|
|
549
|
+
rpc: rpc
|
|
550
|
+
}) : Stdlib_JsError.throwWithMessage(`Chain ` + chainName + ` is missing rpc endpoint in config`);
|
|
636
551
|
break;
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
552
|
+
}
|
|
553
|
+
let tmp;
|
|
554
|
+
switch (ecosystemName) {
|
|
555
|
+
case "evm" :
|
|
556
|
+
tmp = Stdlib_Option.getOr(publicChainConfig.maxReorgDepth, 200);
|
|
557
|
+
break;
|
|
558
|
+
case "fuel" :
|
|
559
|
+
case "svm" :
|
|
560
|
+
tmp = 0;
|
|
561
|
+
break;
|
|
562
|
+
}
|
|
563
|
+
return {
|
|
564
|
+
name: chainName,
|
|
565
|
+
id: chainId,
|
|
566
|
+
startBlock: publicChainConfig.startBlock,
|
|
567
|
+
endBlock: publicChainConfig.endBlock,
|
|
568
|
+
maxReorgDepth: tmp,
|
|
569
|
+
blockLag: Stdlib_Option.getOr(publicChainConfig.blockLag, 0),
|
|
570
|
+
contracts: contracts,
|
|
571
|
+
sourceConfig: sourceConfig
|
|
572
|
+
};
|
|
573
|
+
});
|
|
574
|
+
let chainMap = ChainMap.fromArrayUnsafe(chains.map(chain => [
|
|
575
|
+
ChainMap.Chain.makeUnsafe(chain.id),
|
|
576
|
+
chain
|
|
577
|
+
]));
|
|
578
|
+
let allEnums = parseEnumsFromJson(Stdlib_Option.getOr(publicConfig.enums, {}));
|
|
579
|
+
let enumConfigsByName = Object.fromEntries(allEnums.map(enumConfig => [
|
|
580
|
+
enumConfig.name,
|
|
581
|
+
enumConfig
|
|
582
|
+
]));
|
|
583
|
+
let userEntities = parseEntitiesFromJson(Stdlib_Option.getOr(publicConfig.entities, []), enumConfigsByName);
|
|
584
|
+
let allEntities = userEntities.concat([entityConfig]);
|
|
585
|
+
let userEntitiesByName = Object.fromEntries(userEntities.map(entityConfig => [
|
|
586
|
+
entityConfig.name,
|
|
587
|
+
entityConfig
|
|
588
|
+
]));
|
|
589
|
+
let contractHandlers = publicContractsConfig !== undefined ? Object.entries(publicContractsConfig).map(param => ({
|
|
590
|
+
name: Utils.$$String.capitalize(param[0]),
|
|
591
|
+
handler: param[1].handler
|
|
592
|
+
})) : [];
|
|
660
593
|
return {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
594
|
+
name: publicConfig.name,
|
|
595
|
+
description: publicConfig.description,
|
|
596
|
+
handlers: Stdlib_Option.getOr(publicConfig.handlers, "src/handlers"),
|
|
597
|
+
contractHandlers: contractHandlers,
|
|
598
|
+
shouldRollbackOnReorg: Stdlib_Option.getOr(publicConfig.rollbackOnReorg, true),
|
|
599
|
+
shouldSaveFullHistory: Stdlib_Option.getOr(publicConfig.saveFullHistory, false),
|
|
600
|
+
storage: {
|
|
601
|
+
postgres: publicConfig.storage.postgres,
|
|
602
|
+
clickhouse: Stdlib_Option.getOr(publicConfig.storage.clickhouse, false)
|
|
603
|
+
},
|
|
604
|
+
multichain: Stdlib_Option.getOr(publicConfig.multichain, "unordered"),
|
|
605
|
+
chainMap: chainMap,
|
|
606
|
+
defaultChain: chains[0],
|
|
607
|
+
ecosystem: ecosystem,
|
|
608
|
+
enableRawEvents: Stdlib_Option.getOr(publicConfig.rawEvents, false),
|
|
609
|
+
maxAddrInPartition: Env.maxAddrInPartition,
|
|
610
|
+
batchSize: Stdlib_Option.getOr(publicConfig.fullBatchSize, 5000),
|
|
611
|
+
lowercaseAddresses: lowercaseAddresses,
|
|
612
|
+
userEntitiesByName: userEntitiesByName,
|
|
613
|
+
userEntities: userEntities,
|
|
614
|
+
allEntities: allEntities,
|
|
615
|
+
allEnums: allEnums
|
|
616
|
+
};
|
|
681
617
|
}
|
|
682
618
|
|
|
683
|
-
function getEventConfig(config, contractName, eventName) {
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
619
|
+
function getEventConfig(config, contractName, eventName, chainId) {
|
|
620
|
+
let chains;
|
|
621
|
+
if (chainId !== undefined) {
|
|
622
|
+
let chain = ChainMap.Chain.makeUnsafe(chainId);
|
|
623
|
+
let exit = 0;
|
|
624
|
+
let chainConfig;
|
|
625
|
+
try {
|
|
626
|
+
chainConfig = ChainMap.get(config.chainMap, chain);
|
|
627
|
+
exit = 1;
|
|
628
|
+
} catch (exn) {
|
|
629
|
+
chains = Stdlib_JsError.throwWithMessage(`Chain ` + chainId.toString() + ` is not configured. Add it to config.yaml or pass a configured chain.`);
|
|
630
|
+
}
|
|
631
|
+
if (exit === 1) {
|
|
632
|
+
chains = [chainConfig];
|
|
633
|
+
}
|
|
634
|
+
} else {
|
|
635
|
+
chains = ChainMap.values(config.chainMap);
|
|
636
|
+
}
|
|
637
|
+
return Stdlib_Array.reduce(chains, undefined, (acc, chain) => {
|
|
638
|
+
if (acc !== undefined) {
|
|
639
|
+
return acc;
|
|
640
|
+
} else {
|
|
641
|
+
return Belt_Option.flatMap(chain.contracts.find(c => c.name === contractName), contract => contract.events.find(e => e.name === eventName));
|
|
642
|
+
}
|
|
643
|
+
});
|
|
697
644
|
}
|
|
698
645
|
|
|
699
646
|
function shouldSaveHistory(config, isInReorgThreshold) {
|
|
@@ -715,37 +662,64 @@ function shouldPruneHistory(config, isInReorgThreshold) {
|
|
|
715
662
|
}
|
|
716
663
|
|
|
717
664
|
function getChain(config, chainId) {
|
|
718
|
-
|
|
665
|
+
let chain = ChainMap.Chain.makeUnsafe(chainId);
|
|
719
666
|
if (ChainMap.has(config.chainMap, chain)) {
|
|
720
667
|
return chain;
|
|
721
668
|
} else {
|
|
722
|
-
return
|
|
669
|
+
return Stdlib_JsError.throwWithMessage("No chain with id " + ChainMap.Chain.toString(chain) + " found in config.yaml");
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
let primedJson = {
|
|
674
|
+
contents: undefined
|
|
675
|
+
};
|
|
676
|
+
|
|
677
|
+
let cached = {
|
|
678
|
+
contents: undefined
|
|
679
|
+
};
|
|
680
|
+
|
|
681
|
+
function prime(json) {
|
|
682
|
+
primedJson.contents = json;
|
|
683
|
+
cached.contents = undefined;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
function loadWithoutRegistrations() {
|
|
687
|
+
let c = cached.contents;
|
|
688
|
+
if (c !== undefined) {
|
|
689
|
+
return c;
|
|
723
690
|
}
|
|
691
|
+
let json = primedJson.contents;
|
|
692
|
+
let c$1 = json !== undefined ? fromPublic(json) : fromPublic(JSON.parse(Core.getConfigJson(undefined, undefined)));
|
|
693
|
+
cached.contents = c$1;
|
|
694
|
+
return c$1;
|
|
724
695
|
}
|
|
725
696
|
|
|
726
697
|
export {
|
|
727
|
-
|
|
728
|
-
rpcSourceForSchema
|
|
729
|
-
rpcConfigSchema
|
|
730
|
-
chainContractSchema
|
|
731
|
-
publicConfigChainSchema
|
|
732
|
-
contractEventItemSchema
|
|
733
|
-
contractConfigSchema
|
|
734
|
-
publicConfigEcosystemSchema
|
|
735
|
-
publicConfigEvmSchema
|
|
736
|
-
multichainSchema
|
|
737
|
-
compositeIndexFieldSchema
|
|
738
|
-
derivedFieldSchema
|
|
739
|
-
propertySchema
|
|
740
|
-
entityJsonSchema
|
|
741
|
-
getFieldTypeAndSchema
|
|
742
|
-
parseEnumsFromJson
|
|
743
|
-
parseEntitiesFromJson
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
698
|
+
EnvioAddresses,
|
|
699
|
+
rpcSourceForSchema,
|
|
700
|
+
rpcConfigSchema,
|
|
701
|
+
chainContractSchema,
|
|
702
|
+
publicConfigChainSchema,
|
|
703
|
+
contractEventItemSchema,
|
|
704
|
+
contractConfigSchema,
|
|
705
|
+
publicConfigEcosystemSchema,
|
|
706
|
+
publicConfigEvmSchema,
|
|
707
|
+
multichainSchema,
|
|
708
|
+
compositeIndexFieldSchema,
|
|
709
|
+
derivedFieldSchema,
|
|
710
|
+
propertySchema,
|
|
711
|
+
entityJsonSchema,
|
|
712
|
+
getFieldTypeAndSchema,
|
|
713
|
+
parseEnumsFromJson,
|
|
714
|
+
parseEntitiesFromJson,
|
|
715
|
+
publicConfigStorageSchema,
|
|
716
|
+
publicConfigSchema,
|
|
717
|
+
fromPublic,
|
|
718
|
+
getEventConfig,
|
|
719
|
+
shouldSaveHistory,
|
|
720
|
+
shouldPruneHistory,
|
|
721
|
+
getChain,
|
|
722
|
+
prime,
|
|
723
|
+
loadWithoutRegistrations,
|
|
750
724
|
}
|
|
751
725
|
/* schema Not a pure module */
|