import type { BaseContract, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers"; import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../common"; export declare namespace Multicall { type CallStruct = { target: AddressLike; callData: BytesLike; }; type CallStructOutput = [target: string, callData: string] & { target: string; callData: string; }; } export interface MulticallInterface extends Interface { getFunction(nameOrSignature: "aggregate" | "getBlockNumber" | "getCurrentBlockTimestamp" | "getLastBlockHash"): FunctionFragment; encodeFunctionData(functionFragment: "aggregate", values: [Multicall.CallStruct[]]): string; encodeFunctionData(functionFragment: "getBlockNumber", values?: undefined): string; encodeFunctionData(functionFragment: "getCurrentBlockTimestamp", values?: undefined): string; encodeFunctionData(functionFragment: "getLastBlockHash", values?: undefined): string; decodeFunctionResult(functionFragment: "aggregate", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getBlockNumber", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getCurrentBlockTimestamp", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getLastBlockHash", data: BytesLike): Result; } export interface Multicall extends BaseContract { connect(runner?: ContractRunner | null): Multicall; waitForDeployment(): Promise; interface: MulticallInterface; queryFilter(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>>; queryFilter(filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>>; on(event: TCEvent, listener: TypedListener): Promise; on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise; once(event: TCEvent, listener: TypedListener): Promise; once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise; listeners(event: TCEvent): Promise>>; listeners(eventName?: string): Promise>; removeAllListeners(event?: TCEvent): Promise; aggregate: TypedContractMethod<[ calls: Multicall.CallStruct[] ], [ [bigint, string[]] & { blockNumber: bigint; returnData: string[]; } ], "nonpayable">; getBlockNumber: TypedContractMethod<[], [bigint], "view">; getCurrentBlockTimestamp: TypedContractMethod<[], [bigint], "view">; getLastBlockHash: TypedContractMethod<[], [string], "view">; getFunction(key: string | FunctionFragment): T; getFunction(nameOrSignature: "aggregate"): TypedContractMethod<[ calls: Multicall.CallStruct[] ], [ [bigint, string[]] & { blockNumber: bigint; returnData: string[]; } ], "nonpayable">; getFunction(nameOrSignature: "getBlockNumber"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "getCurrentBlockTimestamp"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "getLastBlockHash"): TypedContractMethod<[], [string], "view">; filters: {}; }