import { Interface } from '@ethersproject/abi'; import { DeepReadonly } from 'ts-essentials'; import { Log, Logger } from '../../types'; import { StatefulEventSubscriber } from '../../stateful-event-subscriber'; import { IDexHelper } from '../../dex-helper/idex-helper'; import { PoolState } from './types'; export declare class StkGHOEventPool extends StatefulEventSubscriber { readonly poolName: string; readonly parentName: string; protected network: number; protected dexHelper: IDexHelper; protected stkGHOIface: Interface; handlers: { [event: string]: (event: any, state: DeepReadonly, log: Readonly) => DeepReadonly | null; }; logDecoder: (log: Log) => any; addressesSubscribed: string[]; constructor(poolName: string, parentName: string, network: number, dexHelper: IDexHelper, logger: Logger, stkGHOIface?: Interface); getIdentifier(): string; /** * The function is called every time any of the subscribed * addresses release log. The function accepts the current * state, updates the state according to the log, and returns * the updated state. * @param state - Current state of event subscriber * @param log - Log released by one of the subscribed addresses * @returns Updates state of the event subscriber after the log */ protected processLog(state: DeepReadonly, log: Readonly): DeepReadonly | null; /** * The function generates state using on-chain calls. This * function is called to regenerate state if the event based * system fails to fetch events and the local state is no * more correct. * @param blockNumber - Blocknumber for which the state should * should be generated * @returns state of the event subscriber at blocknumber */ generateState(blockNumber: number): Promise>; handleExchangeRateChanged(event: any, state: DeepReadonly, log: Readonly): DeepReadonly | null; }