envio 2.31.1 → 2.32.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/index.d.ts +32 -0
- package/package.json +5 -5
- package/src/Batch.res +22 -2
- package/src/Batch.res.js +15 -0
- package/src/Config.res +124 -0
- package/src/Config.res.js +84 -0
- package/src/Envio.gen.ts +21 -0
- package/src/Envio.res +79 -14
- package/src/Envio.res.js +52 -15
- package/src/EventRegister.res +2 -2
- package/src/EventRegister.resi +2 -2
- package/src/InMemoryTable.res +356 -0
- package/src/InMemoryTable.res.js +401 -0
- package/src/Indexer.res +5 -0
- package/src/Internal.res +16 -4
- package/src/Persistence.res +8 -3
- package/src/Persistence.res.js +3 -2
- package/src/PgStorage.res +1 -7
- package/src/PgStorage.res.js +1 -2
- package/src/Prometheus.res +47 -9
- package/src/Prometheus.res.js +42 -14
- package/src/TableIndices.res +110 -0
- package/src/TableIndices.res.js +143 -0
- package/src/Types.ts +5 -0
- package/src/bindings/Lodash.res +3 -0
- package/src/bindings/Lodash.res.js +11 -0
- package/src/bindings/vendored-lodash-fns.js +1441 -0
- package/src/db/InternalTable.res +2 -2
- package/src/sources/RpcSource.res +2 -2
- package/src/InternalConfig.res +0 -48
- /package/src/{InternalConfig.res.js → Indexer.res.js} +0 -0
package/src/db/InternalTable.res
CHANGED
|
@@ -165,7 +165,7 @@ module Chains = {
|
|
|
165
165
|
],
|
|
166
166
|
)
|
|
167
167
|
|
|
168
|
-
let initialFromConfig = (chainConfig:
|
|
168
|
+
let initialFromConfig = (chainConfig: Config.chain) => {
|
|
169
169
|
{
|
|
170
170
|
id: chainConfig.id,
|
|
171
171
|
startBlock: chainConfig.startBlock,
|
|
@@ -182,7 +182,7 @@ module Chains = {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
let makeInitialValuesQuery = (~pgSchema, ~chainConfigs: array<
|
|
185
|
+
let makeInitialValuesQuery = (~pgSchema, ~chainConfigs: array<Config.chain>) => {
|
|
186
186
|
if chainConfigs->Array.length === 0 {
|
|
187
187
|
None
|
|
188
188
|
} else {
|
|
@@ -218,7 +218,7 @@ let getNextPage = (
|
|
|
218
218
|
~addresses,
|
|
219
219
|
~topicQuery,
|
|
220
220
|
~loadBlock,
|
|
221
|
-
~syncConfig as sc:
|
|
221
|
+
~syncConfig as sc: Config.sourceSync,
|
|
222
222
|
~provider,
|
|
223
223
|
~mutSuggestedBlockIntervals,
|
|
224
224
|
~partitionId,
|
|
@@ -465,7 +465,7 @@ let sanitizeUrl = (url: string) => {
|
|
|
465
465
|
|
|
466
466
|
type options = {
|
|
467
467
|
sourceFor: Source.sourceFor,
|
|
468
|
-
syncConfig:
|
|
468
|
+
syncConfig: Config.sourceSync,
|
|
469
469
|
url: string,
|
|
470
470
|
chain: ChainMap.Chain.t,
|
|
471
471
|
contracts: array<Internal.evmContractConfig>,
|
package/src/InternalConfig.res
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// TODO: rename the file to Config.res after finishing the migration from codegen
|
|
2
|
-
// And turn it into PublicConfig instead
|
|
3
|
-
// For internal use we should create Indexer.res with a stateful type
|
|
4
|
-
|
|
5
|
-
type ecosystem = | @as("evm") Evm | @as("fuel") Fuel
|
|
6
|
-
|
|
7
|
-
type sourceSyncOptions = {
|
|
8
|
-
initialBlockInterval?: int,
|
|
9
|
-
backoffMultiplicative?: float,
|
|
10
|
-
accelerationAdditive?: int,
|
|
11
|
-
intervalCeiling?: int,
|
|
12
|
-
backoffMillis?: int,
|
|
13
|
-
queryTimeoutMillis?: int,
|
|
14
|
-
fallbackStallTimeout?: int,
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
type historyFlag = FullHistory | MinHistory
|
|
18
|
-
type rollbackFlag = RollbackOnReorg | NoRollback
|
|
19
|
-
type historyConfig = {rollbackFlag: rollbackFlag, historyFlag: historyFlag}
|
|
20
|
-
|
|
21
|
-
type contract = {
|
|
22
|
-
name: string,
|
|
23
|
-
abi: EvmTypes.Abi.t,
|
|
24
|
-
addresses: array<Address.t>,
|
|
25
|
-
events: array<Internal.eventConfig>,
|
|
26
|
-
startBlock: option<int>,
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
type chain = {
|
|
30
|
-
id: int,
|
|
31
|
-
startBlock: int,
|
|
32
|
-
endBlock?: int,
|
|
33
|
-
maxReorgDepth: int,
|
|
34
|
-
contracts: array<contract>,
|
|
35
|
-
sources: array<Source.t>,
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
type sourceSync = {
|
|
39
|
-
initialBlockInterval: int,
|
|
40
|
-
backoffMultiplicative: float,
|
|
41
|
-
accelerationAdditive: int,
|
|
42
|
-
intervalCeiling: int,
|
|
43
|
-
backoffMillis: int,
|
|
44
|
-
queryTimeoutMillis: int,
|
|
45
|
-
fallbackStallTimeout: int,
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
type multichain = | @as("ordered") Ordered | @as("unordered") Unordered
|
|
File without changes
|