createListing

Creates a direct listing.

Example

import { createListing } from "thirdweb/extensions/marketplace";
import { sendTransaction } from "thirdweb";
const transaction = createListing({
assetContractAddress: "0x...", // the NFT contract address that you want to sell
tokenId={0n}, // the token id you want to sell
pricePerToken="0.1" // sell for 0.1 <native token>
});
await sendTransaction({ transaction, account });

Parameters

Returns

The result of creating the direct listing.