Skip to main content

Edition Drop

thirdweb's drop contracts lazy mint your NFT and makes it available to be claimed by your users.

The Edition Drop contract is best used when you want to release many NFTs based on the same asset, and uses the ERC1155 Standard, also known as "Semi-Fungible Tokens".

The Edition Drop contract allows you to define the conditions for when and how your users can mint an NFT, including allowlists, release dates, and claim limits.

You could use the Edition Drop contract to:

  • Create NFT Memberships such as our Early Access Cards that you want your users to claim
  • Release an item in your game for a limited-time
  • Create 100 NFTs based on one art-piece, and allow users to claim one per wallet

Create an Edition Drop Contract

Learn how to create any of thirdweb's pre-built contracts in the Deploying Contracts page.

Getting the contract in your application

To start using your Edition Drop contract inside your application, you'll need to use it's contract address. You can get the contract address from the dashboard.

import { ThirdwebSDK } from "@thirdweb-dev/sdk";

const sdk = new ThirdwebSDK("rinkeby");
const contract = sdk.getEditionDrop("{{contract_address}}");

Lazy Minting Your NFTs

Using the dashboard

You can batch upload NFTs through the dashboard by uploading a .csv file or a .json file that contains the metadata of all your NFTs, alongside the assets (images, videos, etc).

  • You must include a name column for each NFT in the .csv or json file
  • Asset file names must be sequential. E.g. 0.png, 1.png, 2.png.

You can use our examples to get started:

For a more in-depth guide on how to create your NFTs in the Edition Drop contract, check out our guide Create an early access NFT.

Using the thirdweb SDK

// Custom metadata of the NFTs to create
const metadatas = [{
name: "Cool NFT",
description: "This is a cool NFT",
image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
}, {
name: "Cool NFT",
description: "This is a cool NFT",
image: fs.readFileSync("path/to/image.png"),
}];

const results = await contract.createBatch(metadatas); // uploads and creates the NFTs on chain
const firstTokenId = results[0].id; // token id of the first created NFT
const firstNFT = await results[0].data(); // (optional) fetch details of the first created NFT
View in Javascript SDK Documentation

Setting Claim Phases

A claim phase is a set of conditions that define when and how your users can mint an NFT.

You can have multiple claim phases that occur in sequence.

For each claim phase, you can define:

  • When the claim phase will start
  • How many NFTs you want to drop
  • How much you want to charge per NFT
  • What currency you want to use
  • Which wallet addreses are allowed to mint (allowlist)
  • How many NFTs can be claimed per transaction
  • How many seconds wallets have to wait between claims

Using the dashboard

For a more in-depth guide on how to set-up your Edition Drop with multiple claim phases and an allowlist, check out our guide Release an NFT Drop with an allowlist and multiple claim phases.

Using the thirdweb SDK

const presaleStartTime = new Date();
const publicSaleStartTime = new Date(Date.now() + 60 * 60 * 24 * 1000);
const claimConditions = [
{
startTime: presaleStartTime, // start the presale now
maxQuantity: 2, // limit how many mints for this presale
price: 0.01, // presale price
snapshot: ['0x...', '0x...'], // limit minting to only certain addresses
},
{
startTime: publicSaleStartTime, // 24h after presale, start public sale
price: 0.08, // public sale price
}
]);

const tokenId = 0; // the id of the NFT to set claim conditions on
await contract.claimConditions.set(tokenId, claimConditions);
View in Javascript SDK Documentation

Setting Royalty Fees

Royalty fees are fees you earn on secondary sales of your NFTs. For example, if somebody mints an NFT from your drop and then sells it to another user, you will earn a royalty fee.

Using the dashboard

From the dashboard, in the Settings tab you can set the royalty percentage and the address that should receive the revenue from royalties earned from secondary sales of the assets.

Using the thirdweb SDK

// royalties on the whole contract
contract.royalty.setDefaultRoyaltyInfo({
seller_fee_basis_points: 100, // 1%
fee_recipient: "0x..."
});
// override royalty for a particular token
contract.royalty.setTokenRoyaltyInfo(tokenId, {
seller_fee_basis_points: 500, // 5%
fee_recipient: "0x..."
});
View in Javascript SDK Documentation

Minting / Claiming NFTs

With an Edition Drop contract, users claim NFTs by minting them into their wallet. You can have a "mint" button that your users can click on each NFT in your edition.

Using the dashboard

We have a pre-built embed that you can use to display your Edition Drop within your website.

You can access your Edition Drop's embed URL from the dashboard.

MFT Drop Dashboard Embed

Using the thirdweb SDK

const address = "{{wallet_address}}"; // address of the wallet you want to claim the NFTs
const tokenId = 0; // the id of the NFT you want to claim
const quantity = 1; // how many NFTs you want to claim

const tx = await contract.claimTo(address, tokenId, quantity);
const receipt = tx.receipt; // the transaction receipt
const claimedTokenId = tx.id; // the id of the NFT claimed
const claimedNFT = await tx.data(); // (optional) get the claimed NFT metadata
View in Javascript SDK Documentation

Airdrop NFTs

Airdropping means you send a wallet or a list of wallets a configurable quantity of your NFT.

Using the dashboard

Using the thirdweb dashboard, you can upload a .csv file containing a list of addresses you want to airdrop NFTs to.

You can download our example .csv file for airdrops here.

In the csv file you must specify an address column and a quantity column; representing the address you want to send the NFTs to, and how many you wish to send.

Using the thirdweb SDK

// Array of objects of addresses and quantities to airdrop NFTs to
const addresses = [
{
address: "0x...",
quantity: 2,
},
{
address: "0x...",
quantity: 3,
},
];
const tokenId = "0";
await contract.airdrop(addresses, tokenId);

// You can also pass an array of addresses, it will airdrop 1 NFT per address
const addresses = [
"0x...", "0x...", "0x...",
]
const tokenId = "0";
await contract.airdrop(addresses, tokenId);
View in Javascript SDK Documentation

Viewing NFTs

Our SDKs provide helpful ways to view the NFTs in your collection.

One NFT

const nft = await contract.get("0");
View in Javascript SDK Documentation

All NFTs

const nfts = await contract.getAll();
View in Javascript SDK Documentation

NFTs owned by a specific wallet

// Address of the wallet to get the NFTs of
const address = "{{wallet_address}}";
const nfts = await contract.getOwned(address);
View in Javascript SDK Documentation

Amount of tokens owned by a specific wallet

// Address of the wallet to check NFT balance
const walletAddress = "{{wallet_address}}";
const tokenId = 0; // Id of the NFT to check
const balance = await contract.balanceOf(walletAddress, tokenId);
View in Javascript SDK Documentation

Transferring NFTs

Transferring NFTs means you can send this NFT to another wallet. You must be the owner of the NFT you're trying to transfer in order for this to be successful.

// Address of the wallet you want to send the NFT to
const toAddress = "{{wallet_address}}";
const tokenId = "0"; // The token ID of the NFT you want to send
const amount = 3; // How many copies of the NFTs to transfer
await contract.transfer(toAddress, tokenId, amount);
View in Javascript SDK Documentation

Burning NFTs

Burning is the process of removing the token from circulation by sending it to an inaccessible address. It does not delete the token from the blockchain.

Using the dashboard

Burning Claimed NFTs on Dashboard

Using the SDK

const result = await contract.burn(tokenId, amount);
View in Javascript SDK Documentation