From ff265b86df870663fb56695176d6aaa770077cc3 Mon Sep 17 00:00:00 2001 From: Tommy Nicholas Date: Sun, 6 May 2018 11:19:30 -0400 Subject: [PATCH] Token metadata json schema (#1047) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add initial EIP skeleton * Initial take through "Rationale" * First very rough draft of ERC20 Metadata Extension Nearly ready for comments by Matt, Matt, and John * Initial "Token Metadata Standard" Proposal + small change to ERC721 - Added initial “Token Metadata JSON Schema” - Re-named “ERC721 Metadata JSON Schema” to “Token Metadata JSON Schema” in the ERC721 EIP * ERC20 Metadata Extension ready to read * Update Title of ERC Metadata Extension * Fixing Matt's Github handle Apparently Github handles for authors are meant to be “accurate” - who knew? * update grammatical errors; properly format JSON to remove excess commas * update JSON descriptions & make grammatical changes to EIP * Changed language in Token Metadata JSON Schema to reflect use by tokens which are not NFT's. Added clarification for backwards compatibility * update authors and contact email * Author Fix * Removing ERC20 Metadata Extension This branch is going to be just the Token Metadata Standard * Removing change to 721 and renaming to 1047 * Full ERC721 revert No changes to ERC721 in this PR --- EIPS/eip-1047.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 EIPS/eip-1047.md diff --git a/EIPS/eip-1047.md b/EIPS/eip-1047.md new file mode 100644 index 00000000..071cf93a --- /dev/null +++ b/EIPS/eip-1047.md @@ -0,0 +1,72 @@ +--- +eip: 1047 +title: Token Metadata JSON Schema +author: Tommy Nicholas (@tomasienrbc), Matt Russo (@mateosu), John Zettler (@JohnZettler) +discussions-to: https://www.reddit.com/r/raredigitalart/comments/8hfk2a/token_metadata_json_schema_eip_1047/ +status: Draft +type: Standards Track +category: ERC +created: 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. + +```json +{ + "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](https://creativecommons.org/publicdomain/zero/1.0/).