# 简要说明

A standard interface for token metadata

# 摘要

The ERC721 standard introduced the "tokenURI" parameter for non-fungible tokens to handle metadata such as:

  • thumbnail image
  • title
  • description
  • properties
  • etc.

This is particularly critical for crypto-collectibles and gaming assets.

This standard includes a reference to a metadata standard named "ERC721 Metadata JSON Schema". This schema is actually equally relevant to ERC20 tokens and therefore should be its own standard, separate from the ERC721 standard.

# 动机

Metadata is critical for both ERC721 and ERC20 tokens representing things like crypto-collectibles, gaming assets, etc. Not all crypto-collectibles and gaming assets will be non-fungible. It is critical for fungible ERC20 tokens to have a metadata standard similar to that of ERC721 tokens. Standardization of metadata between ERC20 and ERC721 will simplify development of dApps and infrastructure that must support both fungible and non-fungible assets.

It is more logical and easier to maintain one Token Metadata JSON Schema rather than multiple schemas contained in their own EIPs.

This should result in no code changes to the ERC721 standard or ERC20 standard and will serve only to simplify the process of maintaining a standard JSON Schema for token metadata.

# 规范

This "Token Metadata JSON Schema" mimics the structure of the ERC721 standard. Only grammatical changes are being recommended at this time.

{
    "title": "Asset Metadata",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "description": "Identifies the asset to which this token represents",
        },
        "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.",
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# 原理阐述

One JSON schema standard will allow for simpler maintenance of this critical schema.

# 向后兼容

Fully backwards compatible requiring no code changes at this time

# 测试用例

TO-DO

# 实现

TO-DO

# 版权

Copyright and related rights waived via CC0.