Create, deploy & mint a non-fungible token (NFT)
A step-by-step tutorial on how to create, deploy and mint a ERC-721 NFT with VORJ.
Prerequisites
To follow this tutorial you must have completed the following:
Created and verified your account on VORJ. If you have not completed this please follow this tutorial How to create an account on VORJ.
Created an organization and a project. If you have not completed this step please follow this tutorial Create an organization and project space.
Objective of this tutorial
The objective of this tutorial is to provide a simple jargon free step-by-step guide on how a user can create, deploy and mint an NFT collection.
What is a ERC-721 NFT?
To answer the question of what is a ERC-721 NFT let's first break this question into two.
What do we mean by non-fungible token (NFT)?
A NFT is a unique digital asset that is not interchangeable with any other asset because it has unique characteristics and properties that make it different from all other assets. The most common NFT standard in use within the blockchain ecosystem is the ERC-721 standard.
Unlike fungible tokens, which have identical values and can be traded interchangeably, NFTs are unique and often represent one of a kind items such as digital art, collectibles, music, videos and other forms of media. Each NFT has a unique identifier, tokenID
, that distinguishes it from all other tokens and represents its unique value and properties.
For example, image you have a digital painting. While you could create multiple copies of the file, each copy would be identical and thus not unique. However, if you create an NFT of the digital painting, it becomes a unique asset that is represented by a specific token on a blockchain. This token can be bought, sold or traded just like a physical painting.
What does ERC-721 mean? (Technical - skip if you want)
An Ethereum Request for Comment (ERC) is a document that outlines the rules that determine how data is formatted, transmitted and also what actions will take place when an event occurs.
The ERC-721 standard, which is one of the most popular token standards, determines the standards / rules that determine how data is formatted, transmitted and what actions will take place when an events occurs.
As VeChain is compatible with the Ethereum Virtual Machine (EVM) and the ERC-721 standard is used across all EVM compatible chains for interoperability across chains it makes sense for VeChain to use the ERC-721 non-fungible token standard.
1. Go to the Dashboard page
If you are continuing on from the previous tutorial of Create, deploy & mint a non-fungible token (NFT) you can skip to step 4 of this tutorial.
If you have come to this tutorial having completed the Create an organization and project space tutorial you should see a screen similar to the image below.
If you are on another page other than the Dashboard page, which should be similar to the image below, navigate to the Dashboard page by selecting the top left icon on the navigation bar on the left.
If you have logged out of VORJ then login at https://vorj.app/ and you should see a screen similar to the image below.
2. Access your project
Select the project that you created by pressing on it. This should redirect you to the project space. Your screen should now look similar to the one below.
3. Allocate some resources to your project
Refer to Plans, Resources and Usage for more information in terms of the plan metrics.
To create a non-fungible token we must first assign some resources to the project. Select the Allocate Resources button. This will bring up a modal similar to what is show below. This modal allows you to assign resources to your project. Let's just max out the resources for this project. We can always reassign unused resources across projects.
After having assigned all of the available resources to a project we should see a screen similar to the one below.
4. Create and deploy a non-fungible token
From within your project space press the Create Smart Contract button in the top right hand corner to start. This will open a modal requesting you to select the smart contract standard that you want to create. Select the second option Non-Fungible Token.
After selecting the Non-Fungible Token option you should now see a screen similar to the one presented below. This is the non-fungible token form. There are two fields that must be populated, five optional features and two file upload components. While there are information icons available on the page which should help you understand what is required for each item let's quickly talk through each of the nine items.
Populate the two required fields with any values that you want and select the features that you would like for your specific smart contract implementation.
Once you have populated the form press the Deploy button or if you prefer press Save and come back later and Deploy another time.
Once you have pressed Deploy you will see a screen similar to the below which is informing you that there will be a minimum of a two minute wait until your contract has been deployed and indexed by VORJ.
Once the contract has been deployed and indexed by VORJ you can perform some Actions with your smart contract.
5. Perform some actions with your NFT
Once your NFT smart contract has been deployed you should see a screen similar to the below.
There are some elements on this screen that we should discuss. The long hexadecimal string starting with 0x is the contract address of your deployed smart contract. Next to the contract address are three icons. The first icon copies the address to your clipboard. The second icon links out to the explorer to view your smart contracts transactions. The third icon, IPFS, links to the VORJ IPFS node where your media has been uploaded to.
The form elements on this page will depend on the features that you implemented as part of your contract. From the image above we can see that the contract was deployed with the pausable feature. This means that the contract can be paused and unpaused with the press of a button.
The primary function on the Action tab is the ability to mint tokens. You can mint tokens from your NFT smart contract to any address. In this particular contract we set the minting approach to selective. Selective minting means that we can choose which tokens to mint to which address and we can mint any amount by populating the TokenID cell from the dropdown list. We have provided a useful balance counter for the smart contract to inform the user how many tokens remain un-minted.
Double check that the address is correct. Once a transaction has been submitted it is irreversible and the NFT cannot be recovered.
To do a test transaction you could send some of the tokens to the burn address 0x000000000000000000000000000000000000dEaD
. This is an address which is used to burn tokens, the funds in this address are lost forever as there is an almost zero percent likelihood that the key for this address can be generated.
Done, Congratulations
You have successfully created and deployed a NFT on the vechain blockchain.
In terms of next steps consider investigating what you can do with your newly generated fungible token in the NFT utility.
Last updated