UNPKG

@api3/contracts

Version:

Contracts through which API3 services are delivered

72 lines 5.2 kB
import type { BaseContract, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers"; import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../common"; export interface ExtendedSelfMulticallInterface extends Interface { getFunction(nameOrSignature: "containsBytecode" | "getBalance" | "getBlockBasefee" | "getBlockNumber" | "getBlockTimestamp" | "getChainId" | "multicall" | "tryMulticall"): FunctionFragment; encodeFunctionData(functionFragment: "containsBytecode", values: [AddressLike]): string; encodeFunctionData(functionFragment: "getBalance", values: [AddressLike]): string; encodeFunctionData(functionFragment: "getBlockBasefee", values?: undefined): string; encodeFunctionData(functionFragment: "getBlockNumber", values?: undefined): string; encodeFunctionData(functionFragment: "getBlockTimestamp", values?: undefined): string; encodeFunctionData(functionFragment: "getChainId", values?: undefined): string; encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; encodeFunctionData(functionFragment: "tryMulticall", values: [BytesLike[]]): string; decodeFunctionResult(functionFragment: "containsBytecode", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getBalance", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getBlockBasefee", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getBlockNumber", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getBlockTimestamp", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getChainId", data: BytesLike): Result; decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; decodeFunctionResult(functionFragment: "tryMulticall", data: BytesLike): Result; } export interface ExtendedSelfMulticall extends BaseContract { connect(runner?: ContractRunner | null): ExtendedSelfMulticall; waitForDeployment(): Promise<this>; interface: ExtendedSelfMulticallInterface; queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>; queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>; on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>; on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>; once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>; once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>; listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>; listeners(eventName?: string): Promise<Array<Listener>>; removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>; containsBytecode: TypedContractMethod<[ account: AddressLike ], [ boolean ], "view">; getBalance: TypedContractMethod<[account: AddressLike], [bigint], "view">; getBlockBasefee: TypedContractMethod<[], [bigint], "view">; getBlockNumber: TypedContractMethod<[], [bigint], "view">; getBlockTimestamp: TypedContractMethod<[], [bigint], "view">; getChainId: TypedContractMethod<[], [bigint], "view">; multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "nonpayable">; tryMulticall: TypedContractMethod<[ data: BytesLike[] ], [ [boolean[], string[]] & { successes: boolean[]; returndata: string[]; } ], "nonpayable">; getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T; getFunction(nameOrSignature: "containsBytecode"): TypedContractMethod<[account: AddressLike], [boolean], "view">; getFunction(nameOrSignature: "getBalance"): TypedContractMethod<[account: AddressLike], [bigint], "view">; getFunction(nameOrSignature: "getBlockBasefee"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "getBlockNumber"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "getBlockTimestamp"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "getChainId"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "nonpayable">; getFunction(nameOrSignature: "tryMulticall"): TypedContractMethod<[ data: BytesLike[] ], [ [boolean[], string[]] & { successes: boolean[]; returndata: string[]; } ], "nonpayable">; filters: {}; } //# sourceMappingURL=ExtendedSelfMulticall.d.ts.map