envio 3.1.1 → 3.2.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/evm.schema.json +83 -11
- package/fuel.schema.json +83 -11
- package/index.d.ts +184 -3
- package/package.json +6 -6
- package/src/Batch.res +2 -2
- package/src/ChainFetcher.res +27 -3
- package/src/ChainFetcher.res.mjs +17 -3
- package/src/ChainManager.res +163 -0
- package/src/ChainManager.res.mjs +136 -0
- package/src/Config.res +213 -30
- package/src/Config.res.mjs +102 -41
- package/src/Core.res +16 -10
- package/src/Ecosystem.res +0 -3
- package/src/Env.res +2 -2
- package/src/Env.res.mjs +2 -2
- package/src/Envio.res +101 -2
- package/src/Envio.res.mjs +2 -3
- package/src/EventConfigBuilder.res +52 -0
- package/src/EventConfigBuilder.res.mjs +32 -0
- package/src/EventUtils.res +2 -2
- package/src/FetchState.res +126 -71
- package/src/FetchState.res.mjs +73 -51
- package/src/GlobalState.res +219 -363
- package/src/GlobalState.res.mjs +314 -491
- package/src/GlobalStateManager.res +49 -59
- package/src/GlobalStateManager.res.mjs +5 -4
- package/src/GlobalStateManager.resi +1 -1
- package/src/HandlerLoader.res +12 -1
- package/src/HandlerLoader.res.mjs +6 -1
- package/src/HandlerRegister.res +9 -9
- package/src/HandlerRegister.res.mjs +9 -9
- package/src/Hasura.res +102 -32
- package/src/Hasura.res.mjs +88 -34
- package/src/InMemoryStore.res +10 -1
- package/src/InMemoryStore.res.mjs +4 -1
- package/src/InMemoryTable.res +83 -136
- package/src/InMemoryTable.res.mjs +57 -86
- package/src/Internal.res +54 -5
- package/src/Internal.res.mjs +2 -8
- package/src/LazyLoader.res +2 -2
- package/src/LazyLoader.res.mjs +3 -3
- package/src/LoadLayer.res +47 -60
- package/src/LoadLayer.res.mjs +28 -50
- package/src/LoadLayer.resi +2 -5
- package/src/LogSelection.res +4 -4
- package/src/LogSelection.res.mjs +5 -7
- package/src/Logging.res +1 -1
- package/src/Main.res +61 -2
- package/src/Main.res.mjs +37 -1
- package/src/Persistence.res +3 -16
- package/src/PgStorage.res +125 -114
- package/src/PgStorage.res.mjs +112 -95
- package/src/Ports.res +5 -0
- package/src/Ports.res.mjs +9 -0
- package/src/Prometheus.res +3 -3
- package/src/Prometheus.res.mjs +4 -4
- package/src/ReorgDetection.res +4 -4
- package/src/ReorgDetection.res.mjs +4 -5
- package/src/SafeCheckpointTracking.res +16 -16
- package/src/SafeCheckpointTracking.res.mjs +2 -2
- package/src/SimulateItems.res +10 -14
- package/src/SimulateItems.res.mjs +5 -2
- package/src/Sink.res +1 -1
- package/src/Sink.res.mjs +1 -2
- package/src/SvmTypes.res +9 -0
- package/src/SvmTypes.res.mjs +14 -0
- package/src/TestIndexer.res +17 -57
- package/src/TestIndexer.res.mjs +14 -48
- package/src/TestIndexerProxyStorage.res +23 -23
- package/src/TestIndexerProxyStorage.res.mjs +12 -15
- package/src/Throttler.res +2 -2
- package/src/Time.res +2 -2
- package/src/Time.res.mjs +2 -2
- package/src/UserContext.res +19 -118
- package/src/UserContext.res.mjs +10 -66
- package/src/Utils.res +15 -15
- package/src/Utils.res.mjs +7 -8
- package/src/adapters/MarkBatchProcessedAdapter.res +5 -0
- package/src/adapters/MarkBatchProcessedAdapter.res.mjs +14 -0
- package/src/bindings/BigDecimal.res +1 -1
- package/src/bindings/BigDecimal.res.mjs +2 -2
- package/src/bindings/ClickHouse.res +8 -6
- package/src/bindings/ClickHouse.res.mjs +5 -5
- package/src/bindings/Hrtime.res +1 -1
- package/src/bindings/Pino.res +2 -2
- package/src/bindings/Pino.res.mjs +3 -4
- package/src/db/EntityFilter.res +410 -0
- package/src/db/EntityFilter.res.mjs +424 -0
- package/src/db/EntityHistory.res +1 -1
- package/src/db/EntityHistory.res.mjs +1 -1
- package/src/db/InternalTable.res +10 -10
- package/src/db/InternalTable.res.mjs +41 -45
- package/src/db/Schema.res +2 -2
- package/src/db/Schema.res.mjs +3 -3
- package/src/db/Table.res +106 -22
- package/src/db/Table.res.mjs +84 -35
- package/src/sources/EventRouter.res +67 -2
- package/src/sources/EventRouter.res.mjs +45 -3
- package/src/sources/Evm.res +0 -7
- package/src/sources/Evm.res.mjs +0 -15
- package/src/sources/EvmChain.res +1 -1
- package/src/sources/EvmChain.res.mjs +1 -2
- package/src/sources/EvmRpcClient.res +42 -0
- package/src/sources/EvmRpcClient.res.mjs +64 -0
- package/src/sources/Fuel.res +0 -7
- package/src/sources/Fuel.res.mjs +0 -15
- package/src/sources/HyperFuelSource.res +5 -4
- package/src/sources/HyperFuelSource.res.mjs +2 -2
- package/src/sources/HyperSyncClient.res +9 -5
- package/src/sources/HyperSyncClient.res.mjs +2 -2
- package/src/sources/HyperSyncHeightStream.res +2 -2
- package/src/sources/HyperSyncHeightStream.res.mjs +2 -2
- package/src/sources/HyperSyncSource.res +10 -9
- package/src/sources/HyperSyncSource.res.mjs +4 -4
- package/src/sources/Rpc.res +1 -5
- package/src/sources/Rpc.res.mjs +1 -9
- package/src/sources/RpcSource.res +57 -21
- package/src/sources/RpcSource.res.mjs +47 -20
- package/src/sources/RpcWebSocketHeightStream.res +1 -1
- package/src/sources/SourceManager.res +3 -2
- package/src/sources/SourceManager.res.mjs +1 -1
- package/src/sources/Svm.res +3 -10
- package/src/sources/Svm.res.mjs +4 -18
- package/src/sources/SvmHyperSyncClient.res +265 -0
- package/src/sources/SvmHyperSyncClient.res.mjs +28 -0
- package/src/sources/SvmHyperSyncSource.res +638 -0
- package/src/sources/SvmHyperSyncSource.res.mjs +557 -0
- package/src/tui/Tui.res +9 -2
- package/src/tui/Tui.res.mjs +18 -3
- package/src/tui/components/BufferedProgressBar.res +2 -2
- package/src/tui/components/TuiData.res +3 -0
- package/svm.schema.json +523 -14
- package/src/TableIndices.res +0 -115
- package/src/TableIndices.res.mjs +0 -144
package/src/TableIndices.res.mjs
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
|
|
3
|
-
import * as Belt_Array from "@rescript/runtime/lib/es6/Belt_Array.js";
|
|
4
|
-
import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
|
|
5
|
-
|
|
6
|
-
function toString(tNonOptional) {
|
|
7
|
-
if (Array.isArray(tNonOptional)) {
|
|
8
|
-
return `[` + Belt_Array.joinWith(tNonOptional, ",", toString) + `]`;
|
|
9
|
-
}
|
|
10
|
-
switch (typeof tNonOptional) {
|
|
11
|
-
case "string" :
|
|
12
|
-
return tNonOptional;
|
|
13
|
-
case "bigint" :
|
|
14
|
-
case "number" :
|
|
15
|
-
return tNonOptional.toString();
|
|
16
|
-
case "object" :
|
|
17
|
-
return tNonOptional.toString();
|
|
18
|
-
case "boolean" :
|
|
19
|
-
if (tNonOptional) {
|
|
20
|
-
return "true";
|
|
21
|
-
} else {
|
|
22
|
-
return "false";
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function toString$1(value) {
|
|
28
|
-
if (value !== undefined) {
|
|
29
|
-
return toString(value);
|
|
30
|
-
} else {
|
|
31
|
-
return "undefined";
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function eq(a, b) {
|
|
36
|
-
if (typeof a === "object" && !Array.isArray(a) && typeof b === "object" && !Array.isArray(b)) {
|
|
37
|
-
return a.isEqualTo(b);
|
|
38
|
-
} else {
|
|
39
|
-
return Primitive_object.equal(a, b);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function gt(a, b) {
|
|
44
|
-
if (typeof a === "object" && !Array.isArray(a) && typeof b === "object" && !Array.isArray(b)) {
|
|
45
|
-
return a.isGreaterThan(b);
|
|
46
|
-
} else {
|
|
47
|
-
return Primitive_object.greaterthan(a, b);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function lt(a, b) {
|
|
52
|
-
if (typeof a === "object" && !Array.isArray(a) && typeof b === "object" && !Array.isArray(b)) {
|
|
53
|
-
return a.isLessThan(b);
|
|
54
|
-
} else {
|
|
55
|
-
return Primitive_object.lessthan(a, b);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
let FieldValue = {
|
|
60
|
-
toString: toString$1,
|
|
61
|
-
eq: eq,
|
|
62
|
-
gt: gt,
|
|
63
|
-
lt: lt
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
let values = [
|
|
67
|
-
"Eq",
|
|
68
|
-
"Gt",
|
|
69
|
-
"Lt"
|
|
70
|
-
];
|
|
71
|
-
|
|
72
|
-
let Operator = {
|
|
73
|
-
values: values
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
function make(fieldName, fieldValue, operator) {
|
|
77
|
-
return {
|
|
78
|
-
fieldName: fieldName,
|
|
79
|
-
fieldValue: fieldValue,
|
|
80
|
-
operator: operator
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function toStringByParts(fieldName, operator, fieldValueHash) {
|
|
85
|
-
return fieldName + `:` + operator + `:` + fieldValueHash;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function toString$2(param) {
|
|
89
|
-
return toStringByParts(param.fieldName, param.operator, toString$1(param.fieldValue));
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function evaluate(self, fieldName, fieldValue) {
|
|
93
|
-
if (self.fieldName !== fieldName) {
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
|
-
let match = self.operator;
|
|
97
|
-
switch (match) {
|
|
98
|
-
case "Eq" :
|
|
99
|
-
return eq(fieldValue, self.fieldValue);
|
|
100
|
-
case "Gt" :
|
|
101
|
-
return gt(fieldValue, self.fieldValue);
|
|
102
|
-
case "Lt" :
|
|
103
|
-
return lt(fieldValue, self.fieldValue);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
let SingleIndex = {
|
|
108
|
-
make: make,
|
|
109
|
-
toStringByParts: toStringByParts,
|
|
110
|
-
toString: toString$2,
|
|
111
|
-
evaluate: evaluate
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
function makeSingle(fieldName, fieldValue, operator) {
|
|
115
|
-
return {
|
|
116
|
-
fieldName: fieldName,
|
|
117
|
-
fieldValue: fieldValue,
|
|
118
|
-
operator: operator
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function getFieldName(index) {
|
|
123
|
-
return index.fieldName;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
let toString$3 = toString$2;
|
|
127
|
-
|
|
128
|
-
let evaluate$1 = evaluate;
|
|
129
|
-
|
|
130
|
-
let Index = {
|
|
131
|
-
makeSingle: makeSingle,
|
|
132
|
-
getFieldName: getFieldName,
|
|
133
|
-
toString: toString$3,
|
|
134
|
-
toStringByParts: toStringByParts,
|
|
135
|
-
evaluate: evaluate$1
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
export {
|
|
139
|
-
FieldValue,
|
|
140
|
-
Operator,
|
|
141
|
-
SingleIndex,
|
|
142
|
-
Index,
|
|
143
|
-
}
|
|
144
|
-
/* No side effect */
|