Loopring Layer 2 Mint Metadata Explanation

Loopring supports metadata according to the ERC1155 metadata schema format which uses the “properties” array. For more information regarding the overall spec as well as the syntax of this format, please visit: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1155.md#erc-1155-metadata-uri-json-schema. Loopring also supports OpenSea’s metadata schema format which uses the “attributes” array. For more information regarding the syntax of this format, please visit: https://docs.opensea.io/docs/metadata-standards#attributes.

A. Minimum requirements when minting

{
    "name": "NFT Name",
    "description": "Description of your collection.",
    "image": "ipfs://CID-TO-SMALL-THUMBNAIL",
    "animation_url": "ipfs://CID-TO-FULL-SIZE-IMAGE-OR-VID",
    "royalty_percentage": 0,
    "collection_metadata": "ipfs://Qm7Ys...usd",
    "mint_channel":  "Loopring"
}

B. A note about "image" and "animation_url"

In general, the "image" field is intended to be a smaller, faster loading thumbnail of your content, while the "animation_url" is intended to be the full-size image, video, or other file type of your NFT. It's okay to set both fields to the same value, several NFTs have done it this way.

  1. “image”

    • The "image" field in the metadata should always be an image file type (png, jpg, gif, etc.). Marketplaces consider it to be a lower quality thumbnail to help. ensure the thumbnail of your content loads quickly.

  2. “animation_url”

    • The “animation_url” field is reserved for a high quality picture, GIF, video or audio file. When using this field you should enter a thumbnail version into the “image”  field and the higher quality file into the  “animation url” field. Marketplaces will automatically display the correct file, even HTML, if it is in the  “animation_url” field.

More info from the OpenSea standard: https://docs.opensea.io/docs/metadata-standards#metadata-structure

C. Royalties

The “royalty_percentage” field is an integer. It can be any value between 0 - 10. When trading in Loopring L2, the royalty will be collected and automatically distributed to the creator via the Loopring relayer.

D. Example with Traits

Including traits in the metadata allows the creator to indicate a level of rarity for the NFT. Additionally, marketplaces may use them to enable users to search or filter when looking for an NFT. As previously mentioned, Loopring includes both the "properties" and  "attributes" arrays when minting. While the syntax is slightly different between the two, both arrays contain identical information and allow the creator to set customized traits for any given NFT.

 {
    "name": "NFT Name",
    "description": "Description of your NFT",
    "image": "ipfs://CID-TO-THUMBNAIL-SIZE",
    "animation_url": "ipfs://CID-TO-FULL-SIZE-OR-FILE",
    "royalty_percentage": 0,
    "attributes": [{
        "trait_type": "Hair",
        "value": "Curly"
    }, {
        "trait_type": "Nose",
        "value": "Massive"
    }, {
        "trait_type": "Mouth",
        "value": "Closed"
    }, {
        "trait_type": "Chin",
        "value": "Beard"
    }],
    "properties": {
        "Hair": "Curly",
        "Nose": "Massive",
        "Mouth": "Closed",
        "Chin": "Beard"
    }
}

Example with Collection Metadata

{
    "contract": "0x9e1…f0b",
    "banner_uri": "ipfs://Qm8I9...8de",
    "avatar_uri": "ipfs://Qm8I9...8de",
    "tile_uri": "ipfs://Qm8I9...8de",
    "name": "Test NFTs", 
    "description": "NFTs for platform testing." 
}

The contract field should match the contract address that the NFT exists within.

Below is the description for collection metadata:

  1. Avatar: 500*500 pixel

    • Your collection can have its own avatar, separate from your profile avatar or icon. Collection avatars can be static images or gif/webp files. 

  2. Banner: 1500*500 pixel

    • The collection banner sits at the top of your collection page. Collection banners can only be static images. 

  3. Tile: 500*700 pixel

    • Also referred to as the cover. Your collection tile displays on your profile and the explore page as a static image or gif/webp animation.

If the URI points to an IPFS address, the collection is immutable; if the URI points to an HTTPS address, the collection is mutable. For more information, please refer to the collection-relevant document.

E. “mint_channel”

The “mint_channel” is an optional field. It specifies the channel from which the NFT is minted if it exists. For example, “Loopring” indicates the creator is minting the NFT from the Loopring mobile app (or web); “Uptick” indicates the creator is minting the NFT from the Uptick marketplace.

Last updated