Marketplace.buyoutListing() method
Purchase NFTs
Example
// The listing ID of the asset you want to buy
const listingId = 0;
// Quantity of the asset you want to buy
const quantityDesired = 1;
await contract.buyoutListing(listingId, quantityDesired);
Signature:
buyoutListing(listingId: BigNumberish, quantityDesired?: BigNumberish, receiver?: string): Promise<TransactionResult>;
Parameters
Parameter | Type | Description |
---|---|---|
listingId | BigNumberish | the listing ID of the listing you want to buy |
quantityDesired | BigNumberish | (Optional) the quantity that you want to buy (for ERC1155 tokens) |
receiver | string | (Optional) optional receiver of the bought listing if different from the connected wallet (for direct listings only) |
Returns:
Promise<TransactionResult>
Remarks
Buy a Direct or Auction listing on your marketplace.