NFTCollection class
Create a collection of one-of-one NFTs.
Example
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
const sdk = new ThirdwebSDK("{{chainName}}");
const contract = await sdk.getContract(
"{{contract_address}}",
"nft-collection",
);
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(network, address, storage, options, abi, chainId, contractWrapper) | Constructs a new instance of the NFTCollection class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| abi | Abi | ||
| contractRoles | static | readonly ["admin", "minter", "transfer"] | |
| encoder | ContractEncoder<TokenERC721> | ||
| erc721 | Erc721<TokenERC721> | ||
| estimator | GasCostEstimator<TokenERC721> | ||
| events | ContractEvents<TokenERC721> | ||
| metadata | ContractMetadata<TokenERC721, typeof TokenErc721ContractSchema> | ||
| owner | ContractOwner<TokenERC721> | ||
| platformFees | ContractPlatformFee<TokenERC721> | ||
| roles | ContractRoles<TokenERC721, typeof NFTCollection.contractRoles[number]> | ||
| royalties | ContractRoyalty<TokenERC721, typeof TokenErc721ContractSchema> | Configure royalties | |
| sales | ContractPrimarySale<TokenERC721> | ||
| signature | Erc721WithQuantitySignatureMintable | Signature Minting |
Methods
| Method | Modifiers | Description |
|---|---|---|
| burn(tokenId) | Burn a single NFT | |
| getAddress() | ||
| getMintTransaction(receiver, metadata) | Construct a mint transaction without executing it. This is useful for estimating the gas cost of a mint transaction, overriding transaction options and having fine grained control over the transaction execution. | |
| isTransferRestricted() | Get whether users can transfer NFTs from this contract | |
| mint(metadata) | Mint a unique NFT | |
| mintBatch(metadata) | Mint Many unique NFTs | |
| mintBatchTo(walletAddress, metadata) | Mint Many unique NFTs | |
| mintTo(walletAddress, metadata) | Mint a unique NFT |
Signature:
export declare class NFTCollection extends StandardErc721<TokenERC721>
Extends: StandardErc721<TokenERC721>