2.8 KiB
eip | title | author | discussions-to | status | type | category | created |
---|---|---|---|---|---|---|---|
1047 | Token Metadata JSON Schema | Tommy Nicholas (@tomasienrbc), Matt Russo (@mateosu), John Zettler (@JohnZettler) | https://www.reddit.com/r/raredigitalart/comments/8hfk2a/token_metadata_json_schema_eip_1047/ | Draft | Standards Track | ERC | 2018-04-13 |
Simple Summary
A standard interface for token metadata
Abstract
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.
Motivation
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.
Specification
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.",
}
}
}
Rationale
One JSON schema standard will allow for simpler maintenance of this critical schema.
Backwards Compatibility
Fully backwards compatible requiring no code changes at this time
Test Cases
TO-DO
Implementation
TO-DO
Copyright
Copyright and related rights waived via CC0.