Skip to main content

Creating an NFT Drop Contract

In this section, we'll show how to:

  • Create the smart contract that will be used to store our NFTs.
  • Configure the metadata such as the name, image, description, and royalty fees of the NFT Drop.
  • Deploy the contract to a test network, and set up our claim phases.

Creating an NFT Drop Contract

To create an NFT Drop contract, head to the dashboard and connect your wallet.

Then click on the Deploy New Contract button.

Create a new contract

Since we want to lazy mint our NFTs and make them available to be claimed by our users, the NFT Drop contract is best suited for this.

Select NFT Drop from the list of contracts and click Deploy Now.

Select NFT Drop Contract

You can configure the Name, Symbol, Description, Image, and Royalty fees in the settings before you deploy your NFT Drop.

I'll call my NFT Drop Colored Shapes and stick with the default values for the rest of the fields, but feel free to go wild and configure this to your liking!

tip

You may have seen people use an asset that cycles through some of the images in the collection as the cover image. You can do this too using a tool such as ezgif to achieve the same effect, and set this .gif file as the Image of the NFT Drop here.

Configure NFT Drop Contract Metadata

Once you're happy, let's deploy this NFT Drop onto the Mumbai (MATIC) Test network.

Deploy onto Mumbai

This will prompt you to accept a transaction in MetaMask (or whatever wallet you connected with), and deploy your smart contract onto the Mumbai Test network!

You might notice that the transaction is requesting to Deploy a Proxy.

If you want to learn more about proxy contracts, check out our documentation on How thirdweb pre-built contracts work.

Configuring Claim Phases

Claim Phases are conditions we can configure to define when and how users can claim NFTs from our collection.

For example, a popular claim phase pattern is to have one claim phase where allow-listed wallets can claim, then another claim phase after that, where any wallet can claim.

From the dashboard, let's click Set Claim Phase and configure a simple claim phase where anyone can mint/claim our NFTs.

Dashboard requesting to Configure Claim Phases

Click on Add Phase, and configure it to your liking!

I'm going to change the How many NFTs can be claimed per transaction? to be 1 and accept the default values for the other fields.

Once you're happy with your claim phase(s), click Update Claim Phases

Configure Claim Phases

Now we're ready to upload our NFTs to our NFT Drop contract.

Bonus Tip: SDK Deployments

You can do everything we just did in code using the SDK too!

Deploy the NFT Drop contract:

const sdk = useSDK();

const contractAddress = await sdk.deployer.deployNFTDrop({
name: "My Drop",
primary_sale_recipient: "your-address",
});

Set Claim Conditions:

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
}
]);
await contract.claimConditions.set(claimConditions);