Accept an offer
Rest
...args: [offerId: BigNumberish]the transaction receipt
// The ID of the offer you want to accept
const offerId = 0;
await contract.offers.acceptOffer(offerId);
Offers
Rest
...args: [offerId: BigNumberish]Cancel an offer
Rest
...args: [offerId: BigNumberish]the transaction receipt
Cancel an offer on the marketplace
// The ID of the offer you want to cancel
const offerId = "0";
await contract.offers.cancelOffer(offerId);
Offers
Rest
...args: [offerId: BigNumberish]Private
contractMake an offer
Rest
...args: [offer: { the transaction receipt and the id of the newly created offer
Make an offer on the marketplace for an asset.
// Data of the offer you want to make
const offer = {
// address of the contract the asset you want to make an offer for
assetContractAddress: "0x...",
// token ID of the asset you want to buy
tokenId: "0",
// how many of the asset you want to buy
quantity: 1,
// address of the currency contract that you offer to pay in
currencyContractAddress: NATIVE_TOKEN_ADDRESS,
// Total price you offer to pay for the mentioned token(s)
totalPrice: "1.5",
// Offer valid until
endTimestamp: new Date(),
}
const tx = await contract.offers.makeOffer(offer);
const receipt = tx.receipt; // the transaction receipt
const id = tx.id; // the id of the newly created offer
Offers
Rest
...args: [offer: { Private
storagePrivate
applyOptional
filter: MarketplaceFilterWithoutSellerGet all offers
Optional
filter: MarketplaceFilterWithoutSelleroptional filter parameters
the Offer object array
const offers = await contract.offers.getAll();
Offers
Get all valid offers
Optional
filter: MarketplaceFilterWithoutSelleroptional filter parameters
the Offer object array
const offers = await contract.offers.getAllValid();
Offers
Private
validateGenerated using TypeDoc
Handles marketplace offers