Table of Contents

Class ThirdwebMarketplaceExtensions

Namespace
Thirdweb
Assembly
Thirdweb.dll
public static class ThirdwebMarketplaceExtensions
Inheritance
ThirdwebMarketplaceExtensions
Inherited Members

Methods

Marketplace_DirectListings_ApproveBuyerForListing(ThirdwebContract, IThirdwebWallet, BigInteger, string, bool)

Approves a buyer to purchase from a reserved listing.

public static Task<ThirdwebTransactionReceipt> Marketplace_DirectListings_ApproveBuyerForListing(this ThirdwebContract contract, IThirdwebWallet wallet, BigInteger listingId, string buyer, bool toApprove)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

listingId BigInteger

The ID of the listing.

buyer string

The address of the buyer to approve.

toApprove bool

Whether to approve or disapprove the buyer.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the approval.

Marketplace_DirectListings_ApproveCurrencyForListing(ThirdwebContract, IThirdwebWallet, BigInteger, string, BigInteger)

Approves a currency for a direct listing.

public static Task<ThirdwebTransactionReceipt> Marketplace_DirectListings_ApproveCurrencyForListing(this ThirdwebContract contract, IThirdwebWallet wallet, BigInteger listingId, string currency, BigInteger pricePerTokenInCurrency)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

listingId BigInteger

The ID of the listing.

currency string

The address of the currency to approve.

pricePerTokenInCurrency BigInteger

The price per token in the specified currency.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the currency approval.

Marketplace_DirectListings_BuyFromListing(ThirdwebContract, IThirdwebWallet, BigInteger, string, BigInteger, string, BigInteger, bool)

Buys from a direct listing.

public static Task<ThirdwebTransactionReceipt> Marketplace_DirectListings_BuyFromListing(this ThirdwebContract contract, IThirdwebWallet wallet, BigInteger listingId, string buyFor, BigInteger quantity, string currency, BigInteger expectedTotalPrice, bool handleApprovals = false)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

listingId BigInteger

The ID of the listing.

buyFor string

The recipient address for the purchased NFTs.

quantity BigInteger

The quantity of NFTs to buy.

currency string

The currency to use for the purchase.

expectedTotalPrice BigInteger

The expected total price to pay.

handleApprovals bool

Whether to handle token approvals automatically.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the purchase.

Marketplace_DirectListings_CancelListing(ThirdwebContract, IThirdwebWallet, BigInteger)

Cancels a direct listing.

public static Task<ThirdwebTransactionReceipt> Marketplace_DirectListings_CancelListing(this ThirdwebContract contract, IThirdwebWallet wallet, BigInteger listingId)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

listingId BigInteger

The ID of the listing to cancel.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the listing cancellation.

Marketplace_DirectListings_CreateListing(ThirdwebContract, IThirdwebWallet, ListingParameters, bool)

Creates a new direct listing for selling NFTs at a fixed price.

public static Task<ThirdwebTransactionReceipt> Marketplace_DirectListings_CreateListing(this ThirdwebContract contract, IThirdwebWallet wallet, ListingParameters parameters, bool handleApprovals = false)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

parameters ListingParameters

The parameters of the listing to be created.

handleApprovals bool

Whether to handle token approvals automatically.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the listing creation.

Marketplace_DirectListings_CurrencyPriceForListing(ThirdwebContract, BigInteger, string)

Gets the price per token for a direct listing in the specified currency.

public static Task<BigInteger> Marketplace_DirectListings_CurrencyPriceForListing(this ThirdwebContract contract, BigInteger listingId, string currency)

Parameters

contract ThirdwebContract

The contract instance.

listingId BigInteger

The ID of the listing.

currency string

The address of the currency to check.

Returns

Task<BigInteger>

A task that represents the price per token in the specified currency.

Marketplace_DirectListings_GetAllListings(ThirdwebContract, BigInteger, BigInteger)

Gets all direct listings within a given range of IDs.

public static Task<List<Listing>> Marketplace_DirectListings_GetAllListings(this ThirdwebContract contract, BigInteger startId, BigInteger endId)

Parameters

contract ThirdwebContract

The contract instance.

