@sentio/runtime 2.60.0-rc.1 → 2.60.0-rc.11

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.
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  ConfigureHandlersRequest,
3
+ ConfigureHandlersResponse,
3
4
  DataBinding,
4
5
  DeepPartial,
5
6
  Empty,
6
7
  HandlerType,
7
8
  InitResponse,
8
9
  ProcessConfigResponse,
9
- ProcessorV2ServiceImplementation,
10
+ ProcessorV3ServiceImplementation,
10
11
  ProcessResult,
11
12
  ProcessStreamRequest,
12
13
  ProcessStreamResponseV2,
@@ -27,7 +28,7 @@ import { TemplateInstanceState } from './state.js'
27
28
 
28
29
  const { process_binding_count, process_binding_time, process_binding_error } = processMetrics
29
30
 
30
- export class ProcessorServiceImplV2 implements ProcessorV2ServiceImplementation {
31
+ export class ProcessorServiceImplV3 implements ProcessorV3ServiceImplementation {
31
32
  readonly enablePartition: boolean
32
33
  private readonly loader: () => Promise<any>
33
34
  private readonly shutdownHandler?: () => void
@@ -40,6 +41,7 @@ export class ProcessorServiceImplV2 implements ProcessorV2ServiceImplementation
40
41
  }
41
42
 
42
43
  async init(request: Empty, context: CallContext): Promise<DeepPartial<InitResponse>> {
44
+ await this.loader()
43
45
  const resp = InitResponse.fromPartial({
44
46
  chainIds: []
45
47
  })
@@ -173,7 +175,7 @@ export class ProcessorServiceImplV2 implements ProcessorV2ServiceImplementation
173
175
  async configureHandlers(
174
176
  request: ConfigureHandlersRequest,
175
177
  context: CallContext
176
- ): Promise<DeepPartial<ProcessConfigResponse>> {
178
+ ): Promise<DeepPartial<ConfigureHandlersResponse>> {
177
179
  await PluginManager.INSTANCE.start(
178
180
  StartRequest.fromPartial({
179
181
  templateInstances: request.templateInstances
@@ -182,7 +184,10 @@ export class ProcessorServiceImplV2 implements ProcessorV2ServiceImplementation
182
184
 
183
185
  const newConfig = ProcessConfigResponse.fromPartial({})
184
186
  await PluginManager.INSTANCE.configure(newConfig, request.chainId)
185
- return newConfig
187
+ return {
188
+ accountConfigs: newConfig.accountConfigs,
189
+ contractConfigs: newConfig.contractConfigs
190
+ }
186
191
  }
187
192
  }
188
193