Links

NFT standards

This article provides a standard NFT Metadata format to facilitate users to integrate the NFT module of the Bounce platform.
The NFT standard is divided into two protocols: ERC721 and ERC1155 (as Enjin first proposed both, we will follow Enjin's Metadata standard).
​
ERC721 standard introduction:
ERC1155 standard introduction:

Metadata usage

Metadata enables NFTs’ subsidiary functions, which can describe each NFT, including pictures, names, descriptions, etc. The details are as follows:
{"title": "Asset Metadata","type": "object","properties": {"name": {"type": "string","description": "Identifies the asset to which this NFT represents"},"description": {"type": "string","description": "Describes the asset to which this NFT represents"},"image": {"type": "string","description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."}}}Metadata is obtained on ERC721 by reading the tokenURI function, and in the ERC1155 contract by reading the URI function. Take the tokenURI of a certain NFT in Burger as an example: https://raw.githubusercontent.com/burgernft/nft_assets/master/ETH-1.json​Burger puts Metadata information into GitHub, and users can see the current information of Metadata and also its modification records. A user can obtain the URL through the tokenURI, and then read the JSON format data through the URL.This is how the Metadata data looks like on the Bounce platform:
ERC721 Metadata data structure description
{"title": "Never Forget The Girl","type": "art","properties": {"name": {"type": "string","description": "Cindy Yi"},"description": {"type": "string","description": "An irreplaceable girl."},"image": {"type": "string","description": "https://shalomhu.github.io/bounce/NFT/images/img_01.jpg"}}}
ERC1155 Metadata data structure description
{"title": "Token Metadata","type": "object","properties": {"name": {"type": "string","description": "Identifies the asset to which this token represents",},"decimals": {"type": "integer","description": "The number of decimal places that the token amount should display - e.g. 18, means to divide the token amount by 1000000000000000000 to get its user representation.",},"description": {"type": "string","description": "Describes the asset to which this token represents",},"image": {"type": "string","description": "A URI pointing to a resource with mime type image/* representing the asset to which this token represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive.",},"properties": {"type": "object","description": "Arbitrary properties. Values may be strings, numbers, object or arrays.",},"localization": {"type": "object","required": ["uri", "default", "locales"],"properties": {"uri": {"type": "string","description": "The URI pattern to fetch localized data from. This URI should contain the substring `{locale}` which will be replaced with the appropriate locale value before sending the request."},"default": {"type": "string","description": "The locale of the default data within the base JSON"},"locales": {"type": "array","description": "The list of locales for which data is available. These locales should conform to those defined in the Unicode Common Locale Data Repository (http://cldr.unicode.org/)."}}},}}
©2023 Bounce dao Ltd. All rights reserved.