startId BigInteger

The start ID of the range.

endId BigInteger

The end ID of the range.

Returns

Task<List<Listing>>

A task that represents a list of listings within the range.

Marketplace_DirectListings_GetAllValidListings(ThirdwebContract, BigInteger, BigInteger)

Gets all valid direct listings within a given range of IDs.

public static Task<List<Listing>> Marketplace_DirectListings_GetAllValidListings(this ThirdwebContract contract, BigInteger startId, BigInteger endId)

Parameters

contract ThirdwebContract

The contract instance.

startId BigInteger

The start ID of the range.

endId BigInteger

The end ID of the range.

Returns

Task<List<Listing>>

A task that represents a list of valid listings within the range.

Marketplace_DirectListings_GetListing(ThirdwebContract, BigInteger)

Gets a specific direct listing by its ID.

public static Task<Listing> Marketplace_DirectListings_GetListing(this ThirdwebContract contract, BigInteger listingId)

Parameters

contract ThirdwebContract

The contract instance.

listingId BigInteger

The ID of the listing to fetch.

Returns

Task<Listing>

A task that represents the requested listing.

Marketplace_DirectListings_IsBuyerApprovedForListing(ThirdwebContract, BigInteger, string)

Checks whether a buyer is approved for a direct listing.

public static Task<bool> Marketplace_DirectListings_IsBuyerApprovedForListing(this ThirdwebContract contract, BigInteger listingId, string buyer)

Parameters

contract ThirdwebContract

The contract instance.

listingId BigInteger

The ID of the listing.

buyer string

The address of the buyer to check.

Returns

Task<bool>

A task that represents a boolean indicating if the buyer is approved.

Marketplace_DirectListings_IsCurrencyApprovedForListing(ThirdwebContract, BigInteger, string)

Checks whether a currency is approved for a direct listing.

public static Task<bool> Marketplace_DirectListings_IsCurrencyApprovedForListing(this ThirdwebContract contract, BigInteger listingId, string currency)

Parameters

contract ThirdwebContract

The contract instance.

listingId BigInteger

The ID of the listing.

currency string

The address of the currency to check.

Returns

Task<bool>

A task that represents a boolean indicating if the currency is approved.

Marketplace_DirectListings_TotalListings(ThirdwebContract)

Gets the total number of direct listings created.

public static Task<BigInteger> Marketplace_DirectListings_TotalListings(this ThirdwebContract contract)

Parameters

contract ThirdwebContract

The contract instance.

Returns

Task<BigInteger>

A task that represents the total number of direct listings.

Marketplace_DirectListings_UpdateListing(ThirdwebContract, IThirdwebWallet, BigInteger, ListingParameters)

Updates an existing direct listing.

public static Task<ThirdwebTransactionReceipt> Marketplace_DirectListings_UpdateListing(this ThirdwebContract contract, IThirdwebWallet wallet, BigInteger listingId, ListingParameters parameters)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

listingId BigInteger

The ID of the listing to update.

parameters ListingParameters

The updated parameters of the listing.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the listing update.

Marketplace_EnglishAuctions_BidInAuction(ThirdwebContract, IThirdwebWallet, BigInteger, BigInteger, bool)

Places a bid in an auction.

public static Task<ThirdwebTransactionReceipt> Marketplace_EnglishAuctions_BidInAuction(this ThirdwebContract contract, IThirdwebWallet wallet, BigInteger auctionId, BigInteger bidAmount, bool handleApprovals = false)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

auctionId BigInteger

The ID of the auction to bid in.

bidAmount BigInteger

The bid amount to place.

handleApprovals bool

Whether to handle token approvals automatically.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the placed bid.

Marketplace_EnglishAuctions_CancelAuction(ThirdwebContract, IThirdwebWallet, BigInteger)

Cancels an existing auction listing.

public static Task<ThirdwebTransactionReceipt> Marketplace_EnglishAuctions_CancelAuction(this ThirdwebContract contract, IThirdwebWallet wallet, BigInteger auctionId)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

auctionId BigInteger

The ID of the auction to cancel.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the auction cancellation.

Marketplace_EnglishAuctions_CollectAuctionPayout(ThirdwebContract, IThirdwebWallet, BigInteger)

