Welcome to Dev3
  • ➕Create a Dev3 App
  • 🤖SDK
    • 📖Introduction
    • ⚙️Initialization
    • ➡️Importing Contracts
    • 🤝User Authentication
      • Options
    • 🔍Query Contracts
      • Function Parameters
    • ⚡Execute Contracts
      • Execution Options
    • 🛠️Deploy Contracts
      • Deployment Options
    • 📖Address Book
    • ❓FAQ
      • Out of gas error
  • INTEGRATIONS
    • 🔷Chainlink Feeds
    • 🔷Chainlink Subscriptions
      • 🎲VRF Subscriptions
      • 🧮Functions Subscriptions
      • 🤖Upkeep Subscriptions
    • 🎆OriginTrail DKG
    • 📽️OriginTrail DKG Video Tutorial
    • 📊Polyflow Analytics
  • Pricing
    • 💸Dev3 Pricing Plans
    • 💸Polyflow Pricing Plans
  • 🚀Guides
    • 👾Launching an NFT Collection
      • Step 1: Upload assets
      • Step 2: Upload metadata
      • Step 3: Deploy contracts
  • 🏫Resources
    • 👨‍💻Developer Resources
Powered by GitBook
On this page
  1. Guides
  2. Launching an NFT Collection

Step 3: Deploy contracts

PreviousStep 2: Upload metadataNextDeveloper Resources

Last updated 2 years ago

Before we start deploying the contracts, make sure you've created the project on the This is completely free, and you can do it in only a few clicks. If you haven't already, you can find a detailed guide on how to create the project .

If you only want to play around and test everything, we advise you to create the project on one of our supported testnets such as Polygon Mumbai. The guide for creating the Dev3 project will lead you to create the project on the Mumbai testnet.

You can of course decide to create the project and launch the NFT collection on some other blockchain network which we support (Polygon, Ethereum, Aurora, ...) but this will cost gas and you will have to obtain gas tokens before creating the project and the contracts.

Deploying the NFT

If you have successfully created the project, move on by opening the project dashboard. First, we'll create the NFT token by deploying one of the NFT contracts by using the template found on the project dashboard. This is how you find it:

We selected the deployment from template option, and then found the NFT (Mintable, Burnable, Pausable) implementation in the list. Once we clicked on the Create button, we ended up with the contract creation screen (the last part in the video above). On the creation screen, there are 4 values we need to provide:

  • alias

  • token name

  • token symbol

  • base token URI

Alias is the smart contract identifier. You will use the alias when integrating the contracts using the Dev3 SDK, so make sure you give your contract a nice readable name, for example: "my-first-nft".

Token name and token symbol will be displayed on blockchain explorers and can not be changed once you deploy the NFT, so choose them wisely. The token symbol is usually the short version of the token name, and you can set these values to whatever you think is the best.

Slash symbol ("/") at the end of the base token URI value is very important. If you forget to add it, your collection items will fail to load properly on the NFT marketplace.

In our case, the full base token URI looks like this:

ipfs://QmYimyZwYP43qWeqj27UiSgZRQLErcCkdt94MEPhDALvko/

In your case, the hash value will be different. Finally, here's the NFT creation screen with the values filled in:

Once you've provided the values, proceed by clicking the "Create contract deployment request" button at the bottom. Then go through the creation flow, and you will end up with the deployed contract. This contract is your NFT token! Congratulations! The process is shown below:

After successful token deployment, you can go back to the project dashboard, and in the Contracts tab you'll notice that your NFT contract is shown:

Now that we have created the contract, we still have to "mint" NFT items, meaning, create NFT items by interacting with the token contract. You can mint items one by one, by calling the mint function on the contract (will be shown below), or we can simply call mintMany function and create all items in one call.

"Mint" is the process of creating a new items in the NFT collection and then transferring them to the owner wallets.

Base token URI which you have defined before will be used to generate new collection items. For example when you call mint for the first time, item 0 is created and the base URI is used to build the link to the item metadata by appending "/0" on the base metadata URI. The second call will create the item with the link pointing to "/1" and so on..

Since our test collection contains 3 images, we're going to mint 3 new items, and we will assign our admin wallet to become their owner. We're going to do all of this in one call by using the mintMany function. This is the last step in launching the NFT collection! Here's how we did it:

The NFT implementation we've deployed, NFT (Mintable, Burnable, Pausable), can only be minted by the contract owner (contract creator). If other wallets try to call the mint the transaction will fail.

To verify this, copy the address of your NFT contract found on the dashboard:

If you've reached this far, congratulations! You've just launched your first NFT collection and minted NFT's to your wallet! You can open any item in the collection above, and you'll see that the owner wallet address is the one you used when deploying the contract and minting NFTs.

Although this NFT was launched on the test network (Polygon Mumbai) you can reproduce all the steps on any other blockchain network of your choice.

Base token URI is the value you generated in the previous step (). It's the CID hash of your metadata folder but with the added "ipfs://" prefix, and the slash symbol ("/") at the end.

After you've done with this step, your NFT collection is live, and you can actually verify this by opening the OpenSea marketplace and searching for your collection. If you have created the project on the Mumbai testnet as explained in our , you will have to search for your collection on the .

Then go to the and paste the address in the search box. You should be able to see your NFT collection in the recommended results. Open the collection, and you'll see all the items you have just minted to your wallet. In our case, it looks like this:

You can see our collection . Make sure to send us your collection if you've launched it successfully. 😎

Let us know if it worked for you, or if you've come across any problems. Feel free to contact us on: email: hello@dev3.sh discord:

🚀
👾
Upload metadata chapter
project creation guide
OpenSea testnet
OpenSea testnet
here
https://discord.gg/dev3
Dev3 Dashboard.
here
Creating NFT (Mintable, Burnable, Pausable) on the Dev3 Dashboard.
NFT token creation screen.
NFT token creation process.
NFT token in the list of deployed contracts.
Minting NFTs.
NFT contract address.
NFT collection is live! 🥳