Skip to main content

MarketplaceV3.offers property

Offers

Example

// 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

// And on the seller's side:
// The ID of the offer you want to accept
const offerId = 0;
await contract.offers.acceptOffer(offerId);

Signature:

get offers(): MarketplaceV3Offers<OffersLogic>;

Remarks

Make and manage offers.