So, you saw that nice NFT project recently and since then, the idea of creating your own NFT is stuck in your mind? Or you’re just a curious person and you’d like to try it out? That’s nice, but you don’t know how it’s done exactly? Where to start? Where to go? Don’t worry, we’ll answer all those questions here.

In fact, it’s quite easy. You don’t need any special knowledge to do it. A a simple NFT can be created in less than ten minutes.

In this guide we’ll show you how to create and mint your own NFT on the Oasis Network. We won’t go in details of what a NFT is, what is the user of a NFT and all other more theoretical questions. But I do recommend you to read about it, it’s a fascinating topic!

The first thing to do, it’s create the image you’ll be using for the NFT. You can draw it, you can take a picture, write a poem or whatever, it’s up to you. During this guide we’ll be using the following image:

OasisWatcher
Aye, our first NFT.

Before we go in depth, let’s summarize what we’ll be doing here.

  1. First, we’ll download and install IPFS. IPFS will allow us to store the NFT’s image on a specific P2P protocol, so it can be used later. If you want to know more about it and how it works, I invite you to take a look at their documentation.
  2. Using Ethereum Remix, we’ll create a Smart Contract on Emerald Paratime.
  3. And finally, we will mint our first NFT on our freshly created contract.

PS: Set your MetaMask Wallet network on “Emerald Paratime Testnet”.


Install IPFS and upload your artwork in it

You can download IPFS on their official website, select your operating system on the left side menu and follow the instructions.

Once downloaded, proceed to the installation, nothing new here. Just hit that “Next” button 😬 Once it’s done, launch the beast and go directly to the “Files” tab on the left side.

On the next screen, click”Import” and upload your artwork.

Now we need to get the sharable link of the uploaded image, click on the three dots near the file and click “Share Link“.

Then you have a pop-up, just hit the “Copy” button and you’re good.

Create the Smart Contract using Ethereum Remix

Our next step is to create the Smart Contrat. For that, we’ll be using Ethereum Remix, that’s a free, open-source webapp that allows you to develop Smart Contracts in any EVM-compatible blockchain. And lucky us, Oasis Network is EVM-compatible 😁

So, once you’re in the webapp, create a new file and name it as you wish, for example “ourFirstSmartContract.sol

Once created, open the file (if it didn’t opened automatically). Copy and paste the code below to the file you just created:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

//import Open Zepplin contracts
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol";

contract NFT is ERC721 {
    uint256 private _tokenIds;

    constructor() ERC721("OasisWatcher", "OSW") {}

//use the mint function to create an NFT
    function mint()
    public
    returns (uint256)
    {
        _tokenIds += 1;
        _mint(msg.sender, _tokenIds);
        return _tokenIds;
    }

    function tokenURI(uint256 _tokenId) override public pure returns(string memory) {
        return string(
            abi.encodePacked(
                "https://ipfs.io/XXXX",
                Strings.toString(_tokenId),
                ".json"
            )
        );
    }
}

Once it’s done, replace the “https://ipfs.io/XXXX” on line 26 by the link that you copied from IPFS at the first step.

Now, we have to compile our code. To do so, go to “Solidity Compiler” and click “Compile“.

Once compiled, we need to deploy our Smart Contract. Go to “Deploy & Run Transactions“. Select “Injected Web3” as environment and your contract (with your file name) in “Contract“. And click “Deploy“.

When you click “Deploy“, your MetaMask will ask you for confirmation. Click “Confirm“.

A couple of seconds later (it depends on how much the network is congested) you contract will be deployed, good job!

You can check it in the Emerald Explorer:

Mint the NFT using our Smart Contrat

The last step is to mint the NFT using our Smart Contract. To do so, select the contract and expand it.

You’ll see the function “mint” in orange, click on it.

And that’s it! You just minted your first NFT, congratulations!

Check your wallet in the Emerald Explorer, you should see your NFT under your “Tokens”.


What we just did was one of the possibilities of creating NFT. You have some tools such as Cointool, Pinata and so on, who help you in this process or do everything for you.

And one thing to know is that our Smart Contract is very basic, if you want to build a strong NFT project you better build a solid Smart Contract too.

Nevertheless, is always good to see how it’s done, from here it’s up to you to learn and build maybe the next featured NFT collection!

Write A Comment