Collects the payout for a completed auction.

public static Task<ThirdwebTransactionReceipt> Marketplace_EnglishAuctions_CollectAuctionPayout(this ThirdwebContract contract, IThirdwebWallet wallet, BigInteger auctionId)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

auctionId BigInteger

The ID of the auction for which to collect the payout.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the auction payout collection.

Marketplace_EnglishAuctions_CollectAuctionTokens(ThirdwebContract, IThirdwebWallet, BigInteger)

Collects the tokens from a completed auction.

public static Task<ThirdwebTransactionReceipt> Marketplace_EnglishAuctions_CollectAuctionTokens(this ThirdwebContract contract, IThirdwebWallet wallet, BigInteger auctionId)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

auctionId BigInteger

The ID of the auction for which to collect the tokens.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the auction token collection.

Marketplace_EnglishAuctions_CreateAuction(ThirdwebContract, IThirdwebWallet, AuctionParameters, bool)

Creates a new auction listing for NFTs.

public static Task<ThirdwebTransactionReceipt> Marketplace_EnglishAuctions_CreateAuction(this ThirdwebContract contract, IThirdwebWallet wallet, AuctionParameters parameters, bool handleApprovals = false)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

parameters AuctionParameters

The parameters of the auction to be created.

handleApprovals bool

Whether to handle token approvals automatically.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the auction creation.

Marketplace_EnglishAuctions_GetAllAuctions(ThirdwebContract, BigInteger, BigInteger)

Gets all auctions within a given range of IDs.

public static Task<List<Auction>> Marketplace_EnglishAuctions_GetAllAuctions(this ThirdwebContract contract, BigInteger startId, BigInteger endId)

Parameters

contract ThirdwebContract

The contract instance.

startId BigInteger

The start ID of the range.

endId BigInteger

The end ID of the range.

Returns

Task<List<Auction>>

A task that represents a list of auctions within the range.

Marketplace_EnglishAuctions_GetAllValidAuctions(ThirdwebContract, BigInteger, BigInteger)

Gets all valid auctions within a given range of IDs.

public static Task<List<Auction>> Marketplace_EnglishAuctions_GetAllValidAuctions(this ThirdwebContract contract, BigInteger startId, BigInteger endId)

Parameters

contract ThirdwebContract

The contract instance.

startId BigInteger

The start ID of the range.

endId BigInteger

The end ID of the range.

Returns

Task<List<Auction>>

A task that represents a list of valid auctions within the range.

Marketplace_EnglishAuctions_GetAuction(ThirdwebContract, BigInteger)

Retrieves the details of a specific auction by its ID.

public static Task<Auction> Marketplace_EnglishAuctions_GetAuction(this ThirdwebContract contract, BigInteger auctionId)

Parameters

contract ThirdwebContract

The contract instance.

auctionId BigInteger

The ID of the auction to fetch.

Returns

Task<Auction>

A task that represents the requested auction details.

Marketplace_EnglishAuctions_GetWinningBid(ThirdwebContract, BigInteger)

Gets the winning bid of a specific auction.

public static Task<(string bidder, string currency, BigInteger bidAmount)> Marketplace_EnglishAuctions_GetWinningBid(this ThirdwebContract contract, BigInteger auctionId)

Parameters

contract ThirdwebContract

The contract instance.

auctionId BigInteger

The ID of the auction to retrieve the winning bid from.

Returns

Task<(string bidder, string currency, BigInteger bidAmount)>

A task that represents the winning bid details (bidder, currency, bidAmount).

Marketplace_EnglishAuctions_IsAuctionExpired(ThirdwebContract, BigInteger)

Checks whether an auction is expired.

public static Task<bool> Marketplace_EnglishAuctions_IsAuctionExpired(this ThirdwebContract contract, BigInteger auctionId)

Parameters

contract ThirdwebContract

The contract instance.

auctionId BigInteger

The ID of the auction to check.

Returns

Task<bool>

A task that represents a boolean indicating if the auction is expired.

Marketplace_EnglishAuctions_IsNewWinningBid(ThirdwebContract, BigInteger, BigInteger)

