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";
import { sendTransaction } from "thirdweb";
const acceptOfferTx = acceptOffer({
contract,
offerId: 1n,
});
await sendTransaction({ transaction, account });

Parameters

Returns

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