import type { TLogsRangeProgress, Web3Client } from '../clients/Web3Client'; import type { ITxWriterOptions, TxWriter } from '../txs/TxWriter'; import type { TAccount } from "../models/TAccount"; import type { TAbiItem } from '../types/TAbi'; import type { IBlockchainExplorer } from '../explorer/IBlockchainExplorer'; import type { TAddress } from '../models/TAddress'; import type { ITxBuilderOptions } from '../txs/ITxBuilderOptions'; import { ContractReaderUtils } from './ContractReader'; import { ContractWriter } from './ContractWriter'; import { BlocksTxIndexer, TBlockListener } from '../indexer/BlocksTxIndexer'; import { SubjectStream } from '../class/SubjectStream'; import { TEth } from '../models/TEth'; import { RpcTypes } from '../rpc/Rpc'; import { ContractStorageReaderBase } from './ContractStorageReaderBase'; import { ITxLogItem } from '../txs/receipt/ITxLogItem'; import { WClient } from '../clients/ClientPool'; export declare abstract class ContractBase { address: TAddress; client: Web3Client; explorer: IBlockchainExplorer; private blockNumber?; private blockDate?; /** 1.4 for medium*/ private gasPriorityFee?; protected builderConfig?: ITxBuilderOptions; protected writerConfig?: ITxWriterOptions; abstract abi?: TAbiItem[]; abstract Types?: TContractTypes; $meta?: { artifact?: string; class?: string; source?: string; name?: string; }; storage?: ContractStorageReaderBase; constructor(address: TAddress, client: Web3Client, explorer: IBlockchainExplorer); $getStorageAt(position: number | bigint | TEth.Hex): Promise<`0x${string}`>; $parseInputData(buffer: TEth.BufferLike, value?: string): { name: string; args: any[]; params: { [key: string]: any; }; value: string | number | bigint; }; $executeBatch(values: T): Promise<{ -readonly [P in keyof T]: ContractReaderUtils.TIContractReadParamsInferred; }>; getPastLogs(event: TEventName | TEventName[], options?: TEventLogOptions>): Promise, TEventName>[]>; $config(builderConfig?: ITxBuilderOptions, writerConfig?: ITxWriterOptions): this; $address(this: T, address: TAddress): T; $call(): any; $data(params?: { estimateGas?: boolean; getNonce?: boolean; from?: TAddress; }): any; $gas(): any; $req(): { [K in keyof this]: this[K] extends (...any: any[]) => Promise ? (...params: Parameters) => ContractReaderUtils.IContractReadParams>> : never; }; $signed(builderConfig?: ITxBuilderOptions, writerConfig?: ITxWriterOptions): any; private $signedCreate; $receipt(this: T): T; forBlock(mix: number | bigint | undefined | Date): this; protected forBlockNumber(blockNumber: number | bigint | undefined): this; protected forBlockAt(date: Date | undefined): this; protected $read(abi: string | TAbiItem, ...params: any[]): Promise | ContractReaderUtils.IContractReadParams; $onLog(event: string, cb?: any): import("../clients/ClientEventsStream").ClientEventsStream; $onTransaction(options?: BlockWalker.IBlockWalkerOptions): SubjectStream<{ tx: TEth.Tx; block: TEth.Block; calldata: { method: any; arguments: any[]; }; }>; protected $write(abi: string | TAbiItem, account: TAccount & { value?: number | string | bigint; }, ...params: any[]): Promise; protected $getAbiItem(type: 'event' | 'function' | 'string', name: string, argsCount?: number): TAbiItem; protected $getAbiItemOverload(fnName: string, args: any[]): any; protected $getAbiItemOverload(abis: (string | TAbiItem)[], args: any[]): any; protected $extractLogs(tx: TEth.TxReceipt, abiItem: TAbiItem): ITxLogItem<{ [name: string]: any; }, string>[]; protected $extractLog(log: TEth.Log, mix: string | string[] | TAbiItem | TAbiItem[] | '*'): ITxLogItem<{ [name: string]: any; }, string>; protected $getPastLogs(filters: RpcTypes.Filter, options?: { streamed?: boolean; blockRangeLimits?: WClient['blockRangeLimits']; onProgress?(info: TLogsRangeProgress): any; }): Promise; $getPastLogsParsed(mix: string | TAbiItem | string[] | TAbiItem[], options?: { addresses?: TAddress[]; fromBlock?: number | Date; toBlock?: number | Date; params?: { [key: string]: any; }; onProgress?(info: TLogsRangeProgress): any; /** if TRUE the data will be only forwarded via onProgress callback. * And the final array will be undefined. * This will handle big queries to hold huge arrays in memory * */ streamed?: boolean; blockRangeLimits?: WClient['blockRangeLimits']; }): Promise; protected $getPastLogsFilters(mix: string | TAbiItem | string[] | TAbiItem[], options: { addresses?: TAddress[]; topic?: string; fromBlock?: number | Date; toBlock?: number | Date; params?: { [key: string]: any; }; }): Promise; private getContractReader; private getContractReaderInner; protected getContractWriter(): ContractWriter; private getContractStream; } declare namespace BlockWalker { interface IBlockWalkerOptions { name?: string; persistence?: boolean; logProgress?: boolean; fromBlock?: number; filter?: { method?: string; arguments?: any[]; }; } function onBlock(client: Web3Client, options: IBlockWalkerOptions, cb: TBlockListener): BlocksTxIndexer; } export type TContractTypes = { Events: TEventsBase; }; type TEventsBase = { [name: string]: { outputParams: Record; outputArgs: any[]; }; }; export type TEventLogOptions = { addresses?: TAddress[]; fromBlock?: number | Date; toBlock?: number | Date; params?: TParams; streamed?: boolean; onProgress?(info: TLogsRangeProgress): any; blockRangeLimits?: WClient['blockRangeLimits']; }; type TEventParams = Partial; export {};