Checks whether the bid amount would make for a winning bid in an auction.

public static Task<bool> Marketplace_EnglishAuctions_IsNewWinningBid(this ThirdwebContract contract, BigInteger auctionId, BigInteger bidAmount)

Parameters

contract ThirdwebContract

The contract instance.

auctionId BigInteger

The ID of the auction.

bidAmount BigInteger

The bid amount to check.

Returns

Task<bool>

A task that represents a boolean indicating if the bid would be a winning bid.

Marketplace_EnglishAuctions_TotalAuctions(ThirdwebContract)

Gets the total number of auctions created.

public static Task<BigInteger> Marketplace_EnglishAuctions_TotalAuctions(this ThirdwebContract contract)

Parameters

contract ThirdwebContract

The contract instance.

Returns

Task<BigInteger>

A task that represents the total number of auctions.

Marketplace_Offers_AcceptOffer(ThirdwebContract, IThirdwebWallet, BigInteger)

Accepts an existing offer.

public static Task<ThirdwebTransactionReceipt> Marketplace_Offers_AcceptOffer(this ThirdwebContract contract, IThirdwebWallet wallet, BigInteger offerId)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

offerId BigInteger

The ID of the offer to accept.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the offer acceptance.

Marketplace_Offers_CancelOffer(ThirdwebContract, IThirdwebWallet, BigInteger)

Cancels an existing offer.

public static Task<ThirdwebTransactionReceipt> Marketplace_Offers_CancelOffer(this ThirdwebContract contract, IThirdwebWallet wallet, BigInteger offerId)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

offerId BigInteger

The ID of the offer to cancel.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the offer cancellation.

Marketplace_Offers_GetAllOffers(ThirdwebContract, BigInteger, BigInteger)

Gets all offers within a given range of IDs.

public static Task<List<Offer>> Marketplace_Offers_GetAllOffers(this ThirdwebContract contract, BigInteger startId, BigInteger endId)

Parameters

contract ThirdwebContract

The contract instance.

startId BigInteger

The start ID of the range.

endId BigInteger

The end ID of the range.

Returns

Task<List<Offer>>

A task that represents a list of offers within the range.

Marketplace_Offers_GetAllValidOffers(ThirdwebContract, BigInteger, BigInteger)

Gets all valid offers within a given range of IDs.

public static Task<List<Offer>> Marketplace_Offers_GetAllValidOffers(this ThirdwebContract contract, BigInteger startId, BigInteger endId)

Parameters

contract ThirdwebContract

The contract instance.

startId BigInteger

The start ID of the range.

endId BigInteger

The end ID of the range.

Returns

Task<List<Offer>>

A task that represents a list of valid offers within the range.

Marketplace_Offers_GetOffer(ThirdwebContract, BigInteger)

Retrieves the details of a specific offer by its ID.

public static Task<Offer> Marketplace_Offers_GetOffer(this ThirdwebContract contract, BigInteger offerId)

Parameters

contract ThirdwebContract

The contract instance.

offerId BigInteger

The ID of the offer to fetch.

Returns

Task<Offer>

A task that represents the requested offer details.

Marketplace_Offers_MakeOffer(ThirdwebContract, IThirdwebWallet, OfferParams, bool)

Makes an offer for NFTs.

public static Task<ThirdwebTransactionReceipt> Marketplace_Offers_MakeOffer(this ThirdwebContract contract, IThirdwebWallet wallet, OfferParams parameters, bool handleApprovals = false)

Parameters

contract ThirdwebContract

The contract instance.

wallet IThirdwebWallet

The wallet used for the transaction.

parameters OfferParams

The parameters of the offer to make.

handleApprovals bool

Whether to handle token approvals automatically.

Returns

Task<ThirdwebTransactionReceipt>

A task that represents the transaction receipt of the offer creation.

Marketplace_Offers_TotalOffers(ThirdwebContract)

Gets the total number of offers created.

public static Task<BigInteger> Marketplace_Offers_TotalOffers(this ThirdwebContract contract)

Parameters

contract ThirdwebContract

The contract instance.

Returns

Task<BigInteger>

A task that represents the total number of offers.