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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
listingId
BigIntegerThe ID of the listing.
buyer
stringThe address of the buyer to approve.
toApprove
boolWhether 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
listingId
BigIntegerThe ID of the listing.
currency
stringThe address of the currency to approve.
pricePerTokenInCurrency
BigIntegerThe 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
listingId
BigIntegerThe ID of the listing.
buyFor
stringThe recipient address for the purchased NFTs.
quantity
BigIntegerThe quantity of NFTs to buy.
currency
stringThe currency to use for the purchase.
expectedTotalPrice
BigIntegerThe expected total price to pay.
handleApprovals
boolWhether 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
listingId
BigIntegerThe 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
parameters
ListingParametersThe parameters of the listing to be created.
handleApprovals
boolWhether 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
ThirdwebContractThe contract instance.
listingId
BigIntegerThe ID of the listing.
currency
stringThe 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
ThirdwebContractThe contract instance.
startId
BigIntegerThe start ID of the range.
endId
BigIntegerThe end ID of the range.
Returns
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
ThirdwebContractThe contract instance.
startId
BigIntegerThe start ID of the range.
endId
BigIntegerThe end ID of the range.
Returns
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
ThirdwebContractThe contract instance.
listingId
BigIntegerThe ID of the listing to fetch.
Returns
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
ThirdwebContractThe contract instance.
listingId
BigIntegerThe ID of the listing.
buyer
stringThe address of the buyer to check.
Returns
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
ThirdwebContractThe contract instance.
listingId
BigIntegerThe ID of the listing.
currency
stringThe address of the currency to check.
Returns
Marketplace_DirectListings_TotalListings(ThirdwebContract)
Gets the total number of direct listings created.
public static Task<BigInteger> Marketplace_DirectListings_TotalListings(this ThirdwebContract contract)
Parameters
contract
ThirdwebContractThe 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
listingId
BigIntegerThe ID of the listing to update.
parameters
ListingParametersThe 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
auctionId
BigIntegerThe ID of the auction to bid in.
bidAmount
BigIntegerThe bid amount to place.
handleApprovals
boolWhether 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
auctionId
BigIntegerThe 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
auctionId
BigIntegerThe 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
auctionId
BigIntegerThe 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
parameters
AuctionParametersThe parameters of the auction to be created.
handleApprovals
boolWhether 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
ThirdwebContractThe contract instance.
startId
BigIntegerThe start ID of the range.
endId
BigIntegerThe end ID of the range.
Returns
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
ThirdwebContractThe contract instance.
startId
BigIntegerThe start ID of the range.
endId
BigIntegerThe end ID of the range.
Returns
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
ThirdwebContractThe contract instance.
auctionId
BigIntegerThe ID of the auction to fetch.
Returns
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
ThirdwebContractThe contract instance.
auctionId
BigIntegerThe 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
ThirdwebContractThe contract instance.
auctionId
BigIntegerThe ID of the auction to check.
Returns
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
ThirdwebContractThe contract instance.
auctionId
BigIntegerThe ID of the auction.
bidAmount
BigIntegerThe bid amount to check.
Returns
Marketplace_EnglishAuctions_TotalAuctions(ThirdwebContract)
Gets the total number of auctions created.
public static Task<BigInteger> Marketplace_EnglishAuctions_TotalAuctions(this ThirdwebContract contract)
Parameters
contract
ThirdwebContractThe 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
offerId
BigIntegerThe 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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
offerId
BigIntegerThe 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
ThirdwebContractThe contract instance.
startId
BigIntegerThe start ID of the range.
endId
BigIntegerThe end ID of the range.
Returns
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
ThirdwebContractThe contract instance.
startId
BigIntegerThe start ID of the range.
endId
BigIntegerThe end ID of the range.
Returns
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
ThirdwebContractThe contract instance.
offerId
BigIntegerThe ID of the offer to fetch.
Returns
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
ThirdwebContractThe contract instance.
wallet
IThirdwebWalletThe wallet used for the transaction.
parameters
OfferParamsThe parameters of the offer to make.
handleApprovals
boolWhether 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
ThirdwebContractThe contract instance.
Returns
- Task<BigInteger>
A task that represents the total number of offers.