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

Parameters

The options for buying from a listing.

Type

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A promise that resolves to the transaction result.