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 2: Upload metadata

PreviousStep 1: Upload assetsNextStep 3: Deploy contracts

Last updated 2 years ago

We need to create the metadata file for every image inside the images folder, so in our case that's a total of three metadata files.

Every image in the collection is described by its metadata file, and the metadata file has to be named the same way as the image it describes. So for image "0.jpg" we will create a file named "0", for image "1.jpg" we will create a file named "1" and so on. These files have no extension in the file name and will be stored in the separate folder. I'm going to name the folder "metadata", but the folder name as in the step before is irrelevant.

The metadata files are standardized across the NFT space and they're used to fully describe collection items. Some of the possibilities for the metadata file are outlined . You will be able to find your NFT on any popular marketplace if you define the metadata files correctly.

We uploaded three images for our test collection, so we need to create three metadata files. In your case, numbers might be different. Here's the example of how our file "0" looks like:

{
  "name": "Monkey #0",
  "description": "Monkeyz NFT collection is a rare NFT collection with three items.", 
  "image": "ipfs://QmT8kRCYyZ4VUFd2r3xYZj81uyE7M2S4RYgVp5vcqcr32W/0.jpg"
}

The image field is very important here. Note that we have used the CID from the previous step to build the image URL. It always starts with:

ipfs://

Then goes the CID value from the step 1 (). In our case, that's: QmT8kRCYyZ4VUFd2r3xYZj81uyE7M2S4RYgVp5vcqcr32W

and finally the concrete image name described by the metadata file, in this case it's:

/0.jpg

Combining all of these together, you get the full link pointing to the image 0, which is:

ipfs://QmT8kRCYyZ4VUFd2r3xYZj81uyE7M2S4RYgVp5vcqcr32W/0.jpg

The name and the description values in the metadata file are arbitrary, and you can put any text there. For more customization options, check the where you can find detailed information on all the properties which you can use to describe your items in more detail.

The rest of the metadata files are built the same way, by creating the files "1", "2" and so on. The image URL will be different in these new files. Depending on the concrete metadata file, the image URL will have /1.jpg or /2.jpg and so on, depending on the metadata file and the collection item you're describing.

Once you've created your own metadata files, you have to upload the folder to the IPFS the same way we did in the step before. We'll do this again using the Pinata service, and this step is shown in the short video below:

The result of the upload process is the CID hash of the uploaded metadata folder. In our case, the value is

QmYimyZwYP43qWeqj27UiSgZRQLErcCkdt94MEPhDALvko

This is the main hash describing our test NFT collection, and we are going to use it in the next step to actually deploy the smart contracts and connect them with the hash above.

We've created three item descriptions for our test collection, using the text editor of choice: - but you can use whatever text editor you're comfortable with. All the files are in the same folder, which we named: "metadata". Files with their content are shown below (all of them opened in different tabs for you to see everything at once):

🚀
👾
here
Upload assets chapter
docs
Visual Studio Code
NFT collection metedata files.
Uploading the metadata folder to the IPFS using PInata service.