envio 2.32.7 → 2.32.8
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/package.json +5 -5
- package/src/sources/RpcSource.res +14 -15
- package/src/sources/RpcSource.res.js +15 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "envio",
|
|
3
|
-
"version": "v2.32.
|
|
3
|
+
"version": "v2.32.8",
|
|
4
4
|
"description": "A latency and sync speed optimized, developer friendly blockchain data indexer.",
|
|
5
5
|
"bin": "./bin.js",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://envio.dev",
|
|
27
27
|
"optionalDependencies": {
|
|
28
|
-
"envio-linux-x64": "v2.32.
|
|
29
|
-
"envio-linux-arm64": "v2.32.
|
|
30
|
-
"envio-darwin-x64": "v2.32.
|
|
31
|
-
"envio-darwin-arm64": "v2.32.
|
|
28
|
+
"envio-linux-x64": "v2.32.8",
|
|
29
|
+
"envio-linux-arm64": "v2.32.8",
|
|
30
|
+
"envio-darwin-x64": "v2.32.8",
|
|
31
|
+
"envio-darwin-arm64": "v2.32.8"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@elastic/ecs-pino-format": "1.4.0",
|
|
@@ -43,20 +43,19 @@ let rec getKnownBlockWithBackoff = async (
|
|
|
43
43
|
~lowercaseAddresses,
|
|
44
44
|
)
|
|
45
45
|
| result =>
|
|
46
|
-
if
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
result
|
|
46
|
+
// NOTE: this is wasteful if these fields are not selected in the users config.
|
|
47
|
+
// There might be a better way to do this based on the block schema.
|
|
48
|
+
// However this is not extremely expensive and good enough for now (only on rpc sync also).
|
|
49
|
+
// Mutation would be cheaper,
|
|
50
|
+
// BUT "result" is an Ethers.js Block object,
|
|
51
|
+
// which has the fields as readonly.
|
|
52
|
+
{
|
|
53
|
+
...result,
|
|
54
|
+
miner: if lowercaseAddresses {
|
|
55
|
+
result.miner->Address.Evm.fromAddressLowercaseOrThrow
|
|
56
|
+
} else {
|
|
57
|
+
result.miner->Address.Evm.fromAddressOrThrow
|
|
58
|
+
},
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
let getSuggestedBlockIntervalFromExn = {
|
|
@@ -699,7 +698,7 @@ let make = (
|
|
|
699
698
|
let routedAddress = if lowercaseAddresses {
|
|
700
699
|
log.address->Address.Evm.fromAddressLowercaseOrThrow
|
|
701
700
|
} else {
|
|
702
|
-
log.address
|
|
701
|
+
log.address->Address.Evm.fromAddressOrThrow
|
|
703
702
|
}
|
|
704
703
|
|
|
705
704
|
switch eventRouter->EventRouter.get(
|
|
@@ -57,24 +57,20 @@ async function getKnownBlockWithBackoff(provider, sourceName, chain, blockNumber
|
|
|
57
57
|
await Time.resolvePromiseAfterDelay(backoffMsOnFailure);
|
|
58
58
|
return await getKnownBlockWithBackoff(provider, sourceName, chain, blockNumber, (backoffMsOnFailure << 1), lowercaseAddresses);
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
};
|
|
75
|
-
} else {
|
|
76
|
-
return result;
|
|
77
|
-
}
|
|
60
|
+
return {
|
|
61
|
+
_difficulty: result._difficulty,
|
|
62
|
+
difficulty: result.difficulty,
|
|
63
|
+
extraData: result.extraData,
|
|
64
|
+
gasLimit: result.gasLimit,
|
|
65
|
+
gasUsed: result.gasUsed,
|
|
66
|
+
hash: result.hash,
|
|
67
|
+
miner: lowercaseAddresses ? Address.Evm.fromAddressLowercaseOrThrow(result.miner) : Address.Evm.fromAddressOrThrow(result.miner),
|
|
68
|
+
nonce: result.nonce,
|
|
69
|
+
number: result.number,
|
|
70
|
+
parentHash: result.parentHash,
|
|
71
|
+
timestamp: result.timestamp,
|
|
72
|
+
transactions: result.transactions
|
|
73
|
+
};
|
|
78
74
|
}
|
|
79
75
|
|
|
80
76
|
var suggestedRangeRegExp = /retry with the range (\d+)-(\d+)/;
|
|
@@ -652,7 +648,7 @@ function make(param) {
|
|
|
652
648
|
var maybeDecodedEvent = param[1];
|
|
653
649
|
var log = param[0];
|
|
654
650
|
var topic0 = Belt_Option.getWithDefault(Belt_Array.get(log.topics, 0), "0x0");
|
|
655
|
-
var routedAddress = lowercaseAddresses ? Address.Evm.fromAddressLowercaseOrThrow(log.address) : log.address;
|
|
651
|
+
var routedAddress = lowercaseAddresses ? Address.Evm.fromAddressLowercaseOrThrow(log.address) : Address.Evm.fromAddressOrThrow(log.address);
|
|
656
652
|
var eventConfig = EventRouter.get(eventRouter, EventRouter.getEvmEventId(topic0, log.topics.length), routedAddress, log.blockNumber, indexingContracts);
|
|
657
653
|
if (eventConfig !== undefined && !(maybeDecodedEvent === null || maybeDecodedEvent === undefined)) {
|
|
658
654
|
return Caml_option.some((async function () {
|