Become a Partner Try it out

Create NFT-Drop Dapp with Express SDK in just a matter of minutes!

How to create an NFT Dropp Dapp

A buzz around digital collectables is invoking a desire in the heart of NFT creators to create & list their own NFT collectables. However, the major challenge NFT creators are facing is — they can neither upload nor mint hundred or thousands of NFTs at once. This fragility has been becoming a setback for most NFT creators.

To solve this, Express Protocol has come up with Express SDK: your one-stop solution for creating, minting, auctioning NFTs & much more. Its Multichain Data-Rich functionality allows you to create, upload & mint thousands of NFTs at once. So, leverage the power of Express SDK to create your NFT-Drop Dapp without getting intimidated by the time it takes to engineer.

Curious to know, how to create NFT-Drop Dapp using Express Protocol? Here, we’re unravelling the secret to simplify the creation process for you!

Steps for building your own NFT-Drop Dapp!

Some of the prerequisites you require before building the project:

  1. NodeJS version > 16.0.0
  2. NPM version > 6.0.0
  3. Metamask Browser Extension
  4. Parcel Bundler(For bundling Javascript)

Here are the following steps to create your own NFT-Drop Dapp in just a matter of time:

1. First, you need to create an empty folder in your favourite editor.

Create an NFT Drop Dapp

2. Then, you need to install the SDK to run it in the terminal.

NFT marketplace development
npm init
NFT marketplace development
npm i pandora-express
NFT marketplace development
npm install -g parcel-bundler 
NFT marketplace development

3. The next step is to build the UI and make the index.html file to write the following codes mentioned below.

NFT marketplace development


      

Here we have made three sections for creating the collection:

Now, run the app with a liver server.

NFT marketplace development

After pasting all the codes mentioned above, your NFT-Drop Frontend will look something like this!

4. Use SDK code with javascript logic

Follow the steps mentioned below:

NFT marketplace development
//Import createPandoraExpressSDK from SDK
const { createPandoraExpressSDK } = require(“pandora-express”);
const pandoraSDK = createPandoraExpressSDK();//Connecting with Metamask wallet.
const init = async () => {
//check if metamask is present
if (window.ethereum) {
window.web3 = new Web3(window.ethereum);
await window.ethereum.enable();
console.log(“Connected”);
} else {
alert(“Metamask not found”);
}
};
      
const createCollection = async () => {
const accounts = await web3.eth.getAccounts();
const chainId = await web3.eth.net.getId();
console.log(chainId);
await pandoraSDK.erc721.collection.createCollection(
web3,
chainId,
accounts[0],
collectionName.value, //Name of Collection
collectionSymbol.value, // Symbol of Collection
collectionDescription.value, // Description of Collection
[[accounts[0], collectionRoyalties.value]] // Royalities
);
};
      
const mintInCollection = async () => {
const accounts = await web3.eth.getAccounts();
const chainId = await web3.eth.net.getId();
console.log(chainId);
await pandoraSDK.erc721.collection.mint(
web3,
collectionAddress.value, //Address of collection Contract
tokenURI.value, // URI of token
accounts[0], // Account to mint NFT
[[accounts[0], collectionRoyalties.value]] // Royalities
);
}
      
const sellInCollection = async () => {
const accounts = await web3.eth.getAccounts();
const chainId = await web3.eth.net.getId();
console.log(chainId);
await pandoraSDK.erc721.collection.sellNFT(
web3,
chainId,
sellCollectionAddress.value, // Collection Address
sellTokenId.value, // Token ID
sellPrice.value, // Base price to sell
accounts[0]
);
};
      
const collectionName = document.getElementById(“collectionName”);
const collectionSymbol = document.getElementById(“collectionSymbol”);
const collectionDescription = document.getElementById(“collectionDescription”);
const collectionRoyalties = document.getElementById(“collectionRoyalties”);const CollectionButton = document.getElementById(“btnCreateCollection”);
CollectionButton.onclick = createCollection;const collectionAddress = document.getElementById(“collectionAddress”);
const tokenURI = document.getElementById(“tokenURI”);
const royalties = document.getElementById(“royalties”);const btnMintInCollection = document.getElementById(“btnMintInCollection”);
btnMintInCollection.onclick = mintInCollection;const sellCollectionAddress = document.getElementById(“sellCollectionAddress”);
const sellTokenId = document.getElementById(“sellTokenId”);
const sellPrice = document.getElementById(“sellPrice”);const btnSellInCollection = document.getElementById(“btnSellInCollection”);
btnSellInCollection.onclick = sellInCollection;init();
      

Now run in terminal

parcel index.html
NFT marketplace development
NFT marketplace development

Congratulations! You have successfully created your first NFT-Drop and minted as well as listed your first Token for sale in the Marketplace. Now just enjoy the benefit of interoperability & increased liquidity with Express SDK.