NFTDrop class
Setup a collection of one-of-one NFTs that are minted as users claim them.
Example
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
const sdk = new ThirdwebSDK("{{chainName}}");
const contract = sdk.getNFTDrop("{{contract_address}}");
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(network, address, storage, options, contractWrapper) | Constructs a new instance of the NFTDrop class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| claimConditions | DropClaimConditions<DropERC721> | Configure claim conditions | |
| contractAbi | static | any | |
| contractRoles | static | readonly ["admin", "minter", "transfer"] | |
| contractType | static | "nft-drop" | |
| encoder | ContractEncoder<DropERC721> | ||
| estimator | GasCostEstimator<DropERC721> | ||
| events | ContractEvents<DropERC721> | ||
| metadata | ContractMetadata<DropERC721, typeof NFTDrop.schema> | ||
| platformFees | ContractPlatformFee<DropERC721> | ||
| revealer | DelayedReveal<DropERC721> | Delayed reveal | |
| roles | ContractRoles<DropERC721, typeof NFTDrop.contractRoles[number]> | ||
| royalties | ContractRoyalty<DropERC721, typeof NFTDrop.schema> | Configure royalties | |
| sales | ContractPrimarySale<DropERC721> |
Methods
| Method | Modifiers | Description |
|---|---|---|
| burnToken(tokenId) | Burn a single NFT | |
| claim(quantity, checkERC20Allowance) | Claim NFTs to the connected wallet. | |
| claimTo(destinationAddress, quantity, checkERC20Allowance) | Claim unique NFTs to a specific Wallet | |
| createBatch(metadatas, options) | Create a batch of unique NFTs to be claimed in the future | |
| getAll(queryParams) | Get All Minted NFTs | |
| getAllClaimed(queryParams) | Get All Claimed NFTs | |
| getAllUnclaimed(queryParams) | Get All Unclaimed NFTs | |
| getClaimTransaction(destinationAddress, quantity, checkERC20Allowance) | Construct a claim transaction without executing it. This is useful for estimating the gas cost of a claim transaction, overriding transaction options and having fine grained control over the transaction execution. | |
| getOwned(walletAddress) | Get Owned NFTs | |
| getOwnedTokenIds(walletAddress) | Get all token ids of NFTs owned by a specific wallet. | |
| isTransferRestricted() | Get whether users can transfer NFTs from this contract | |
| totalClaimedSupply() | Get the claimed supply | |
| totalSupply() | Get the total count NFTs in this drop contract, both claimed and unclaimed | |
| totalUnclaimedSupply() | Get the unclaimed supply |
Signature:
export declare class NFTDrop extends Erc721<DropERC721>
Extends: Erc721<DropERC721