LogoLogo
  • FAQ
    • Welcome to Sparkles FAQ
  • About Sparkles & NFTs
    • What is Sparkles?
    • What is an NFT?
    • How are my NFTs stored?
    • What is a wallet and why do I need one?
    • What wallets can I use on Sparkles?
    • What blockchain does Sparkles support?
    • Why is Sparkles built on Songbird?
    • Aren’t NFTs bad for the environment and is Sparkles doing anything about this?
    • What makes Sparkles different from other NFT marketplaces?
    • How do I become a part of the Sparkles community?
    • What are Sparkles' fees?
    • Where can I learn more about NFTs?
  • Getting Started
    • How do I add the Flare network to my MetaMask wallet?
      • Where can I get $FLR?
    • How do I add the Songbird network to my MetaMask wallet?
      • Where can I get $SGB?
    • How do I view my NFTs?
    • How do I use filtering, sorting and searching in collections?
    • How do I use the analytics, activity history and events table?
    • Can I transfer an NFT as a gift?
    • Why do I have to 'approve' my NFT and other tokens?
    • How do I import my Bifrost wallet into MetaMask?
    • How do I prevent my test collections showing on Sparkles?
    • What are the recommended specifications for profile and collection page images?
    • How do I refresh the metadata of an NFT?
    • Metadata standards
  • BUYING AND SELLING NFTS
    • How do I see which NFTs are for sale?
    • How do I buy an NFT?
    • How do I make & remove offers on an NFT?
    • How do I accept an offer on my NFT?
    • How do I list an NFT for sale?
    • How do I remove an NFT from sale?
    • How do auctions work?
  • Safety and Security
    • Is connecting my wallet to Sparkles safe and secure?
    • Does Sparkles have access to my wallet’s private keys?
    • What is Sparkles’ policy on stolen items?
    • What should I do if works I own the copyright in are being sold without my consent?
    • How do I submit a copyright counter-notice?
    • Are spin-off, homage, remix or derivative collections permitted on Sparkles?
    • What should I do if I think items on Sparkles breach the Terms and Conditions?
    • How do I report fake or fraudulent content?
    • How do I keep my NFTs safe?
    • What should I do if I think my account has been compromised?
  • Legal Information
    • Terms and Conditions
    • Privacy Policy
  • Troubleshooting
    • My NFTs aren't displaying in my wallet, what can I do?
    • The Sparkles website isn’t working, where can I get help?
  • Community Tools
    • NFT Airdrops
Powered by GitBook
On this page
  • Why are metadata standards important?
  • Token URI implementation
  • Metadata structure
  • Attributes
  • IPFS and Arweave URIs

Was this helpful?

  1. Getting Started

Metadata standards

Using rich metadata in your ERC721 and ERC1155 NFTs

PreviousHow do I refresh the metadata of an NFT?NextHow do I see which NFTs are for sale?

Last updated 2 years ago

Was this helpful?

Providing metadata to universally recognized standards for your assets permits dApps, such as Sparkles, to pull in rich data for digital assets and display them as expected in-app. Digital assets on a given smart contract are typically represented solely by a unique identifier (e.g., token_id in ERC-721). The metadata associated to these unique identifiers allows the assets to have additional properties, such as a name, description, and image.

Why are metadata standards important?

Metadata standards ensure that universally recognised approaches are followed, giving confidence to NFT purchasers that an NFT's metadata is structured correctly.

This becomes particularly important as assets become cross-chain on blockchains, as it ensures that your NFT will display correctly, regardless of the EVM chain it is on.

Failure to follow means that your NFT is not structured correctly. This will lead to display issues within any application that does follow .

Token URI implementation

To allow Sparkles to pull off-chain metadata for ERC-721 and ERC-1155 assets, your contract needs to return a URI where the metadata can be found. To find this URI, Sparkles uses the tokenURI method in ERC-721 and the uri method in ERC--1155.

The tokenURI function in your ERC-721 contract or the uri function in your ERC-1155 contract needs to return either an HTTP or IPFS URL. Upon querying your URL, it should return the JSON data with the metadata for your token.

For more information on this, see the section on IPFS and Arweave for handling decentralized metadata URIs (below).

Metadata structure

Sparkles supports the metadata structures in accordance with the and/or the .

Furthermore, Sparkles supports multiple other properties allowing multi-media attachments (e.g., audio, video, 3D models), allowing you to utilize functionality on Sparkles.

Below is an example of metadata structuring within an NFT according to metadata standards:

{
"name": "The Sparkles Genesis Collection #742",
"image": "ipfs://QmZbZvhjja1qhMbZN3tCfntRa2XPC88QB8PBSowgJfw5vw/742.png",
"edition": 742,
"description": "The Songbird Canary Project",
"attributes": [ ... ],
"animation_url": "ipfs://QmeRu734ndhjfeEJDB1M3XgVTj2xMNJ/742.mp4"
}

This is how the properties work:

name

Name of the item.

image

edition

Number of the token within the collection.

description

Human readable description of the item.

attributes

Attributes for the item, which show as properties the on the item page of Sparkles. (see below)

animation_url

URL to a multi-media attachment for the item. The file extensions such as GLTF, GLB, WEBM, MP4, M4V, MOV, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.

youtube_url

A URL to a YouTube video.

external_url

This is the URL that will appear below the asset's image on Sparkles and will allow users to leave Sparkles and view the item on your site.

You should use an image file type within an "image" property.

You should not use multi-media file types within an "image" field.

If you wish to include multi-media files within your metadata, you should include these within an "animation" field.

Attributes

To give your items more panache, your metadata can include "attributes" or "traits" which display as "Properties" under the "Info" tab within the NFT item page on Sparkles.

Below is an example of metadata structuring of traits within an NFT according to metadata standards:

...
{
"attributes": [
{
      "trait_type": "Background"
      "value": "Blue Grad",
    },
    {
      "trait_type": "Body"
      "value": "Rainbow Body",
    },
    {
      "trait_type": "Eyes"
      "value": "Money",
    },
    {
      "trait_type": "Bodywear"
      "value": "White Tank",
    },
    {
      "trait_type": "Headwear"
      "value": "No Hat",
    },
    {
      "trait_type": "Ear Feathers"
      "value": "Money",
    },
    {
      "trait_type": "Beaks"
      "value": "Golden Toothed Grin",
    },
    {
      "trait_type": "Extras"
      "value": "None",
    }

In the above example, trait_type is the name of the trait (displayed as a property on Sparkles), and value is the value of the trait.

IPFS and Arweave URIs

Storage of NFT metadata in decentralized file networks such as IPFS and Arweave, to prevent modification by a centralized entity, are supported by Sparkles.

URL to the item image. Can be most type of image (e.g., JPG, PNG, SVG, GIF), and can be URLs or paths. We recommend equal proportions with a minimum of 350 x 350 image.

IMPORTANT

When using the image property, .

Failure to follow means that your NFT is not structured correctly. This will lead to display issues within any application that does follow .

Should you utilise for metadata hosting, your item URL should follow the format of ipfs://<hash>, e.g., ipfs://QmZbZvhjja1qhMbZN3tCfntRa2XPC88QB8PBSowgJfw5vw.png. If you do choose to store on IPFS, is a good and easy starting point to store data.

The equivalent format is ar://<hash>.

⚠️
⚠️
EVM
the official metadata standards
the proper and official metadata standards
Official ERC721 Metadata Standards
Enjin Metadata Suggestions
filtering and sorting
use the official metadata standards
the official metadata standards
the proper and official metadata standards
IPFS
Pinata
Arweave
IPFS