import { BlockTag, Listener, Provider, TransactionRequest, TransactionResponse } from 'ethers/providers'; import { BigNumber, BigNumberish, EventFilter, Signer } from 'ethersv5'; import { AbiCoder, BytesLike as Arrayish, EventFragment, Fragment, FunctionFragment, Interface, LogDescription, ParamType, Result, TransactionDescription } from 'ethersv5/lib/utils'; export declare type EthersContractContextV5 = EthersContractV5 & TMethods; declare type ContractFunction = (...args: any[]) => Promise; declare class InternalInterface { readonly fragments: Fragment[]; readonly errors: { [name: string]: any; }; readonly events: { [name: string]: EventFragment; }; readonly functions: { [name: string]: FunctionFragment; }; readonly structs: { [name: string]: any; }; readonly deploy: any; format(format?: string): string | string[]; static getAbiCoder(): AbiCoder; static getAddress(address: string): string; static getSighash(functionFragment: FunctionFragment): string; static getEventTopic(eventFragment: EventFragment): string; getFunction(nameOrSignatureOrSighash: string): FunctionFragment; getEvent(nameOrSignatureOrTopic: string): EventFragment; getSighash(functionFragment: FunctionFragment | string): string; getEventTopic(eventFragment: EventFragment | string): string; _decodeParams(params: ParamType[], data: Arrayish): Result; _encodeParams(params: ParamType[], values: any[]): string; encodeDeploy(values?: any[]): string; decodeFunctionData(functionFragment: TMethodNames, data: Arrayish): Result; encodeFunctionData(functionFragment: FunctionFragment | TMethodNames, values?: any[]): string; decodeFunctionResult(functionFragment: FunctionFragment | TMethodNames, data: Arrayish): Result; encodeFunctionResult(functionFragment: FunctionFragment | TMethodNames, values?: any[]): string; encodeFilterTopics(eventFragment: EventFragment, values: any[]): Array>; encodeEventLog(eventFragment: EventFragment, values: any[]): { data: string; topics: string[]; }; decodeEventLog(eventFragment: EventFragment | string, data: Arrayish, topics?: string[]): Result; parseTransaction(tx: { data: string; value?: BigNumberish; }): TransactionDescription; parseLog(log: { topics: string[]; data: string; }): LogDescription; static isInterface(value: any): value is Interface; } interface ContractVersionV5 { readonly address: string; readonly interface: InternalInterface; readonly signer: Signer; readonly provider: Provider; readonly callStatic: { [name: string]: ContractFunction; }; readonly estimateGas: { [name: string]: ContractFunction; }; readonly populateTransaction: { [name: string]: ContractFunction<{ to?: string; from?: string; nonce?: number; gasLimit?: BigNumber; gasPrice?: BigNumber; data?: string; value?: BigNumber; chainId?: number; }>; }; readonly addressPromise: Promise; readonly deployTransaction: TransactionResponse; fallback(overrides?: TransactionRequest): Promise; emit(eventName: EventFilter | string, ...args: any[]): boolean; listenerCount(eventName?: EventFilter | string): number; listeners(eventName: EventFilter | string): Listener[]; } interface EthersContractV5 extends ContractVersionV5 { readonly functions: TMethods; readonly filters: TEventsContext; deployed(): Promise>; _deployed(blockTag?: BlockTag): Promise>; /** * Type any here so if you are using a different version of ethers then * installed it will still compile * @param signerOrProvider should be type of Wallet | Signer | Provider | string */ connect(signerOrProvider: any): EthersContractContextV5; attach(addressOrName: string): EthersContractContextV5; on(event: EventFilter | TEventType, listener: Listener): EthersContractContextV5; once(event: EventFilter | TEventType, listener: Listener): EthersContractContextV5; addListener(eventName: EventFilter | TEventType, listener: Listener): EthersContractContextV5; removeAllListeners(eventName: EventFilter | TEventType): EthersContractContextV5; removeListener(eventName: TEventType, listener: Listener): EthersContractContextV5; queryFilter(event: EventFilter | string, fromBlockOrBlockhash?: BlockTag | string, toBlock?: BlockTag): Promise; } export {};