import { LogLevel } from '../common.js' import { BigNumberish } from 'ethers' export type BackfillOverrides = { options?: { overrideFilterGroup?: string skipCaching?: boolean } logLevel?: LogLevel context?: any } export type FilterInput = { chainId?: number; location?: FilterGroupAddressLocation; address?: string; } export enum FilterGroupAddressLocation { LOG_TOPIC = 'log-tp', LOG_ADDRESS = 'log-adr', TRANSACTION_FROM = 'tx-from', TRANSACTION_TO = 'tx-to', TRANSFER_FROM = 'xfer-from', TRANSFER_TO = 'xfer-to', GENERIC_ADDRESS = 'adr', } export const core = { async listEntityTypes(namespace?: string): Promise { namespace throw new Error( 'core.listEntityTypes() is a native function implemented by the platform runtime', ) }, async removeEntitiesByBlock( chainId: BigNumberish, blockNumber: BigNumberish, maxForkIndex: BigNumberish, entityTypes: string[], namespace?: string, ): Promise { chainId blockNumber maxForkIndex entityTypes namespace throw new Error( 'core.removeEntitiesByBlock() is a native function implemented by the platform runtime', ) }, async ingestEventsByBlock( chainId: BigNumberish, blockNumber: BigNumberish, overrides?: Partial, ): Promise { chainId blockNumber overrides throw new Error( 'core.ingestEventsByBlock() is a native function implemented by the platform runtime', ) }, async ingestTransactionsByBlock( chainId: BigNumberish, blockNumber: BigNumberish, overrides?: Partial, ): Promise { chainId blockNumber overrides throw new Error( 'core.ingestTransactionsByBlock() is a native function implemented by the platform runtime', ) }, async ingestBlockByNumber( chainId: BigNumberish, blockNumber: BigNumberish, overrides?: Partial, ): Promise { chainId blockNumber overrides throw new Error( 'core.ingestBlockByNumber() is a native function implemented by the platform runtime', ) }, async upsertAddressToFilterGroup( userGroupId: string, location: FilterGroupAddressLocation, chainId: BigNumberish, address: string | string[], ): Promise { userGroupId location chainId address throw new Error( 'core.upsertAddressToFilterGroup() is a native function implemented by the platform runtime', ) }, async filterGroupContains( filterGroupId: string, input: FilterInput[], ): Promise { filterGroupId input throw new Error( 'core.filterGroupContains() is a native function implemented by the platform runtime', ) }, }