envio 3.0.0-alpha.1 → 3.0.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/evm.schema.json +63 -48
- package/fuel.schema.json +35 -31
- package/index.d.ts +1 -0
- package/package.json +15 -11
- package/rescript.json +1 -1
- package/src/Batch.res.mjs +1 -1
- package/src/Benchmark.res +394 -0
- package/src/Benchmark.res.mjs +398 -0
- package/src/ChainFetcher.res +459 -0
- package/src/ChainFetcher.res.mjs +281 -0
- package/src/ChainManager.res +179 -0
- package/src/ChainManager.res.mjs +139 -0
- package/src/Config.res +18 -7
- package/src/Config.res.mjs +28 -7
- package/src/Ecosystem.res +25 -0
- package/src/Ecosystem.res.mjs +29 -0
- package/src/Env.res +243 -0
- package/src/Env.res.mjs +270 -0
- package/src/Envio.gen.ts +9 -1
- package/src/Envio.res +12 -9
- package/src/EventProcessing.res +476 -0
- package/src/EventProcessing.res.mjs +341 -0
- package/src/EventRegister.res +4 -15
- package/src/EventRegister.res.mjs +3 -9
- package/src/EventRegister.resi +2 -8
- package/src/FetchState.res +54 -29
- package/src/FetchState.res.mjs +62 -35
- package/src/GlobalState.res +1169 -0
- package/src/GlobalState.res.mjs +1196 -0
- package/src/Internal.gen.ts +3 -14
- package/src/Internal.res +4 -12
- package/src/LoadLayer.res +444 -0
- package/src/LoadLayer.res.mjs +296 -0
- package/src/LoadLayer.resi +32 -0
- package/src/Prometheus.res +8 -8
- package/src/Prometheus.res.mjs +10 -10
- package/src/ReorgDetection.res +6 -10
- package/src/ReorgDetection.res.mjs +6 -6
- package/src/UserContext.res +356 -0
- package/src/UserContext.res.mjs +238 -0
- package/src/bindings/DateFns.res +71 -0
- package/src/bindings/DateFns.res.mjs +22 -0
- package/src/bindings/EventSource.res +13 -0
- package/src/bindings/EventSource.res.mjs +2 -0
- package/src/sources/Evm.res +87 -0
- package/src/sources/Evm.res.mjs +105 -0
- package/src/sources/EvmChain.res +95 -0
- package/src/sources/EvmChain.res.mjs +61 -0
- package/src/sources/Fuel.res +19 -34
- package/src/sources/Fuel.res.mjs +34 -16
- package/src/sources/FuelSDK.res +37 -0
- package/src/sources/FuelSDK.res.mjs +29 -0
- package/src/sources/HyperFuel.res +2 -2
- package/src/sources/HyperFuel.resi +1 -1
- package/src/sources/HyperFuelClient.res +2 -2
- package/src/sources/HyperFuelSource.res +8 -8
- package/src/sources/HyperFuelSource.res.mjs +5 -5
- package/src/sources/HyperSyncHeightStream.res +179 -0
- package/src/sources/HyperSyncHeightStream.res.mjs +127 -0
- package/src/sources/HyperSyncSource.res +7 -65
- package/src/sources/HyperSyncSource.res.mjs +10 -66
- package/src/sources/RpcSource.res +4 -4
- package/src/sources/RpcSource.res.mjs +3 -3
- package/src/sources/Solana.res +59 -0
- package/src/sources/Solana.res.mjs +79 -0
- package/src/sources/Source.res +2 -2
- package/src/sources/SourceManager.res +24 -32
- package/src/sources/SourceManager.res.mjs +20 -20
- package/src/sources/SourceManager.resi +4 -5
- package/src/Platform.res +0 -140
- package/src/Platform.res.mjs +0 -170
package/src/Platform.res.mjs
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var cleanUpRawEventFieldsInPlace = (fields => {
|
|
5
|
-
delete fields.hash
|
|
6
|
-
delete fields.number
|
|
7
|
-
delete fields.timestamp
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
var Evm = {
|
|
11
|
-
cleanUpRawEventFieldsInPlace: cleanUpRawEventFieldsInPlace
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
var evm_blockFields = [
|
|
15
|
-
"number",
|
|
16
|
-
"timestamp",
|
|
17
|
-
"hash",
|
|
18
|
-
"parentHash",
|
|
19
|
-
"nonce",
|
|
20
|
-
"sha3Uncles",
|
|
21
|
-
"logsBloom",
|
|
22
|
-
"transactionsRoot",
|
|
23
|
-
"stateRoot",
|
|
24
|
-
"receiptsRoot",
|
|
25
|
-
"miner",
|
|
26
|
-
"difficulty",
|
|
27
|
-
"totalDifficulty",
|
|
28
|
-
"extraData",
|
|
29
|
-
"size",
|
|
30
|
-
"gasLimit",
|
|
31
|
-
"gasUsed",
|
|
32
|
-
"uncles",
|
|
33
|
-
"baseFeePerGas",
|
|
34
|
-
"blobGasUsed",
|
|
35
|
-
"excessBlobGas",
|
|
36
|
-
"parentBeaconBlockRoot",
|
|
37
|
-
"withdrawalsRoot",
|
|
38
|
-
"l1BlockNumber",
|
|
39
|
-
"sendCount",
|
|
40
|
-
"sendRoot",
|
|
41
|
-
"mixHash"
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
var evm_transactionFields = [
|
|
45
|
-
"transactionIndex",
|
|
46
|
-
"hash",
|
|
47
|
-
"from",
|
|
48
|
-
"to",
|
|
49
|
-
"gas",
|
|
50
|
-
"gasPrice",
|
|
51
|
-
"maxPriorityFeePerGas",
|
|
52
|
-
"maxFeePerGas",
|
|
53
|
-
"cumulativeGasUsed",
|
|
54
|
-
"effectiveGasPrice",
|
|
55
|
-
"gasUsed",
|
|
56
|
-
"input",
|
|
57
|
-
"nonce",
|
|
58
|
-
"value",
|
|
59
|
-
"v",
|
|
60
|
-
"r",
|
|
61
|
-
"s",
|
|
62
|
-
"contractAddress",
|
|
63
|
-
"logsBloom",
|
|
64
|
-
"root",
|
|
65
|
-
"status",
|
|
66
|
-
"yParity",
|
|
67
|
-
"chainId",
|
|
68
|
-
"maxFeePerBlobGas",
|
|
69
|
-
"blobVersionedHashes",
|
|
70
|
-
"type",
|
|
71
|
-
"l1Fee",
|
|
72
|
-
"l1GasPrice",
|
|
73
|
-
"l1GasUsed",
|
|
74
|
-
"l1FeeScalar",
|
|
75
|
-
"gasUsedForL1",
|
|
76
|
-
"accessList",
|
|
77
|
-
"authorizationList"
|
|
78
|
-
];
|
|
79
|
-
|
|
80
|
-
function evm_getNumber(prim) {
|
|
81
|
-
return prim.number;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function evm_getTimestamp(prim) {
|
|
85
|
-
return prim.timestamp;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function evm_getId(prim) {
|
|
89
|
-
return prim.hash;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
var evm = {
|
|
93
|
-
name: "evm",
|
|
94
|
-
blockFields: evm_blockFields,
|
|
95
|
-
transactionFields: evm_transactionFields,
|
|
96
|
-
blockNumberName: "number",
|
|
97
|
-
blockTimestampName: "timestamp",
|
|
98
|
-
blockHashName: "hash",
|
|
99
|
-
getNumber: evm_getNumber,
|
|
100
|
-
getTimestamp: evm_getTimestamp,
|
|
101
|
-
getId: evm_getId,
|
|
102
|
-
cleanUpRawEventFieldsInPlace: cleanUpRawEventFieldsInPlace
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
var cleanUpRawEventFieldsInPlace$1 = (fields => {
|
|
106
|
-
delete fields.id
|
|
107
|
-
delete fields.height
|
|
108
|
-
delete fields.time
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
var Fuel = {
|
|
112
|
-
cleanUpRawEventFieldsInPlace: cleanUpRawEventFieldsInPlace$1
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
var fuel_blockFields = [
|
|
116
|
-
"id",
|
|
117
|
-
"height",
|
|
118
|
-
"time"
|
|
119
|
-
];
|
|
120
|
-
|
|
121
|
-
var fuel_transactionFields = ["id"];
|
|
122
|
-
|
|
123
|
-
function fuel_getNumber(prim) {
|
|
124
|
-
return prim.height;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function fuel_getTimestamp(prim) {
|
|
128
|
-
return prim.time;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
function fuel_getId(prim) {
|
|
132
|
-
return prim.id;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
var fuel = {
|
|
136
|
-
name: "fuel",
|
|
137
|
-
blockFields: fuel_blockFields,
|
|
138
|
-
transactionFields: fuel_transactionFields,
|
|
139
|
-
blockNumberName: "height",
|
|
140
|
-
blockTimestampName: "time",
|
|
141
|
-
blockHashName: "id",
|
|
142
|
-
getNumber: fuel_getNumber,
|
|
143
|
-
getTimestamp: fuel_getTimestamp,
|
|
144
|
-
getId: fuel_getId,
|
|
145
|
-
cleanUpRawEventFieldsInPlace: cleanUpRawEventFieldsInPlace$1
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
function fromName(name) {
|
|
149
|
-
if (name === "evm") {
|
|
150
|
-
return evm;
|
|
151
|
-
} else {
|
|
152
|
-
return fuel;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function makeBlockEvent(blockNumber, platform) {
|
|
157
|
-
var blockEvent = {};
|
|
158
|
-
blockEvent[platform.blockNumberName] = blockNumber;
|
|
159
|
-
return blockEvent;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export {
|
|
163
|
-
Evm ,
|
|
164
|
-
evm ,
|
|
165
|
-
Fuel ,
|
|
166
|
-
fuel ,
|
|
167
|
-
fromName ,
|
|
168
|
-
makeBlockEvent ,
|
|
169
|
-
}
|
|
170
|
-
/* No side effect */
|