buyFromListing

Buys a listing from the marketplace.

Example

import { buyFromListing } from "thirdweb/extensions/marketplace";
import { sendTransaction } from "thirdweb";
const transaction = buyFromListing({
contract,
listingId: 1n,
quantity: 1n,
recipient: "0x...",
});
await sendTransaction({ transaction, account });

Parameters

Returns

A promise that resolves to the transaction result.