UNPKG

@thirdweb-dev/contracts-js

Version:
349 lines • 20 kB
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction, Signer, utils } from "ethers"; import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; import type { Listener, Provider } from "@ethersproject/providers"; import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; export declare namespace IDirectListings { type ListingParametersStruct = { assetContract: string; tokenId: BigNumberish; quantity: BigNumberish; currency: string; pricePerToken: BigNumberish; startTimestamp: BigNumberish; endTimestamp: BigNumberish; reserved: boolean; }; type ListingParametersStructOutput = [ string, BigNumber, BigNumber, string, BigNumber, BigNumber, BigNumber, boolean ] & { assetContract: string; tokenId: BigNumber; quantity: BigNumber; currency: string; pricePerToken: BigNumber; startTimestamp: BigNumber; endTimestamp: BigNumber; reserved: boolean; }; type ListingStruct = { listingId: BigNumberish; tokenId: BigNumberish; quantity: BigNumberish; pricePerToken: BigNumberish; startTimestamp: BigNumberish; endTimestamp: BigNumberish; listingCreator: string; assetContract: string; currency: string; tokenType: BigNumberish; status: BigNumberish; reserved: boolean; }; type ListingStructOutput = [ BigNumber, BigNumber, BigNumber, BigNumber, BigNumber, BigNumber, string, string, string, number, number, boolean ] & { listingId: BigNumber; tokenId: BigNumber; quantity: BigNumber; pricePerToken: BigNumber; startTimestamp: BigNumber; endTimestamp: BigNumber; listingCreator: string; assetContract: string; currency: string; tokenType: number; status: number; reserved: boolean; }; } export interface IDirectListingsInterface extends utils.Interface { functions: { "approveBuyerForListing(uint256,address,bool)": FunctionFragment; "approveCurrencyForListing(uint256,address,uint256)": FunctionFragment; "buyFromListing(uint256,address,uint256,address,uint256)": FunctionFragment; "cancelListing(uint256)": FunctionFragment; "createListing((address,uint256,uint256,address,uint256,uint128,uint128,bool))": FunctionFragment; "getAllListings(uint256,uint256)": FunctionFragment; "getAllValidListings(uint256,uint256)": FunctionFragment; "getListing(uint256)": FunctionFragment; "totalListings()": FunctionFragment; "updateListing(uint256,(address,uint256,uint256,address,uint256,uint128,uint128,bool))": FunctionFragment; }; getFunction(nameOrSignatureOrTopic: "approveBuyerForListing" | "approveCurrencyForListing" | "buyFromListing" | "cancelListing" | "createListing" | "getAllListings" | "getAllValidListings" | "getListing" | "totalListings" | "updateListing"): FunctionFragment; encodeFunctionData(functionFragment: "approveBuyerForListing", values: [BigNumberish, string, boolean]): string; encodeFunctionData(functionFragment: "approveCurrencyForListing", values: [BigNumberish, string, BigNumberish]): string; encodeFunctionData(functionFragment: "buyFromListing", values: [BigNumberish, string, BigNumberish, string, BigNumberish]): string; encodeFunctionData(functionFragment: "cancelListing", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "createListing", values: [IDirectListings.ListingParametersStruct]): string; encodeFunctionData(functionFragment: "getAllListings", values: [BigNumberish, BigNumberish]): string; encodeFunctionData(functionFragment: "getAllValidListings", values: [BigNumberish, BigNumberish]): string; encodeFunctionData(functionFragment: "getListing", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "totalListings", values?: undefined): string; encodeFunctionData(functionFragment: "updateListing", values: [BigNumberish, IDirectListings.ListingParametersStruct]): string; decodeFunctionResult(functionFragment: "approveBuyerForListing", data: BytesLike): Result; decodeFunctionResult(functionFragment: "approveCurrencyForListing", data: BytesLike): Result; decodeFunctionResult(functionFragment: "buyFromListing", data: BytesLike): Result; decodeFunctionResult(functionFragment: "cancelListing", data: BytesLike): Result; decodeFunctionResult(functionFragment: "createListing", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getAllListings", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getAllValidListings", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getListing", data: BytesLike): Result; decodeFunctionResult(functionFragment: "totalListings", data: BytesLike): Result; decodeFunctionResult(functionFragment: "updateListing", data: BytesLike): Result; events: { "BuyerApprovedForListing(uint256,address,bool)": EventFragment; "CancelledListing(address,uint256)": EventFragment; "CurrencyApprovedForListing(uint256,address,uint256)": EventFragment; "NewListing(address,uint256,address,tuple)": EventFragment; "NewSale(address,uint256,address,uint256,address,uint256,uint256)": EventFragment; "UpdatedListing(address,uint256,address,tuple)": EventFragment; }; getEvent(nameOrSignatureOrTopic: "BuyerApprovedForListing"): EventFragment; getEvent(nameOrSignatureOrTopic: "CancelledListing"): EventFragment; getEvent(nameOrSignatureOrTopic: "CurrencyApprovedForListing"): EventFragment; getEvent(nameOrSignatureOrTopic: "NewListing"): EventFragment; getEvent(nameOrSignatureOrTopic: "NewSale"): EventFragment; getEvent(nameOrSignatureOrTopic: "UpdatedListing"): EventFragment; } export interface BuyerApprovedForListingEventObject { listingId: BigNumber; buyer: string; approved: boolean; } export type BuyerApprovedForListingEvent = TypedEvent<[ BigNumber, string, boolean ], BuyerApprovedForListingEventObject>; export type BuyerApprovedForListingEventFilter = TypedEventFilter<BuyerApprovedForListingEvent>; export interface CancelledListingEventObject { listingCreator: string; listingId: BigNumber; } export type CancelledListingEvent = TypedEvent<[ string, BigNumber ], CancelledListingEventObject>; export type CancelledListingEventFilter = TypedEventFilter<CancelledListingEvent>; export interface CurrencyApprovedForListingEventObject { listingId: BigNumber; currency: string; pricePerToken: BigNumber; } export type CurrencyApprovedForListingEvent = TypedEvent<[ BigNumber, string, BigNumber ], CurrencyApprovedForListingEventObject>; export type CurrencyApprovedForListingEventFilter = TypedEventFilter<CurrencyApprovedForListingEvent>; export interface NewListingEventObject { listingCreator: string; listingId: BigNumber; assetContract: string; listing: IDirectListings.ListingStructOutput; } export type NewListingEvent = TypedEvent<[ string, BigNumber, string, IDirectListings.ListingStructOutput ], NewListingEventObject>; export type NewListingEventFilter = TypedEventFilter<NewListingEvent>; export interface NewSaleEventObject { listingCreator: string; listingId: BigNumber; assetContract: string; tokenId: BigNumber; buyer: string; quantityBought: BigNumber; totalPricePaid: BigNumber; } export type NewSaleEvent = TypedEvent<[ string, BigNumber, string, BigNumber, string, BigNumber, BigNumber ], NewSaleEventObject>; export type NewSaleEventFilter = TypedEventFilter<NewSaleEvent>; export interface UpdatedListingEventObject { listingCreator: string; listingId: BigNumber; assetContract: string; listing: IDirectListings.ListingStructOutput; } export type UpdatedListingEvent = TypedEvent<[ string, BigNumber, string, IDirectListings.ListingStructOutput ], UpdatedListingEventObject>; export type UpdatedListingEventFilter = TypedEventFilter<UpdatedListingEvent>; export interface IDirectListings extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise<this>; interface: IDirectListingsInterface; queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>; listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>; listeners(eventName?: string): Array<Listener>; removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this; removeAllListeners(eventName?: string): this; off: OnEvent<this>; on: OnEvent<this>; once: OnEvent<this>; removeListener: OnEvent<this>; functions: { approveBuyerForListing(_listingId: BigNumberish, _buyer: string, _toApprove: boolean, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; approveCurrencyForListing(_listingId: BigNumberish, _currency: string, _pricePerTokenInCurrency: BigNumberish, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; buyFromListing(_listingId: BigNumberish, _buyFor: string, _quantity: BigNumberish, _currency: string, _expectedTotalPrice: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; cancelListing(_listingId: BigNumberish, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; createListing(_params: IDirectListings.ListingParametersStruct, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; getAllListings(_startId: BigNumberish, _endId: BigNumberish, overrides?: CallOverrides): Promise<[ IDirectListings.ListingStructOutput[] ] & { listings: IDirectListings.ListingStructOutput[]; }>; getAllValidListings(_startId: BigNumberish, _endId: BigNumberish, overrides?: CallOverrides): Promise<[ IDirectListings.ListingStructOutput[] ] & { listings: IDirectListings.ListingStructOutput[]; }>; getListing(_listingId: BigNumberish, overrides?: CallOverrides): Promise<[ IDirectListings.ListingStructOutput ] & { listing: IDirectListings.ListingStructOutput; }>; totalListings(overrides?: CallOverrides): Promise<[BigNumber]>; updateListing(_listingId: BigNumberish, _params: IDirectListings.ListingParametersStruct, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; }; approveBuyerForListing(_listingId: BigNumberish, _buyer: string, _toApprove: boolean, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; approveCurrencyForListing(_listingId: BigNumberish, _currency: string, _pricePerTokenInCurrency: BigNumberish, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; buyFromListing(_listingId: BigNumberish, _buyFor: string, _quantity: BigNumberish, _currency: string, _expectedTotalPrice: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; cancelListing(_listingId: BigNumberish, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; createListing(_params: IDirectListings.ListingParametersStruct, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; getAllListings(_startId: BigNumberish, _endId: BigNumberish, overrides?: CallOverrides): Promise<IDirectListings.ListingStructOutput[]>; getAllValidListings(_startId: BigNumberish, _endId: BigNumberish, overrides?: CallOverrides): Promise<IDirectListings.ListingStructOutput[]>; getListing(_listingId: BigNumberish, overrides?: CallOverrides): Promise<IDirectListings.ListingStructOutput>; totalListings(overrides?: CallOverrides): Promise<BigNumber>; updateListing(_listingId: BigNumberish, _params: IDirectListings.ListingParametersStruct, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<ContractTransaction>; callStatic: { approveBuyerForListing(_listingId: BigNumberish, _buyer: string, _toApprove: boolean, overrides?: CallOverrides): Promise<void>; approveCurrencyForListing(_listingId: BigNumberish, _currency: string, _pricePerTokenInCurrency: BigNumberish, overrides?: CallOverrides): Promise<void>; buyFromListing(_listingId: BigNumberish, _buyFor: string, _quantity: BigNumberish, _currency: string, _expectedTotalPrice: BigNumberish, overrides?: CallOverrides): Promise<void>; cancelListing(_listingId: BigNumberish, overrides?: CallOverrides): Promise<void>; createListing(_params: IDirectListings.ListingParametersStruct, overrides?: CallOverrides): Promise<BigNumber>; getAllListings(_startId: BigNumberish, _endId: BigNumberish, overrides?: CallOverrides): Promise<IDirectListings.ListingStructOutput[]>; getAllValidListings(_startId: BigNumberish, _endId: BigNumberish, overrides?: CallOverrides): Promise<IDirectListings.ListingStructOutput[]>; getListing(_listingId: BigNumberish, overrides?: CallOverrides): Promise<IDirectListings.ListingStructOutput>; totalListings(overrides?: CallOverrides): Promise<BigNumber>; updateListing(_listingId: BigNumberish, _params: IDirectListings.ListingParametersStruct, overrides?: CallOverrides): Promise<void>; }; filters: { "BuyerApprovedForListing(uint256,address,bool)"(listingId?: BigNumberish | null, buyer?: string | null, approved?: null): BuyerApprovedForListingEventFilter; BuyerApprovedForListing(listingId?: BigNumberish | null, buyer?: string | null, approved?: null): BuyerApprovedForListingEventFilter; "CancelledListing(address,uint256)"(listingCreator?: string | null, listingId?: BigNumberish | null): CancelledListingEventFilter; CancelledListing(listingCreator?: string | null, listingId?: BigNumberish | null): CancelledListingEventFilter; "CurrencyApprovedForListing(uint256,address,uint256)"(listingId?: BigNumberish | null, currency?: string | null, pricePerToken?: null): CurrencyApprovedForListingEventFilter; CurrencyApprovedForListing(listingId?: BigNumberish | null, currency?: string | null, pricePerToken?: null): CurrencyApprovedForListingEventFilter; "NewListing(address,uint256,address,tuple)"(listingCreator?: string | null, listingId?: BigNumberish | null, assetContract?: string | null, listing?: null): NewListingEventFilter; NewListing(listingCreator?: string | null, listingId?: BigNumberish | null, assetContract?: string | null, listing?: null): NewListingEventFilter; "NewSale(address,uint256,address,uint256,address,uint256,uint256)"(listingCreator?: string | null, listingId?: BigNumberish | null, assetContract?: string | null, tokenId?: null, buyer?: null, quantityBought?: null, totalPricePaid?: null): NewSaleEventFilter; NewSale(listingCreator?: string | null, listingId?: BigNumberish | null, assetContract?: string | null, tokenId?: null, buyer?: null, quantityBought?: null, totalPricePaid?: null): NewSaleEventFilter; "UpdatedListing(address,uint256,address,tuple)"(listingCreator?: string | null, listingId?: BigNumberish | null, assetContract?: string | null, listing?: null): UpdatedListingEventFilter; UpdatedListing(listingCreator?: string | null, listingId?: BigNumberish | null, assetContract?: string | null, listing?: null): UpdatedListingEventFilter; }; estimateGas: { approveBuyerForListing(_listingId: BigNumberish, _buyer: string, _toApprove: boolean, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<BigNumber>; approveCurrencyForListing(_listingId: BigNumberish, _currency: string, _pricePerTokenInCurrency: BigNumberish, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<BigNumber>; buyFromListing(_listingId: BigNumberish, _buyFor: string, _quantity: BigNumberish, _currency: string, _expectedTotalPrice: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise<string>; }): Promise<BigNumber>; cancelListing(_listingId: BigNumberish, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<BigNumber>; createListing(_params: IDirectListings.ListingParametersStruct, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<BigNumber>; getAllListings(_startId: BigNumberish, _endId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>; getAllValidListings(_startId: BigNumberish, _endId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>; getListing(_listingId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>; totalListings(overrides?: CallOverrides): Promise<BigNumber>; updateListing(_listingId: BigNumberish, _params: IDirectListings.ListingParametersStruct, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<BigNumber>; }; populateTransaction: { approveBuyerForListing(_listingId: BigNumberish, _buyer: string, _toApprove: boolean, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<PopulatedTransaction>; approveCurrencyForListing(_listingId: BigNumberish, _currency: string, _pricePerTokenInCurrency: BigNumberish, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<PopulatedTransaction>; buyFromListing(_listingId: BigNumberish, _buyFor: string, _quantity: BigNumberish, _currency: string, _expectedTotalPrice: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise<string>; }): Promise<PopulatedTransaction>; cancelListing(_listingId: BigNumberish, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<PopulatedTransaction>; createListing(_params: IDirectListings.ListingParametersStruct, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<PopulatedTransaction>; getAllListings(_startId: BigNumberish, _endId: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>; getAllValidListings(_startId: BigNumberish, _endId: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>; getListing(_listingId: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>; totalListings(overrides?: CallOverrides): Promise<PopulatedTransaction>; updateListing(_listingId: BigNumberish, _params: IDirectListings.ListingParametersStruct, overrides?: Overrides & { from?: string | Promise<string>; }): Promise<PopulatedTransaction>; }; } //# sourceMappingURL=IDirectListings.d.ts.map