본문으로 건너뛰기

Metadata format

By the end of this guide, you will know what format metadata should be in and how to parse it


Off-chain metadata

Off-chain metadata should contain the following attributes:

  • name - A string detailing the name of the NFT.
  • description - A string detailing the human readable description of the NFT
  • image - A URL to an image
  • external_link - A URL to external website of NFT
  • animation_url - A URL to a multi-media attachment for the item.
  • youtube_url - A URL to a YouTube video.
  • attributes - An array of strings detailing various attributes. Attributes are defined by a "trait_type" detailing the name of the field followed by a "value" detailing the value of the attribute "value": "Starfish"

Template

This is a sample template for you to fill in when creating your collection metadata:

{
"name": "{Insert the name of your NFT here}",
"description": "{Insert the description of your NFT here}",
"image": "{Insert image URL here}",
"external_link": "{Insert external website URL here}",
"animation_url": "{Insert URL here for multi-media file}",
"youtube_url": "{Insert URL to the relevant YouTube link}",
"attributes": {
"traits": [
{
"trait_type": "{Insert 1st custom metadata attribute name here}",
"value": "{Insert the value of the 1st custom metadata attribute name here}"
},
{
"trait_type": "{Insert 2nd custom metadata attribute name here}",
"value": "{Insert the value of the 2nd custom metadata attribute name here}"
},
{
"trait_type": "{Insert xth custom metadata attribute name here}",
"value": "{Insert the value of the xth custom metadata attribute name here}"
}
]
}
}

Example

This is a filled-in example of NFT metadata:

{
"name": "MonkeyBoatClub",
"description": "The Monkey Boat CLUB is a collection of up to 10,000 monkeys that love boats",
"image": "https://i.seadn.io/gae/C0Zhdh2nyfUl21Uazr_Ok1MNukaVfaUV9thrj1Xv7fNp43DDFOwSxrd5sGcRRN0BZs3bX6wHAral-XT7I_o9800o2g1mTQB7kgF2ZA?w=500&auto=format",
"external_link": null,
"animation_url": null,
"youtube_url": null,
"attributes": [
{
"trait_type": "Hat",
"value": "M1 Short Mohawk"
},
{
"trait_type": "Earring",
"value": "M1 Gold Hoop"
},
{
"trait_type": "Background",
"value": "M1 Yellow"
},
{
"trait_type": "Clothes",
"value": "M1 Hawaiian"
},
{
"trait_type": "Fur",
"value": "M1 Noise"
},
{
"trait_type": "Eyes",
"value": "M1 Angry"
},
{
"trait_type": "Mouth",
"value": "M1 Rage"
}
]
}