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 = await sdk.getContract("{{contract_address}}", "nft-drop");
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(network, address, storage, options, abi, chainId, contractWrapper) | Constructs a new instance of the NFTDrop class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| abi | Abi | ||
| checkout | PaperCheckout<PrebuiltNFTDrop> | Checkout | |
| claimConditions | DropClaimConditions<PrebuiltNFTDrop> | Configure claim conditions | |
| contractRoles | static | readonly ["admin", "minter", "transfer"] | |
| encoder | ContractEncoder<PrebuiltNFTDrop> | ||
| erc721 | Erc721<PrebuiltNFTDrop> | ||
| estimator | GasCostEstimator<PrebuiltNFTDrop> | ||
| events | ContractEvents<PrebuiltNFTDrop> | ||
| metadata | ContractMetadata<PrebuiltNFTDrop, typeof DropErc721ContractSchema> | ||
| owner | ContractOwner<PrebuiltNFTDrop> | ||
| platformFees | ContractPlatformFee<PrebuiltNFTDrop> | ||
| revealer | DelayedReveal<PrebuiltNFTDrop> | Delayed reveal | |
| roles | ContractRoles<PrebuiltNFTDrop, typeof NFTDrop.contractRoles[number]> | ||
| royalties | ContractRoyalty<PrebuiltNFTDrop, typeof DropErc721ContractSchema> | Configure royalties | |
| sales | ContractPrimarySale<PrebuiltNFTDrop> |
Methods
| Method | Modifiers | Description |
|---|---|---|
| balance() | Get NFT Balance for the currently connected wallet | |
| balanceOf(address) | Get NFT Balance | |
| burn(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 | |
| get(tokenId) | Get a single NFT Metadata | |
| getAddress() | ||
| 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. | |
| isApproved(address, operator) | Get whether this wallet has approved transfers from the given operator | |
| isTransferRestricted() | Get whether users can transfer NFTs from this contract | |
| ownerOf(tokenId) | Get the current owner of a given NFT within 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 | |
| transfer(to, tokenId) | Transfer a single NFT |
Signature:
export declare class NFTDrop extends StandardErc721<PrebuiltNFTDrop>
Extends: StandardErc721<PrebuiltNFTDrop>