Docs

acceptOffer

Accepts an offer after performing necessary checks and validations. Throws an error if the offer is not active, the offeror's balance is insufficient, or the offeror's allowance is insufficient.

Example

import { acceptOffer } from "thirdweb/extensions/marketplace";
const acceptOfferTx = acceptOffer({
contract,
offerId: 1n,
});

Parameters

Returns

A transaction object that can be sent to accept the offer.