@sentio/sdk 3.9.0-rc.9 → 4.0.0-rc.10
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/lib/aptos/aptos-plugin.d.ts +1 -1
- package/lib/aptos/aptos-plugin.d.ts.map +1 -1
- package/lib/aptos/aptos-plugin.js +43 -42
- package/lib/aptos/aptos-plugin.js.map +1 -1
- package/lib/aptos/aptos-processor.d.ts +4 -4
- package/lib/aptos/aptos-processor.d.ts.map +1 -1
- package/lib/aptos/aptos-processor.js +25 -25
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/aptos/aptos-resource-processor-template.d.ts +1 -1
- package/lib/aptos/aptos-resource-processor-template.d.ts.map +1 -1
- package/lib/aptos/aptos-resource-processor-template.js +10 -5
- package/lib/aptos/aptos-resource-processor-template.js.map +1 -1
- package/lib/aptos/context.d.ts +1 -1
- package/lib/aptos/context.d.ts.map +1 -1
- package/lib/aptos/context.js +11 -9
- package/lib/aptos/context.js.map +1 -1
- package/lib/aptos/data.d.ts +4 -4
- package/lib/aptos/data.d.ts.map +1 -1
- package/lib/aptos/network.js +1 -1
- package/lib/aptos/network.js.map +1 -1
- package/lib/core/base-context.d.ts +3 -2
- package/lib/core/base-context.d.ts.map +1 -1
- package/lib/core/base-context.js +12 -11
- package/lib/core/base-context.js.map +1 -1
- package/lib/core/core-plugin.d.ts.map +1 -1
- package/lib/core/core-plugin.js +6 -4
- package/lib/core/core-plugin.js.map +1 -1
- package/lib/core/event-logger.d.ts +10 -2
- package/lib/core/event-logger.d.ts.map +1 -1
- package/lib/core/event-logger.js +42 -27
- package/lib/core/event-logger.js.map +1 -1
- package/lib/core/exporter.d.ts.map +1 -1
- package/lib/core/exporter.js +5 -3
- package/lib/core/exporter.js.map +1 -1
- package/lib/core/handler-options.d.ts +1 -1
- package/lib/core/handler-options.d.ts.map +1 -1
- package/lib/core/handler-register.d.ts +1 -1
- package/lib/core/handler-register.d.ts.map +1 -1
- package/lib/core/handler-register.js +2 -2
- package/lib/core/handler-register.js.map +1 -1
- package/lib/core/meter.d.ts +4 -3
- package/lib/core/meter.d.ts.map +1 -1
- package/lib/core/meter.js +5 -4
- package/lib/core/meter.js.map +1 -1
- package/lib/core/normalization.d.ts +1 -1
- package/lib/core/normalization.d.ts.map +1 -1
- package/lib/core/normalization.js +41 -31
- package/lib/core/normalization.js.map +1 -1
- package/lib/core/numberish.d.ts +1 -1
- package/lib/core/numberish.d.ts.map +1 -1
- package/lib/core/numberish.js +35 -30
- package/lib/core/numberish.js.map +1 -1
- package/lib/core/partition-handler-manager.d.ts +1 -1
- package/lib/core/partition-handler-manager.d.ts.map +1 -1
- package/lib/core/partition-handler-manager.js +10 -9
- package/lib/core/partition-handler-manager.js.map +1 -1
- package/lib/cosmos/context.d.ts.map +1 -1
- package/lib/cosmos/context.js +4 -2
- package/lib/cosmos/context.js.map +1 -1
- package/lib/cosmos/cosmos-plugin.d.ts.map +1 -1
- package/lib/cosmos/cosmos-plugin.js +11 -10
- package/lib/cosmos/cosmos-plugin.js.map +1 -1
- package/lib/cosmos/cosmos-processor.js.map +1 -1
- package/lib/eth/abi-decoder/decode-worker.js +2 -2
- package/lib/eth/abi-decoder/decode-worker.js.map +1 -1
- package/lib/eth/account-processor.d.ts +2 -2
- package/lib/eth/account-processor.d.ts.map +1 -1
- package/lib/eth/account-processor.js +10 -9
- package/lib/eth/account-processor.js.map +1 -1
- package/lib/eth/base-processor-template.d.ts +3 -3
- package/lib/eth/base-processor-template.d.ts.map +1 -1
- package/lib/eth/base-processor-template.js +14 -8
- package/lib/eth/base-processor-template.js.map +1 -1
- package/lib/eth/base-processor.d.ts +3 -3
- package/lib/eth/base-processor.d.ts.map +1 -1
- package/lib/eth/base-processor.js +53 -46
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +48 -46
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.js +18 -16
- package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.js +38 -36
- package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.js +20 -18
- package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.js +30 -28
- package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.js +24 -22
- package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
- package/lib/eth/codegen/file.d.ts.map +1 -1
- package/lib/eth/codegen/file.js +2 -1
- package/lib/eth/codegen/file.js.map +1 -1
- package/lib/eth/codegen/function-calls.js +1 -1
- package/lib/eth/context.d.ts +1 -1
- package/lib/eth/context.d.ts.map +1 -1
- package/lib/eth/context.js +17 -11
- package/lib/eth/context.js.map +1 -1
- package/lib/eth/eth-plugin.d.ts.map +1 -1
- package/lib/eth/eth-plugin.js +85 -76
- package/lib/eth/eth-plugin.js.map +1 -1
- package/lib/eth/eth.d.ts +6 -6
- package/lib/eth/eth.d.ts.map +1 -1
- package/lib/eth/eth.js +39 -26
- package/lib/eth/eth.js.map +1 -1
- package/lib/eth/generic-processor.js +1 -1
- package/lib/eth/generic-processor.js.map +1 -1
- package/lib/eth/index.d.ts +2 -2
- package/lib/eth/index.d.ts.map +1 -1
- package/lib/eth/index.js +1 -2
- package/lib/eth/index.js.map +1 -1
- package/lib/eth/provider.d.ts +13 -0
- package/lib/eth/provider.d.ts.map +1 -0
- package/lib/eth/provider.js +164 -0
- package/lib/eth/provider.js.map +1 -0
- package/lib/fuel/asset-processor.d.ts +2 -2
- package/lib/fuel/asset-processor.d.ts.map +1 -1
- package/lib/fuel/asset-processor.js +5 -3
- package/lib/fuel/asset-processor.js.map +1 -1
- package/lib/fuel/context.d.ts.map +1 -1
- package/lib/fuel/context.js +4 -2
- package/lib/fuel/context.js.map +1 -1
- package/lib/fuel/fuel-plugin.d.ts.map +1 -1
- package/lib/fuel/fuel-plugin.js +41 -53
- package/lib/fuel/fuel-plugin.js.map +1 -1
- package/lib/fuel/fuel-processor-template.d.ts.map +1 -1
- package/lib/fuel/fuel-processor-template.js +9 -5
- package/lib/fuel/fuel-processor-template.js.map +1 -1
- package/lib/fuel/fuel-processor.d.ts.map +1 -1
- package/lib/fuel/fuel-processor.js +30 -20
- package/lib/fuel/fuel-processor.js.map +1 -1
- package/lib/fuel/global-processor.d.ts.map +1 -1
- package/lib/fuel/global-processor.js +2 -1
- package/lib/fuel/global-processor.js.map +1 -1
- package/lib/fuel/network.js +5 -5
- package/lib/fuel/network.js.map +1 -1
- package/lib/fuel/types.d.ts +10 -4
- package/lib/fuel/types.d.ts.map +1 -1
- package/lib/fuel/types.js.map +1 -1
- package/lib/iota/context.d.ts +1 -1
- package/lib/iota/context.d.ts.map +1 -1
- package/lib/iota/context.js +8 -6
- package/lib/iota/context.js.map +1 -1
- package/lib/iota/iota-object-processor-template.d.ts +1 -1
- package/lib/iota/iota-object-processor-template.d.ts.map +1 -1
- package/lib/iota/iota-object-processor-template.js +17 -12
- package/lib/iota/iota-object-processor-template.js.map +1 -1
- package/lib/iota/iota-object-processor.d.ts +1 -1
- package/lib/iota/iota-object-processor.d.ts.map +1 -1
- package/lib/iota/iota-object-processor.js +23 -16
- package/lib/iota/iota-object-processor.js.map +1 -1
- package/lib/iota/iota-plugin-part.d.ts +1 -1
- package/lib/iota/iota-plugin-part.d.ts.map +1 -1
- package/lib/iota/iota-plugin-part.js +16 -15
- package/lib/iota/iota-plugin-part.js.map +1 -1
- package/lib/iota/iota-processor.d.ts +3 -3
- package/lib/iota/iota-processor.d.ts.map +1 -1
- package/lib/iota/iota-processor.js +20 -19
- package/lib/iota/iota-processor.js.map +1 -1
- package/lib/iota/network.js +6 -6
- package/lib/iota/network.js.map +1 -1
- package/lib/move/filter.d.ts +1 -1
- package/lib/move/filter.d.ts.map +1 -1
- package/lib/move/index.d.ts +1 -1
- package/lib/move/index.d.ts.map +1 -1
- package/lib/move/index.js +0 -1
- package/lib/move/index.js.map +1 -1
- package/lib/solana/builtin/types.d.ts +4 -4
- package/lib/solana/codegen/codegen.d.ts +1 -1
- package/lib/solana/codegen/codegen.d.ts.map +1 -1
- package/lib/solana/codegen/codegen.js +2 -2
- package/lib/solana/codegen/codegen.js.map +1 -1
- package/lib/solana/solana-context.d.ts.map +1 -1
- package/lib/solana/solana-context.js +4 -3
- package/lib/solana/solana-context.js.map +1 -1
- package/lib/solana/solana-plugin.d.ts.map +1 -1
- package/lib/solana/solana-plugin.js +19 -18
- package/lib/solana/solana-plugin.js.map +1 -1
- package/lib/solana/solana-processor.d.ts +2 -2
- package/lib/solana/solana-processor.d.ts.map +1 -1
- package/lib/solana/solana-processor.js +8 -3
- package/lib/solana/solana-processor.js.map +1 -1
- package/lib/store/cache.d.ts.map +1 -1
- package/lib/store/cache.js +22 -17
- package/lib/store/cache.js.map +1 -1
- package/lib/store/codegen.js +2 -2
- package/lib/store/codegen.js.map +1 -1
- package/lib/store/convert.d.ts +1 -1
- package/lib/store/convert.d.ts.map +1 -1
- package/lib/store/convert.js +67 -104
- package/lib/store/convert.js.map +1 -1
- package/lib/store/decorators.d.ts +1 -1
- package/lib/store/decorators.d.ts.map +1 -1
- package/lib/store/decorators.js +3 -1
- package/lib/store/decorators.js.map +1 -1
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js +24 -16
- package/lib/store/store.js.map +1 -1
- package/lib/store/types.js +24 -32
- package/lib/store/types.js.map +1 -1
- package/lib/store/util.d.ts +1 -1
- package/lib/store/util.d.ts.map +1 -1
- package/lib/store/util.js +13 -17
- package/lib/store/util.js.map +1 -1
- package/lib/sui/context.d.ts +1 -1
- package/lib/sui/context.d.ts.map +1 -1
- package/lib/sui/context.js +8 -6
- package/lib/sui/context.js.map +1 -1
- package/lib/sui/network.d.ts.map +1 -1
- package/lib/sui/network.js +11 -6
- package/lib/sui/network.js.map +1 -1
- package/lib/sui/sui-object-processor-template.d.ts +1 -1
- package/lib/sui/sui-object-processor-template.d.ts.map +1 -1
- package/lib/sui/sui-object-processor-template.js +17 -12
- package/lib/sui/sui-object-processor-template.js.map +1 -1
- package/lib/sui/sui-object-processor.d.ts +1 -1
- package/lib/sui/sui-object-processor.d.ts.map +1 -1
- package/lib/sui/sui-object-processor.js +29 -21
- package/lib/sui/sui-object-processor.js.map +1 -1
- package/lib/sui/sui-plugin-part.d.ts +1 -1
- package/lib/sui/sui-plugin-part.d.ts.map +1 -1
- package/lib/sui/sui-plugin-part.js +16 -15
- package/lib/sui/sui-plugin-part.js.map +1 -1
- package/lib/sui/sui-plugin.d.ts +1 -1
- package/lib/sui/sui-plugin.d.ts.map +1 -1
- package/lib/sui/sui-plugin.js +35 -34
- package/lib/sui/sui-plugin.js.map +1 -1
- package/lib/sui/sui-processor.d.ts +3 -3
- package/lib/sui/sui-processor.d.ts.map +1 -1
- package/lib/sui/sui-processor.js +23 -21
- package/lib/sui/sui-processor.js.map +1 -1
- package/lib/sui/to-client-types.d.ts +4 -0
- package/lib/sui/to-client-types.d.ts.map +1 -0
- package/lib/sui/to-client-types.js +69 -0
- package/lib/sui/to-client-types.js.map +1 -0
- package/lib/testing/aptos-facet.d.ts.map +1 -1
- package/lib/testing/aptos-facet.js +18 -11
- package/lib/testing/aptos-facet.js.map +1 -1
- package/lib/testing/cosmos-facet.d.ts.map +1 -1
- package/lib/testing/cosmos-facet.js +10 -6
- package/lib/testing/cosmos-facet.js.map +1 -1
- package/lib/testing/eth-facet.d.ts +1 -1
- package/lib/testing/eth-facet.d.ts.map +1 -1
- package/lib/testing/eth-facet.js +34 -18
- package/lib/testing/eth-facet.js.map +1 -1
- package/lib/testing/fuel-facet.d.ts.map +1 -1
- package/lib/testing/fuel-facet.js +28 -18
- package/lib/testing/fuel-facet.js.map +1 -1
- package/lib/testing/iota-facet.d.ts.map +1 -1
- package/lib/testing/iota-facet.js +32 -20
- package/lib/testing/iota-facet.js.map +1 -1
- package/lib/testing/memory-database.d.ts +11 -3
- package/lib/testing/memory-database.d.ts.map +1 -1
- package/lib/testing/memory-database.js +85 -69
- package/lib/testing/memory-database.js.map +1 -1
- package/lib/testing/metric-utils.d.ts +2 -2
- package/lib/testing/metric-utils.d.ts.map +1 -1
- package/lib/testing/metric-utils.js +13 -12
- package/lib/testing/metric-utils.js.map +1 -1
- package/lib/testing/solana-facet.d.ts +3 -2
- package/lib/testing/solana-facet.d.ts.map +1 -1
- package/lib/testing/solana-facet.js +8 -5
- package/lib/testing/solana-facet.js.map +1 -1
- package/lib/testing/sui-facet.d.ts.map +1 -1
- package/lib/testing/sui-facet.js +30 -20
- package/lib/testing/sui-facet.js.map +1 -1
- package/lib/testing/test-processor-server.d.ts +1452 -16
- package/lib/testing/test-processor-server.d.ts.map +1 -1
- package/lib/testing/test-processor-server.js +109 -46
- package/lib/testing/test-processor-server.js.map +1 -1
- package/lib/testing/test-provider.js +1 -1
- package/lib/testing/test-provider.js.map +1 -1
- package/lib/utils/price.d.ts +1 -1
- package/lib/utils/price.d.ts.map +1 -1
- package/lib/utils/price.js +19 -12
- package/lib/utils/price.js.map +1 -1
- package/package.json +10 -12
- package/src/aptos/aptos-plugin.ts +105 -91
- package/src/aptos/aptos-processor.ts +42 -34
- package/src/aptos/aptos-resource-processor-template.ts +15 -6
- package/src/aptos/context.ts +11 -10
- package/src/aptos/data.ts +4 -4
- package/src/aptos/network.ts +1 -1
- package/src/core/base-context.ts +19 -12
- package/src/core/core-plugin.ts +10 -7
- package/src/core/event-logger.ts +63 -35
- package/src/core/exporter.ts +5 -4
- package/src/core/handler-options.ts +1 -1
- package/src/core/handler-register.ts +3 -3
- package/src/core/meter.ts +9 -7
- package/src/core/normalization.ts +53 -31
- package/src/core/numberish.ts +46 -30
- package/src/core/partition-handler-manager.ts +13 -11
- package/src/cosmos/context.ts +4 -3
- package/src/cosmos/cosmos-plugin.ts +19 -15
- package/src/cosmos/cosmos-processor.ts +2 -2
- package/src/eth/abi-decoder/decode-worker.ts +2 -2
- package/src/eth/account-processor.ts +21 -12
- package/src/eth/base-processor-template.ts +27 -11
- package/src/eth/base-processor.ts +77 -65
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +177 -116
- package/src/eth/builtin/internal/erc1155-processor.ts +73 -38
- package/src/eth/builtin/internal/erc20-processor.ts +152 -91
- package/src/eth/builtin/internal/erc20bytes-processor.ts +80 -46
- package/src/eth/builtin/internal/erc721-processor.ts +109 -65
- package/src/eth/builtin/internal/weth9-processor.ts +95 -56
- package/src/eth/codegen/file.ts +2 -1
- package/src/eth/codegen/function-calls.ts +1 -1
- package/src/eth/context.ts +29 -13
- package/src/eth/eth-plugin.ts +137 -127
- package/src/eth/eth.ts +46 -32
- package/src/eth/generic-processor.ts +1 -1
- package/src/eth/index.ts +2 -2
- package/src/eth/provider.ts +193 -0
- package/src/fuel/asset-processor.ts +16 -8
- package/src/fuel/context.ts +4 -3
- package/src/fuel/fuel-plugin.ts +71 -73
- package/src/fuel/fuel-processor-template.ts +10 -7
- package/src/fuel/fuel-processor.ts +35 -23
- package/src/fuel/global-processor.ts +3 -3
- package/src/fuel/network.ts +5 -5
- package/src/fuel/types.ts +10 -4
- package/src/iota/context.ts +8 -7
- package/src/iota/iota-object-processor-template.ts +25 -15
- package/src/iota/iota-object-processor.ts +33 -22
- package/src/iota/iota-plugin-part.ts +41 -34
- package/src/iota/iota-processor.ts +35 -27
- package/src/iota/network.ts +6 -6
- package/src/move/filter.ts +1 -1
- package/src/move/index.ts +1 -1
- package/src/solana/codegen/codegen.ts +2 -2
- package/src/solana/solana-context.ts +4 -3
- package/src/solana/solana-plugin.ts +27 -24
- package/src/solana/solana-processor.ts +23 -11
- package/src/store/cache.ts +22 -18
- package/src/store/codegen.ts +2 -2
- package/src/store/convert.ts +68 -104
- package/src/store/decorators.ts +3 -2
- package/src/store/store.ts +31 -23
- package/src/store/types.ts +24 -33
- package/src/store/util.ts +13 -18
- package/src/sui/context.ts +8 -7
- package/src/sui/network.ts +12 -7
- package/src/sui/sui-object-processor-template.ts +25 -15
- package/src/sui/sui-object-processor.ts +50 -28
- package/src/sui/sui-plugin-part.ts +41 -34
- package/src/sui/sui-plugin.ts +49 -47
- package/src/sui/sui-processor.ts +38 -29
- package/src/sui/to-client-types.ts +75 -0
- package/src/testing/aptos-facet.ts +18 -11
- package/src/testing/cosmos-facet.ts +10 -6
- package/src/testing/eth-facet.ts +40 -18
- package/src/testing/fuel-facet.ts +28 -18
- package/src/testing/iota-facet.ts +32 -20
- package/src/testing/memory-database.ts +126 -85
- package/src/testing/metric-utils.ts +15 -14
- package/src/testing/solana-facet.ts +11 -6
- package/src/testing/sui-facet.ts +30 -20
- package/src/testing/test-processor-server.ts +170 -80
- package/src/testing/test-provider.ts +1 -1
- package/src/utils/price.ts +20 -13
package/src/eth/eth-plugin.ts
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
getProvider,
|
|
4
|
-
GLOBAL_CONFIG,
|
|
5
|
-
mergeProcessResults,
|
|
6
|
-
Plugin,
|
|
7
|
-
PluginManager,
|
|
8
|
-
USER_PROCESSOR
|
|
9
|
-
} from '@sentio/runtime'
|
|
1
|
+
import { errorString, GLOBAL_CONFIG, mergeProcessResults, Plugin, PluginManager, USER_PROCESSOR } from '@sentio/runtime'
|
|
2
|
+
import { getProvider } from './provider.js'
|
|
10
3
|
import { PartitionHandlerManager } from '../core/index.js'
|
|
11
4
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
AccountConfigSchema,
|
|
6
|
+
ContractConfigSchema,
|
|
14
7
|
DataBinding,
|
|
15
8
|
HandlerType,
|
|
16
9
|
InitResponse,
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
LogFilterSchema,
|
|
11
|
+
LogHandlerConfigSchema,
|
|
12
|
+
OnIntervalConfigSchema,
|
|
19
13
|
PreparedData,
|
|
20
14
|
PreprocessResult,
|
|
15
|
+
PreprocessResultSchema,
|
|
21
16
|
ProcessConfigResponse,
|
|
22
17
|
ProcessResult,
|
|
23
18
|
ProcessStreamResponse_Partitions,
|
|
24
|
-
|
|
19
|
+
ProcessStreamResponse_PartitionsSchema,
|
|
20
|
+
StartRequest,
|
|
21
|
+
TopicSchema,
|
|
22
|
+
TraceHandlerConfigSchema,
|
|
23
|
+
TransactionHandlerConfigSchema
|
|
25
24
|
} from '@sentio/protos'
|
|
26
|
-
|
|
27
|
-
import {
|
|
25
|
+
import { create } from '@bufbuild/protobuf'
|
|
26
|
+
import { ConnectError, Code } from '@connectrpc/connect'
|
|
28
27
|
import { EthProcessorState } from './binds.js'
|
|
29
28
|
import { AccountProcessorState } from './account-processor-state.js'
|
|
30
29
|
import { ProcessorTemplateProcessorState } from './base-processor-template.js'
|
|
@@ -65,7 +64,7 @@ export class EthPlugin extends Plugin {
|
|
|
65
64
|
const startBlock = await timeOrBlockToBlockNumber(provider, processor.config.start)
|
|
66
65
|
const endBlock = processor.config.end ? await timeOrBlockToBlockNumber(provider, processor.config.end) : undefined
|
|
67
66
|
|
|
68
|
-
const contractConfig =
|
|
67
|
+
const contractConfig = create(ContractConfigSchema, {
|
|
69
68
|
processorType: USER_PROCESSOR,
|
|
70
69
|
contract: {
|
|
71
70
|
name: processor.config.name,
|
|
@@ -84,15 +83,17 @@ export class EthPlugin extends Plugin {
|
|
|
84
83
|
this.partitionManager.registerPartitionHandler(HandlerType.ETH_BLOCK, handlerId, blockHandler.partitionHandler)
|
|
85
84
|
// TODO wrap the block handler into one
|
|
86
85
|
|
|
87
|
-
contractConfig.intervalConfigs.push(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
86
|
+
contractConfig.intervalConfigs.push(
|
|
87
|
+
create(OnIntervalConfigSchema, {
|
|
88
|
+
slot: 0,
|
|
89
|
+
slotInterval: blockHandler.blockInterval,
|
|
90
|
+
minutes: 0,
|
|
91
|
+
minutesInterval: blockHandler.timeIntervalInMinutes,
|
|
92
|
+
handlerId: handlerId,
|
|
93
|
+
handlerName: blockHandler.handlerName,
|
|
94
|
+
fetchConfig: blockHandler.fetchConfig
|
|
95
|
+
})
|
|
96
|
+
)
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
// Step 2. Prepare all trace handlers
|
|
@@ -101,12 +102,14 @@ export class EthPlugin extends Plugin {
|
|
|
101
102
|
|
|
102
103
|
this.partitionManager.registerPartitionHandler(HandlerType.ETH_TRACE, handlerId, traceHandler.partitionHandler)
|
|
103
104
|
for (const signature of traceHandler.signatures) {
|
|
104
|
-
contractConfig.traceConfigs.push(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
contractConfig.traceConfigs.push(
|
|
106
|
+
create(TraceHandlerConfigSchema, {
|
|
107
|
+
signature: signature,
|
|
108
|
+
handlerId: handlerId,
|
|
109
|
+
handlerName: traceHandler.handlerName,
|
|
110
|
+
fetchConfig: traceHandler.fetchConfig
|
|
111
|
+
})
|
|
112
|
+
)
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
115
|
|
|
@@ -115,24 +118,25 @@ export class EthPlugin extends Plugin {
|
|
|
115
118
|
// associate id with filter
|
|
116
119
|
const handlerId = this.handlerRegister.register(eventsHandler.handler, chainId)
|
|
117
120
|
this.partitionManager.registerPartitionHandler(HandlerType.ETH_LOG, handlerId, eventsHandler.partitionHandler)
|
|
118
|
-
const logConfig
|
|
121
|
+
const logConfig = create(LogHandlerConfigSchema, {
|
|
119
122
|
handlerId: handlerId,
|
|
120
123
|
handlerName: eventsHandler.handlerName,
|
|
121
124
|
filters: [],
|
|
122
125
|
fetchConfig: eventsHandler.fetchConfig
|
|
123
|
-
}
|
|
126
|
+
})
|
|
124
127
|
|
|
125
128
|
for (const filter of eventsHandler.filters) {
|
|
126
129
|
const topics = await filter.getTopicFilter()
|
|
127
130
|
|
|
128
131
|
// if (!filter.topics) {
|
|
129
|
-
// throw new
|
|
132
|
+
// throw new ConnectError('Topic should not be null', Code.InvalidArgument)
|
|
130
133
|
// }
|
|
131
|
-
const logFilter
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
const logFilter = create(LogFilterSchema, {
|
|
135
|
+
addressOrType: contractConfig.contract?.address
|
|
136
|
+
? { case: 'address', value: validateAndNormalizeAddress(contractConfig.contract.address) }
|
|
137
|
+
: undefined,
|
|
134
138
|
topics: []
|
|
135
|
-
}
|
|
139
|
+
})
|
|
136
140
|
|
|
137
141
|
for (const ts of topics) {
|
|
138
142
|
let hashes: string[] = []
|
|
@@ -141,7 +145,7 @@ export class EthPlugin extends Plugin {
|
|
|
141
145
|
} else if (ts) {
|
|
142
146
|
hashes.push(ts)
|
|
143
147
|
}
|
|
144
|
-
logFilter.topics.push({ hashes: hashes })
|
|
148
|
+
logFilter.topics.push(create(TopicSchema, { hashes: hashes }))
|
|
145
149
|
}
|
|
146
150
|
logConfig.filters.push(logFilter)
|
|
147
151
|
}
|
|
@@ -168,7 +172,7 @@ export class EthPlugin extends Plugin {
|
|
|
168
172
|
endBlock = processor.config.end?.block != undefined ? BigInt(processor.config.end.block) : undefined
|
|
169
173
|
}
|
|
170
174
|
|
|
171
|
-
const contractConfig =
|
|
175
|
+
const contractConfig = create(ContractConfigSchema, {
|
|
172
176
|
processorType: USER_PROCESSOR,
|
|
173
177
|
contract: {
|
|
174
178
|
name: processor.config.name,
|
|
@@ -182,15 +186,17 @@ export class EthPlugin extends Plugin {
|
|
|
182
186
|
|
|
183
187
|
for (const blockHandler of processor.blockHandlers) {
|
|
184
188
|
const handlerId = this.handlerRegister.register(blockHandler.handler, chainId)
|
|
185
|
-
contractConfig.intervalConfigs.push(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
contractConfig.intervalConfigs.push(
|
|
190
|
+
create(OnIntervalConfigSchema, {
|
|
191
|
+
slot: 0,
|
|
192
|
+
slotInterval: blockHandler.blockInterval,
|
|
193
|
+
minutes: 0,
|
|
194
|
+
minutesInterval: blockHandler.timeIntervalInMinutes,
|
|
195
|
+
handlerId: handlerId,
|
|
196
|
+
handlerName: blockHandler.handlerName,
|
|
197
|
+
fetchConfig: blockHandler.fetchConfig
|
|
198
|
+
})
|
|
199
|
+
)
|
|
194
200
|
}
|
|
195
201
|
|
|
196
202
|
for (const transactionHandler of processor.transactionHandler) {
|
|
@@ -200,55 +206,65 @@ export class EthPlugin extends Plugin {
|
|
|
200
206
|
handlerId,
|
|
201
207
|
transactionHandler.partitionHandler
|
|
202
208
|
)
|
|
203
|
-
contractConfig.transactionConfig.push(
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
209
|
+
contractConfig.transactionConfig.push(
|
|
210
|
+
create(TransactionHandlerConfigSchema, {
|
|
211
|
+
handlerId: handlerId,
|
|
212
|
+
handlerName: transactionHandler.handlerName,
|
|
213
|
+
fetchConfig: transactionHandler.fetchConfig
|
|
214
|
+
})
|
|
215
|
+
)
|
|
208
216
|
}
|
|
209
217
|
|
|
210
218
|
for (const traceHandler of processor.traceHandlers) {
|
|
211
219
|
const handlerId = this.handlerRegister.register(traceHandler.handler, chainId)
|
|
212
220
|
for (const signature of traceHandler.signatures) {
|
|
213
|
-
contractConfig.traceConfigs.push(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
221
|
+
contractConfig.traceConfigs.push(
|
|
222
|
+
create(TraceHandlerConfigSchema, {
|
|
223
|
+
signature: signature,
|
|
224
|
+
handlerId: handlerId,
|
|
225
|
+
handlerName: traceHandler.handlerName,
|
|
226
|
+
fetchConfig: traceHandler.fetchConfig
|
|
227
|
+
})
|
|
228
|
+
)
|
|
219
229
|
}
|
|
220
230
|
}
|
|
221
231
|
|
|
222
232
|
for (const eventsHandler of processor.eventHandlers) {
|
|
223
233
|
// associate id with filter
|
|
224
234
|
const handlerId = this.handlerRegister.register(eventsHandler.handler, processor.getChainId())
|
|
225
|
-
const logConfig
|
|
235
|
+
const logConfig = create(LogHandlerConfigSchema, {
|
|
226
236
|
handlerId: handlerId,
|
|
227
237
|
handlerName: eventsHandler.handlerName,
|
|
228
238
|
filters: [],
|
|
229
239
|
fetchConfig: eventsHandler.fetchConfig
|
|
230
|
-
}
|
|
240
|
+
})
|
|
231
241
|
|
|
232
242
|
if (!eventsHandler.filters || eventsHandler.filters.length === 0) {
|
|
233
243
|
// if no filter, then we assume all logs
|
|
234
|
-
logConfig.filters.push(
|
|
235
|
-
|
|
236
|
-
|
|
244
|
+
logConfig.filters.push(
|
|
245
|
+
create(LogFilterSchema, {
|
|
246
|
+
topics: []
|
|
247
|
+
})
|
|
248
|
+
)
|
|
237
249
|
} else {
|
|
238
250
|
for (const filter of eventsHandler.filters) {
|
|
239
251
|
const topics = await filter.getTopicFilter()
|
|
240
252
|
// if (!filter.topics) {
|
|
241
|
-
// throw new
|
|
253
|
+
// throw new ConnectError('Topic should not be null', Code.InvalidArgument)
|
|
242
254
|
// }
|
|
243
255
|
let address = undefined
|
|
244
256
|
if (filter.address) {
|
|
245
257
|
address = filter.address.toString()
|
|
246
258
|
}
|
|
247
|
-
const logFilter
|
|
248
|
-
|
|
249
|
-
|
|
259
|
+
const logFilter = create(LogFilterSchema, {
|
|
260
|
+
addressOrType:
|
|
261
|
+
filter.addressType != undefined
|
|
262
|
+
? { case: 'addressType', value: filter.addressType }
|
|
263
|
+
: address
|
|
264
|
+
? { case: 'address', value: validateAndNormalizeAddress(address) }
|
|
265
|
+
: undefined,
|
|
250
266
|
topics: []
|
|
251
|
-
}
|
|
267
|
+
})
|
|
252
268
|
|
|
253
269
|
for (const ts of topics) {
|
|
254
270
|
let hashes: string[] = []
|
|
@@ -257,7 +273,7 @@ export class EthPlugin extends Plugin {
|
|
|
257
273
|
} else if (ts) {
|
|
258
274
|
hashes.push(ts)
|
|
259
275
|
}
|
|
260
|
-
logFilter.topics.push({ hashes: hashes })
|
|
276
|
+
logFilter.topics.push(create(TopicSchema, { hashes: hashes }))
|
|
261
277
|
}
|
|
262
278
|
logConfig.filters.push(logFilter)
|
|
263
279
|
}
|
|
@@ -273,7 +289,7 @@ export class EthPlugin extends Plugin {
|
|
|
273
289
|
if (forChainId !== undefined && forChainId !== processor.getChainId().toString()) {
|
|
274
290
|
continue
|
|
275
291
|
}
|
|
276
|
-
const accountConfig =
|
|
292
|
+
const accountConfig = create(AccountConfigSchema, {
|
|
277
293
|
address: validateAndNormalizeAddress(processor.config.address),
|
|
278
294
|
chainId: processor.getChainId().toString(),
|
|
279
295
|
startBlock: processor.config.startBlock ? BigInt(processor.config.startBlock) : 0n
|
|
@@ -282,12 +298,12 @@ export class EthPlugin extends Plugin {
|
|
|
282
298
|
for (const eventsHandler of processor.eventHandlers) {
|
|
283
299
|
// associate id with filter
|
|
284
300
|
const handlerId = this.handlerRegister.register(eventsHandler.handler, processor.getChainId())
|
|
285
|
-
const logConfig
|
|
301
|
+
const logConfig = create(LogHandlerConfigSchema, {
|
|
286
302
|
handlerId: handlerId,
|
|
287
303
|
handlerName: eventsHandler.handlerName,
|
|
288
304
|
filters: [],
|
|
289
305
|
fetchConfig: eventsHandler.fetchConfig
|
|
290
|
-
}
|
|
306
|
+
})
|
|
291
307
|
|
|
292
308
|
for (const filter of eventsHandler.filters) {
|
|
293
309
|
const topics = await filter.getTopicFilter()
|
|
@@ -296,11 +312,14 @@ export class EthPlugin extends Plugin {
|
|
|
296
312
|
if (filter.address) {
|
|
297
313
|
address = filter.address.toString()
|
|
298
314
|
}
|
|
299
|
-
const logFilter
|
|
300
|
-
|
|
301
|
-
|
|
315
|
+
const logFilter = create(LogFilterSchema, {
|
|
316
|
+
addressOrType: filter.addressType
|
|
317
|
+
? { case: 'addressType', value: filter.addressType }
|
|
318
|
+
: address
|
|
319
|
+
? { case: 'address', value: validateAndNormalizeAddress(address) }
|
|
320
|
+
: undefined,
|
|
302
321
|
topics: []
|
|
303
|
-
}
|
|
322
|
+
})
|
|
304
323
|
|
|
305
324
|
for (const ts of topics) {
|
|
306
325
|
let hashes: string[] = []
|
|
@@ -309,7 +328,7 @@ export class EthPlugin extends Plugin {
|
|
|
309
328
|
} else if (ts) {
|
|
310
329
|
hashes.push(ts)
|
|
311
330
|
}
|
|
312
|
-
logFilter.topics.push({ hashes: hashes })
|
|
331
|
+
logFilter.topics.push(create(TopicSchema, { hashes: hashes }))
|
|
313
332
|
}
|
|
314
333
|
logConfig.filters.push(logFilter)
|
|
315
334
|
}
|
|
@@ -338,7 +357,7 @@ export class EthPlugin extends Plugin {
|
|
|
338
357
|
case HandlerType.ETH_TRANSACTION:
|
|
339
358
|
return this.processTransaction(request, preparedData)
|
|
340
359
|
default:
|
|
341
|
-
throw new
|
|
360
|
+
throw new ConnectError('No handle type registered ' + request.handlerType, Code.InvalidArgument)
|
|
342
361
|
}
|
|
343
362
|
}
|
|
344
363
|
|
|
@@ -346,40 +365,40 @@ export class EthPlugin extends Plugin {
|
|
|
346
365
|
let data: any
|
|
347
366
|
switch (request.handlerType) {
|
|
348
367
|
case HandlerType.ETH_LOG:
|
|
349
|
-
if (
|
|
350
|
-
throw new
|
|
368
|
+
if (request.data?.value.case !== 'ethLog' || !request.data.value.value) {
|
|
369
|
+
throw new ConnectError("ethLog can't be empty", Code.InvalidArgument)
|
|
351
370
|
}
|
|
352
|
-
data = request.data.
|
|
371
|
+
data = request.data.value.value
|
|
353
372
|
break
|
|
354
373
|
case HandlerType.ETH_TRACE:
|
|
355
|
-
if (
|
|
356
|
-
throw new
|
|
374
|
+
if (request.data?.value.case !== 'ethTrace' || !request.data.value.value) {
|
|
375
|
+
throw new ConnectError("ethTrace can't be empty", Code.InvalidArgument)
|
|
357
376
|
}
|
|
358
|
-
data = request.data.
|
|
377
|
+
data = request.data.value.value
|
|
359
378
|
break
|
|
360
379
|
case HandlerType.ETH_BLOCK:
|
|
361
|
-
if (
|
|
362
|
-
throw new
|
|
380
|
+
if (request.data?.value.case !== 'ethBlock' || !request.data.value.value) {
|
|
381
|
+
throw new ConnectError("ethBlock can't be empty", Code.InvalidArgument)
|
|
363
382
|
}
|
|
364
|
-
data = request.data.
|
|
383
|
+
data = request.data.value.value
|
|
365
384
|
break
|
|
366
385
|
case HandlerType.ETH_TRANSACTION:
|
|
367
|
-
if (
|
|
368
|
-
throw new
|
|
386
|
+
if (request.data?.value.case !== 'ethTransaction' || !request.data.value.value) {
|
|
387
|
+
throw new ConnectError("ethTransaction can't be empty", Code.InvalidArgument)
|
|
369
388
|
}
|
|
370
|
-
data = request.data.
|
|
389
|
+
data = request.data.value.value
|
|
371
390
|
break
|
|
372
391
|
default:
|
|
373
|
-
throw new
|
|
392
|
+
throw new ConnectError('No handle type registered ' + request.handlerType, Code.InvalidArgument)
|
|
374
393
|
}
|
|
375
394
|
const partitions = await this.partitionManager.processPartitionForHandlerType(
|
|
376
395
|
request.handlerType,
|
|
377
396
|
request.handlerIds,
|
|
378
397
|
data
|
|
379
398
|
)
|
|
380
|
-
return {
|
|
399
|
+
return create(ProcessStreamResponse_PartitionsSchema, {
|
|
381
400
|
partitions
|
|
382
|
-
}
|
|
401
|
+
})
|
|
383
402
|
}
|
|
384
403
|
|
|
385
404
|
async start(request: StartRequest) {
|
|
@@ -392,10 +411,10 @@ export class EthPlugin extends Plugin {
|
|
|
392
411
|
|
|
393
412
|
const template = ProcessorTemplateProcessorState.INSTANCE.getValues()[instance.templateId]
|
|
394
413
|
if (!template) {
|
|
395
|
-
throw new
|
|
414
|
+
throw new ConnectError('Invalid template contract:' + instance, Code.InvalidArgument)
|
|
396
415
|
}
|
|
397
416
|
if (!instance.contract) {
|
|
398
|
-
throw new
|
|
417
|
+
throw new ConnectError('Contract Empty from:' + instance, Code.InvalidArgument)
|
|
399
418
|
}
|
|
400
419
|
const ctx = new NoopContext(instance.contract.chainId as EthChainId)
|
|
401
420
|
template.startInstance(
|
|
@@ -404,7 +423,7 @@ export class EthPlugin extends Plugin {
|
|
|
404
423
|
address: validateAndNormalizeAddress(instance.contract.address),
|
|
405
424
|
startBlock: instance.startBlock,
|
|
406
425
|
endBlock: instance.endBlock,
|
|
407
|
-
baseLabels: instance.baseLabels
|
|
426
|
+
baseLabels: instance.baseLabels as { [key: string]: string } | undefined
|
|
408
427
|
},
|
|
409
428
|
ctx
|
|
410
429
|
)
|
|
@@ -412,20 +431,17 @@ export class EthPlugin extends Plugin {
|
|
|
412
431
|
}
|
|
413
432
|
|
|
414
433
|
async processLog(request: DataBinding, preparedData: PreparedData | undefined): Promise<ProcessResult> {
|
|
415
|
-
if (
|
|
416
|
-
throw new
|
|
434
|
+
if (request.data?.value.case !== 'ethLog' || !request.data.value.value.rawLog) {
|
|
435
|
+
throw new ConnectError("Log can't be null", Code.InvalidArgument)
|
|
417
436
|
}
|
|
418
|
-
const ethLog = request.data.
|
|
437
|
+
const ethLog = request.data.value.value
|
|
419
438
|
|
|
420
439
|
const promises: Promise<ProcessResult>[] = []
|
|
421
440
|
for (const handlerId of request.handlerIds) {
|
|
422
441
|
const handler = this.handlerRegister.getHandlerById(request.chainId, handlerId)
|
|
423
442
|
const promise = handler(ethLog, preparedData).catch((e: any) => {
|
|
424
443
|
console.error('error processing log: ', e)
|
|
425
|
-
throw new
|
|
426
|
-
Status.INTERNAL,
|
|
427
|
-
'error processing log: ' + JSON.stringify(ethLog.log) + '\n' + errorString(e)
|
|
428
|
-
)
|
|
444
|
+
throw new ConnectError('error processing log: ' + ethLog.rawLog + '\n' + errorString(e), Code.Internal)
|
|
429
445
|
})
|
|
430
446
|
if (GLOBAL_CONFIG.execution.sequential) {
|
|
431
447
|
await promise
|
|
@@ -436,10 +452,10 @@ export class EthPlugin extends Plugin {
|
|
|
436
452
|
}
|
|
437
453
|
|
|
438
454
|
async processTrace(binding: DataBinding, preparedData: PreparedData | undefined): Promise<ProcessResult> {
|
|
439
|
-
if (
|
|
440
|
-
throw new
|
|
455
|
+
if (binding.data?.value.case !== 'ethTrace' || !binding.data.value.value.rawTrace) {
|
|
456
|
+
throw new ConnectError("Trace can't be null", Code.InvalidArgument)
|
|
441
457
|
}
|
|
442
|
-
const ethTrace = binding.data.
|
|
458
|
+
const ethTrace = binding.data.value.value
|
|
443
459
|
|
|
444
460
|
const promises: Promise<ProcessResult>[] = []
|
|
445
461
|
|
|
@@ -448,10 +464,7 @@ export class EthPlugin extends Plugin {
|
|
|
448
464
|
.getHandlerById(binding.chainId, handlerId)(ethTrace, preparedData)
|
|
449
465
|
.catch((e: any) => {
|
|
450
466
|
console.error('error processing trace: ', e)
|
|
451
|
-
throw new
|
|
452
|
-
Status.INTERNAL,
|
|
453
|
-
'error processing trace: ' + JSON.stringify(ethTrace.trace) + '\n' + errorString(e)
|
|
454
|
-
)
|
|
467
|
+
throw new ConnectError('error processing trace: ' + ethTrace.rawTrace + '\n' + errorString(e), Code.Internal)
|
|
455
468
|
})
|
|
456
469
|
if (GLOBAL_CONFIG.execution.sequential) {
|
|
457
470
|
await promise
|
|
@@ -462,10 +475,10 @@ export class EthPlugin extends Plugin {
|
|
|
462
475
|
}
|
|
463
476
|
|
|
464
477
|
async processBlock(binding: DataBinding, preparedData: PreparedData | undefined): Promise<ProcessResult> {
|
|
465
|
-
if (
|
|
466
|
-
throw new
|
|
478
|
+
if (binding.data?.value.case !== 'ethBlock' || !binding.data.value.value.rawBlock) {
|
|
479
|
+
throw new ConnectError("Block can't be empty", Code.InvalidArgument)
|
|
467
480
|
}
|
|
468
|
-
const ethBlock = binding.data.
|
|
481
|
+
const ethBlock = binding.data.value.value
|
|
469
482
|
|
|
470
483
|
const promises: Promise<ProcessResult>[] = []
|
|
471
484
|
for (const handlerId of binding.handlerIds) {
|
|
@@ -473,10 +486,7 @@ export class EthPlugin extends Plugin {
|
|
|
473
486
|
.getHandlerById(binding.chainId, handlerId)(ethBlock, preparedData)
|
|
474
487
|
.catch((e: any) => {
|
|
475
488
|
console.error('error processing block: ', e)
|
|
476
|
-
throw new
|
|
477
|
-
Status.INTERNAL,
|
|
478
|
-
'error processing block: ' + ethBlock.block?.number + '\n' + errorString(e)
|
|
479
|
-
)
|
|
489
|
+
throw new ConnectError('error processing block: ' + errorString(e), Code.Internal)
|
|
480
490
|
})
|
|
481
491
|
if (GLOBAL_CONFIG.execution.sequential) {
|
|
482
492
|
await promise
|
|
@@ -487,10 +497,10 @@ export class EthPlugin extends Plugin {
|
|
|
487
497
|
}
|
|
488
498
|
|
|
489
499
|
async processTransaction(binding: DataBinding, preparedData: PreparedData | undefined): Promise<ProcessResult> {
|
|
490
|
-
if (
|
|
491
|
-
throw new
|
|
500
|
+
if (binding.data?.value.case !== 'ethTransaction' || !binding.data.value.value.rawTransaction) {
|
|
501
|
+
throw new ConnectError("transaction can't be null", Code.InvalidArgument)
|
|
492
502
|
}
|
|
493
|
-
const ethTransaction = binding.data.
|
|
503
|
+
const ethTransaction = binding.data.value.value
|
|
494
504
|
|
|
495
505
|
const promises: Promise<ProcessResult>[] = []
|
|
496
506
|
|
|
@@ -498,9 +508,9 @@ export class EthPlugin extends Plugin {
|
|
|
498
508
|
const promise = this.handlerRegister
|
|
499
509
|
.getHandlerById(binding.chainId, handlerId)(ethTransaction, preparedData)
|
|
500
510
|
.catch((e: any) => {
|
|
501
|
-
throw new
|
|
502
|
-
|
|
503
|
-
|
|
511
|
+
throw new ConnectError(
|
|
512
|
+
'error processing transaction: ' + ethTransaction.rawTransaction + '\n' + errorString(e),
|
|
513
|
+
Code.Internal
|
|
504
514
|
)
|
|
505
515
|
})
|
|
506
516
|
if (GLOBAL_CONFIG.execution.sequential) {
|
|
@@ -525,7 +535,7 @@ class NoopContext extends EthContext {
|
|
|
525
535
|
}
|
|
526
536
|
|
|
527
537
|
function mergePreprocessResults(results: PreprocessResult[]): PreprocessResult {
|
|
528
|
-
const res
|
|
538
|
+
const res = create(PreprocessResultSchema, { ethCallParams: [] })
|
|
529
539
|
for (const r of results) {
|
|
530
540
|
res.ethCallParams = res.ethCallParams.concat(r.ethCallParams)
|
|
531
541
|
}
|