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 });
function acceptOffer(

Parameters

The options for accepting the offer.

Type

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

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