In the previous article, we have started to introduce NFT and the blockchain service provided by Azure. Let’s continue on our journey of creating our own NFT.
Current NFT market?
Nowadays NFT(Non-fungible token) is a hot topic no matter in different areas like art, music and game. If you are interested in finding yourself some NFTs, then you can check on OpenSea. OpenSea is the world’s first and largest digital marketplace for crypto collectibles and non-fungible tokens. You could find many famous digital items on OpenSea like artwork, poems, or domain names.
NFT metadata – Continue preparing our NFT metadata
In the last chapter, we talked abut NFT’s metadata and how to prepare the image url for our NFT. In this chapter, we will continue on preparing our metadata in the standard format.
NFT metadata – Data Structure
There are many formats and standards for NFT, one of it called ERC721 (we will cover it in the next chapter). In ERC721, there is a structured metadata for NFT as the following example:
{
"description": "Friendly Chris Creature that enjoys long swims in the blockchain ocean.",
"external_url": "http://52.139.172.70",
"image": "https://soshk4testing.blob.core.windows.net/nft-image/1_n9cJMquHAVVEkEMBtwoygA.png",
"name": "Blockchain Art",
"attributes": [ ... ],
}
In this example, we can know the metadata including some properties:
image_data | Raw SVG image data, if you want to generate images on the fly (not recommended). Only use this if you’re not including the image parameter. |
external_url | This is the URL that will appear below the asset’s image on OpenSea and will allow users to leave OpenSea and view the item on your site. |
description | A human readable description of the item. Markdown is supported. |
name | Name of the item. |
attributes | These are the attributes for the item, which will show up on the OpenSea page for the item. |
background_color | Background color of the item on OpenSea. Must be a six-character hexadecimal without a pre-pended #. |
animation_url | A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported. |
youtube_url | A URL to a YouTube video. |
Not every property needs to be included in the NFT metadata, but most of the time we will include the image data, description, name and some attributes of the item.
Azure Blob Storage – NFT metadata
In the previous chapter, we created a storage account on Azure, we will continue using the storage for creating our NFT. Metadata usually will store as a .json format so we will need to create a .json file with the format we mentioned before, like this:
Then remember to save as .json and upload it to our Azure storage.
In Azure storage, we can create another container for storing those metadata .json files. In “Container”, click “New container” and type “nft-metadata”. Public access level select “Container (anonymous read access for containers and blobs)”. Then click “Create”
After creating the container, click the name of it and we can upload any file on this container now. Click “upload” and select the metadata file, you can tick the option “Overwrite if files already exist” if you would like to overwrite any file on this container with the same file name. Then click “Upload”.
If everything is fine, you will get your file url by checking the properties of the file:
Again, if you set the container for public access, you can view the metadata directly using the url:
In the next chapter, we will continue on setting up our own blockchain for the NFTs.
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
Microsoft Certified Trainer (MCT)
Application Architect, SOS Group Limited