opensea-js
Version:
TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data
58 lines (57 loc) • 2.98 kB
TypeScript
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 Multicall3 {
type Call3Struct = {
target: AddressLike;
allowFailure: boolean;
callData: BytesLike;
};
type Call3StructOutput = [
target: string,
allowFailure: boolean,
callData: string
] & {
target: string;
allowFailure: boolean;
callData: string;
};
type ResultStruct = {
success: boolean;
returnData: BytesLike;
};
type ResultStructOutput = [success: boolean, returnData: string] & {
success: boolean;
returnData: string;
};
}
export interface Multicall3Interface extends Interface {
getFunction(nameOrSignature: "aggregate3"): FunctionFragment;
encodeFunctionData(functionFragment: "aggregate3", values: [Multicall3.Call3Struct[]]): string;
decodeFunctionResult(functionFragment: "aggregate3", data: BytesLike): Result;
}
export interface Multicall3 extends BaseContract {
connect(runner?: ContractRunner | null): Multicall3;
waitForDeployment(): Promise<this>;
interface: Multicall3Interface;
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>;
aggregate3: TypedContractMethod<[
calls: Multicall3.Call3Struct[]
], [
Multicall3.ResultStructOutput[]
], "payable">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "aggregate3"): TypedContractMethod<[
calls: Multicall3.Call3Struct[]
], [
Multicall3.ResultStructOutput[]
], "payable">;
filters: {};
}