import { BoundContractView, ContractContext, ContractView, EthContext } from './context.js'; import { BaseContract } from 'ethers'; import { BaseProcessor } from './base-processor.js'; import { BindOptions } from './bind-options.js'; import { EthFetchConfig, HandleInterval, PreprocessResult } from '@sentio/protos'; import { PromiseOrVoid } from '../core/promises.js'; import { ListStateStorage } from '@sentio/runtime'; import { BlockParams } from 'ethers/providers'; import { DeferredTopicFilter } from 'ethers/contract'; import { TypedEvent, TypedCallTrace } from './eth.js'; export declare class ProcessorTemplateProcessorState extends ListStateStorage>> { static INSTANCE: ProcessorTemplateProcessorState; } export declare abstract class BaseProcessorTemplate>> { id: number; binds: Set; blockHandlers: { handlerName: string; handler: (block: BlockParams, ctx: ContractContext) => PromiseOrVoid; preprocessHandler: (block: BlockParams, ctx: ContractContext, preprocessStore: { [k: string]: any; }) => Promise; blockInterval?: HandleInterval; timeIntervalInMinutes?: HandleInterval; fetchConfig?: EthFetchConfig; }[]; traceHandlers: { signature: string; handlerName: string; handler: (trace: TypedCallTrace, ctx: ContractContext) => PromiseOrVoid; preprocessHandler: (trace: TypedCallTrace, ctx: ContractContext, preprocessStore: { [k: string]: any; }) => Promise; fetchConfig?: EthFetchConfig; }[]; eventHandlers: { handlerName: string; handler: (event: TypedEvent, ctx: ContractContext) => PromiseOrVoid; preprocessHandler: (event: TypedEvent, ctx: ContractContext, preprocessStore: { [k: string]: any; }) => Promise; filter: DeferredTopicFilter | DeferredTopicFilter[]; fetchConfig?: EthFetchConfig; }[]; constructor(); /** * Bind template using {@param options}, using {@param ctx}'s network value if not provided in the option * @param options * @param ctx */ bind(options: Omit, ctx: EthContext): void; protected onEthEvent(handler: (event: TypedEvent, ctx: ContractContext) => PromiseOrVoid, filter: DeferredTopicFilter | DeferredTopicFilter[], fetchConfig?: Partial, preprocessHandler?: (event: TypedEvent, ctx: ContractContext, preprocessStore: { [k: string]: any; }) => Promise): this; onBlockInterval(handler: (block: BlockParams, ctx: ContractContext) => PromiseOrVoid, blockInterval?: number, backfillBlockInterval?: number, fetchConfig?: EthFetchConfig, preprocessHandler?: (block: BlockParams, ctx: ContractContext, preprocessStore: { [k: string]: any; }) => Promise): this; onTimeInterval(handler: (block: BlockParams, ctx: ContractContext) => PromiseOrVoid, timeIntervalInMinutes?: number, backfillTimeIntervalInMinutes?: number, fetchConfig?: EthFetchConfig, preprocessHandler?: (block: BlockParams, ctx: ContractContext, preprocessStore: { [k: string]: any; }) => Promise): this; onInterval(handler: (block: BlockParams, ctx: ContractContext) => PromiseOrVoid, timeInterval: HandleInterval | undefined, blockInterval: HandleInterval | undefined, fetchConfig: EthFetchConfig | undefined, preprocessHandler?: (block: BlockParams, ctx: ContractContext, preprocessStore: { [k: string]: any; }) => Promise): this; onTrace(signature: string, handler: (trace: TypedCallTrace, ctx: ContractContext) => PromiseOrVoid, fetchConfig?: Partial, preprocessHandler?: (trace: TypedCallTrace, ctx: ContractContext, preprocessStore: { [k: string]: any; }) => Promise): this; protected abstract bindInternal(options: BindOptions): BaseProcessor; } //# sourceMappingURL=base-processor-template.d.ts.map