envio 3.3.0-alpha.2 → 3.3.0-alpha.3
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/index.d.ts +23 -21
- package/package.json +6 -6
- package/src/ChainFetching.res +25 -0
- package/src/ChainFetching.res.mjs +19 -0
- package/src/CrossChainState.res +15 -0
- package/src/CrossChainState.res.mjs +12 -0
- package/src/Ecosystem.res +0 -2
- package/src/EventConfigBuilder.res +42 -18
- package/src/EventConfigBuilder.res.mjs +21 -9
- package/src/EventProcessing.res +53 -37
- package/src/EventProcessing.res.mjs +41 -36
- package/src/FetchState.res +53 -43
- package/src/FetchState.res.mjs +71 -54
- package/src/HandlerLoader.res +10 -1
- package/src/HandlerLoader.res.mjs +15 -8
- package/src/Internal.res +3 -3
- package/src/Internal.res.mjs +1 -1
- package/src/LoadLayer.res +5 -5
- package/src/LoadLayer.res.mjs +6 -6
- package/src/PgStorage.res +4 -4
- package/src/PgStorage.res.mjs +5 -5
- package/src/Prometheus.res +10 -10
- package/src/Prometheus.res.mjs +9 -9
- package/src/PruneStaleHistory.res +2 -2
- package/src/PruneStaleHistory.res.mjs +3 -3
- package/src/Rollback.res +2 -2
- package/src/Rollback.res.mjs +3 -3
- package/src/SimulateItems.res +77 -15
- package/src/SimulateItems.res.mjs +63 -20
- package/src/TestIndexer.res +48 -36
- package/src/TestIndexer.res.mjs +35 -28
- package/src/bindings/Performance.res +7 -0
- package/src/bindings/Performance.res.mjs +21 -0
- package/src/bindings/Performance.resi +7 -0
- package/src/sources/EventRouter.res +17 -21
- package/src/sources/EventRouter.res.mjs +6 -9
- package/src/sources/Evm.res +1 -35
- package/src/sources/Evm.res.mjs +2 -37
- package/src/sources/Fuel.res +0 -2
- package/src/sources/Fuel.res.mjs +0 -6
- package/src/sources/HyperFuelSource.res +10 -11
- package/src/sources/HyperFuelSource.res.mjs +11 -11
- package/src/sources/HyperSync.res +3 -0
- package/src/sources/HyperSync.res.mjs +1 -0
- package/src/sources/HyperSync.resi +1 -0
- package/src/sources/HyperSyncClient.res +5 -1
- package/src/sources/HyperSyncSource.res +42 -24
- package/src/sources/HyperSyncSource.res.mjs +30 -26
- package/src/sources/RpcSource.res +7 -8
- package/src/sources/RpcSource.res.mjs +8 -8
- package/src/sources/SimulateSource.res +1 -1
- package/src/sources/Source.res +1 -1
- package/src/sources/SourceManager.res +17 -16
- package/src/sources/SourceManager.res.mjs +10 -15
- package/src/sources/Svm.res +4 -10
- package/src/sources/Svm.res.mjs +5 -12
- package/src/sources/SvmHyperSyncSource.res +24 -18
- package/src/sources/SvmHyperSyncSource.res.mjs +22 -15
- package/src/sources/TransactionStore.res +59 -42
- package/src/sources/TransactionStore.res.mjs +21 -1
- package/svm.schema.json +30 -37
- package/src/bindings/Hrtime.res +0 -58
- package/src/bindings/Hrtime.res.mjs +0 -90
- package/src/bindings/Hrtime.resi +0 -30
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function nanoToMilli(nano) {
|
|
5
|
-
return nano / 1000000;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
function secToMilli(sec) {
|
|
9
|
-
return sec * 1000;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function nanoToTimeTuple(nano) {
|
|
13
|
-
let seconds = Math.floor(nano / 1000000000);
|
|
14
|
-
let nanos = nano % 1000000000;
|
|
15
|
-
return [
|
|
16
|
-
seconds,
|
|
17
|
-
nanos
|
|
18
|
-
];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function timeElapsedToNewRef(elapsed, ref) {
|
|
22
|
-
let match = nanoToTimeTuple(elapsed[1] + ref[1]);
|
|
23
|
-
return [
|
|
24
|
-
elapsed[0] + ref[0] + match[0],
|
|
25
|
-
match[1]
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function toMillis(param) {
|
|
30
|
-
return param[0] * 1000 + param[1] / 1000000;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function toSeconds(param) {
|
|
34
|
-
return param[0] + param[1] / 1000000000;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
let toSecondsFloat = toSeconds;
|
|
38
|
-
|
|
39
|
-
function toInt(float) {
|
|
40
|
-
return float | 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function floatFromMillis(v) {
|
|
44
|
-
return v;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function floatFromSeconds(v) {
|
|
48
|
-
return v;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function millisBetween(from, to) {
|
|
52
|
-
return (toMillis(to) | 0) - (toMillis(from) | 0) | 0;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function secondsBetween(from, to) {
|
|
56
|
-
return toSeconds(to) - toSeconds(from);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function makeTimer(prim) {
|
|
60
|
-
return process.hrtime();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function timeSince(prim) {
|
|
64
|
-
return process.hrtime(prim);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
let intFromMillis = toInt;
|
|
68
|
-
|
|
69
|
-
let intFromNanos = toInt;
|
|
70
|
-
|
|
71
|
-
let intFromSeconds = toInt;
|
|
72
|
-
|
|
73
|
-
export {
|
|
74
|
-
makeTimer,
|
|
75
|
-
timeSince,
|
|
76
|
-
nanoToMilli,
|
|
77
|
-
secToMilli,
|
|
78
|
-
timeElapsedToNewRef,
|
|
79
|
-
toMillis,
|
|
80
|
-
toSeconds,
|
|
81
|
-
toSecondsFloat,
|
|
82
|
-
intFromMillis,
|
|
83
|
-
intFromNanos,
|
|
84
|
-
intFromSeconds,
|
|
85
|
-
floatFromMillis,
|
|
86
|
-
floatFromSeconds,
|
|
87
|
-
millisBetween,
|
|
88
|
-
secondsBetween,
|
|
89
|
-
}
|
|
90
|
-
/* No side effect */
|
package/src/bindings/Hrtime.resi
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
type seconds
|
|
2
|
-
type milliseconds
|
|
3
|
-
type nanoseconds
|
|
4
|
-
|
|
5
|
-
type timeTuple = (seconds, nanoseconds)
|
|
6
|
-
|
|
7
|
-
type timeRef
|
|
8
|
-
|
|
9
|
-
type timeElapsed = timeTuple
|
|
10
|
-
|
|
11
|
-
let makeTimer: unit => timeRef
|
|
12
|
-
|
|
13
|
-
let timeSince: timeRef => timeElapsed
|
|
14
|
-
|
|
15
|
-
let nanoToMilli: nanoseconds => milliseconds
|
|
16
|
-
let secToMilli: seconds => milliseconds
|
|
17
|
-
|
|
18
|
-
let timeElapsedToNewRef: (timeElapsed, timeRef) => timeRef
|
|
19
|
-
let toMillis: timeElapsed => milliseconds
|
|
20
|
-
let toSeconds: timeElapsed => seconds
|
|
21
|
-
let toSecondsFloat: timeElapsed => float
|
|
22
|
-
|
|
23
|
-
let intFromMillis: milliseconds => int
|
|
24
|
-
let intFromNanos: nanoseconds => int
|
|
25
|
-
let intFromSeconds: seconds => int
|
|
26
|
-
let floatFromMillis: milliseconds => float
|
|
27
|
-
let floatFromSeconds: seconds => float
|
|
28
|
-
|
|
29
|
-
let millisBetween: (~from: timeRef, ~to: timeRef) => int
|
|
30
|
-
let secondsBetween: (~from: timeRef, ~to: timeRef) => float
|