Creating your NFT with Azure – Part 1

Post View : 3410

In this series, we will be creating our own NFT step-by-step by using Azure cloud native services and Blockchain-as-a-Service (BaaS). Here are some steps we need to go through:

  1. Learn more about NFT and Blockchain on cloud
  2. Prepare your own NFT
  3. Blockchain setup
  4. Smart Contract deployment

What is Non-fungible tokens (NFT)?

Non-fungible token is a non-interchangeable unit of data stored on a blockchain, that can be sold and treaded. It is a unique digital item and stored on blockchain to manage it ownership. Nowadays many industries are creating their NFTs mainly game items, digital artworks, concert tickets and even virtual world lands.

NFT metadata – The actual content of NFT

Metadata is a kind of descriptive information for storing your data of NFT in a specific token ID. Usually the metadata will contain certain information, let us take a look into one of the NFT’s metadata examples:

{
  "name": "Azuki #6106",
  "image": "https://ikzttp.mypinata.cloud/ipfs/QmYDvPAXtiJg7s8JdRBSLWdgSphQdac8j1YuQNNxcGE1hg/6106.png",
  "attributes": [
    {
      "trait_type": "Type",
      "value": "Human"
    },
    {
      "trait_type": "Hair",
      "value": "Black Fluffy"
    },
    {
      "trait_type": "Headgear",
      "value": "Red Panda Baseball Cap"
    },
    {
      "trait_type": "Ear",
      "value": "Corded Earbuds"
    },
    {
      "trait_type": "Clothing",
      "value": "Black Kimono"
    },
    {
      "trait_type": "Eyes",
      "value": "Pensive"
    },
    {
      "trait_type": "Mouth",
      "value": "Relaxed"
    },
    {
      "trait_type": "Offhand",
      "value": "Bean Juice"
    },
    {
      "trait_type": "Background",
      "value": "Off White A"
    }
  ]
}

In the metadata, we can know the name of the NFT is called “Azuki #6106”, and the url of its image. Also there are some attributes presented on the NFT, every token may have different attributes and you can record it on the metadata of NFT.

Storing NFT image in Azure Storage

Azure storage provides a cloud native solution for us to store massive, scalable and secure information on cloud for your applications, websites, or even NFTs.

As we can see, usually a NFT will contain an image and provide the image url on its metadata. We could use Azure blob storage to store the NFT’s image and serve the url to its metadata.

Creating Azure Storage

Start your Azure account with $200 free credit with your Microsoft account. Then login to Azure portal and click “Create a resource”, search “Storage account”.

Create a storage account with your subscription, resource group and fill in storage instance details:

Remember the Network access, leave the default setting “Enable public access from all networks”:

Review the setting and click “Create”:

After successfully created a storage account, in “Containers” session create a new container for storing our NFT images:

Remember “Public access level”, let the container anonymous read access for containers and blobs.

Upload your NFT image by clicking “Upload”:

After uploaded your image, you can get the url of the image in Overview, properties:

Let us review in NFT metadata, right now we have the url of its image:

{
  "name": "NFT in Azure",
  "image": "https://soshk4testing.blob.core.windows.net/nft-image/1_n9cJMquHAVVEkEMBtwoygA.png",
  "attributes": [
    ...something...
  ]
}

In the next chapter we will continue the steps to create our own NFT metadata with Azure.

If you have any questions or would like to schedule a consultation with our expert team, please feel free to contact us at enquiry@soshk.com or call us at 3525 1828  

Thank you for reading and see you in the next blog!  

Chris Wan, Application Architect, SOS Group Limited  

Created on June 1, 2022 

Chris Wan
Website | + posts

Microsoft Certified Trainer (MCT)
Application Architect, SOS Group Limited

SOS Group Limited © 2024. All Rights Reserved.