-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERC20 metadata extension #1046
ERC20 metadata extension #1046
Conversation
Nearly ready for comments by Matt, Matt, and John
- Added initial “Token Metadata JSON Schema” - Re-named “ERC721 Metadata JSON Schema” to “Token Metadata JSON Schema” in the ERC721 EIP
Apparently Github handles for authors are meant to be “accurate” - who knew?
…ns which are not NFT's. Added clarification for backwards compatibility
This Branch will be just the ERC20 Token Metadata Extension
EIPS/eip-721.md
Outdated
@@ -186,13 +186,13 @@ interface ERC721Metadata /* is ERC721 */ { | |||
|
|||
/// @notice A distinct Uniform Resource Identifier (URI) for a given asset. | |||
/// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC | |||
/// 3986. The URI may point to a JSON file that conforms to the "ERC721 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't include changes to unrelated files in your PR.
EIPS/eip-erc20-metadata-extension.md
Outdated
@@ -0,0 +1,85 @@ | |||
--- | |||
eip: <to be assigned> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please number this 1046 and rename eip-1046.md.
EIPS/eip-erc20-metadata-extension.md
Outdated
eip: <to be assigned> | ||
title: ERC20 Metadata Extension | ||
author: Tommy Nicholas (@tomasienrbc), Matt Russo (@mateosu), John Zettler (@JohnZettler), Matt Condon (@shrugs) | ||
discussions-to: thelab@rareart.io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please supply a mailing list or discussion forum URL.
EIPS/eip-erc20-metadata-extension.md
Outdated
--- | ||
|
||
## Simple Summary | ||
Optionally extend ERC20 token interface to support the same metadata standard as ERC721 tokens |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: period
EIPS/eip-erc20-metadata-extension.md
Outdated
|
||
The initial use case for the ERC721 standard was to support the creation of crypto-collectibles and gaming assets, initially for the ["Crypto Kitties"](https://www.cryptokitties.co/) collectibles game. The success of Crypto Kitties catalyzed significant application development to support the display of ERC721 assets using the `tokenURI` metadata parameter. | ||
|
||
However, not all crypto-collectibles and gaming assets need to be unique and non-fungible. Gaming assets (items, weapons, characters), crypto-artworks with non-unique "prints", and more will function more like traditional ERC20 tokens with a fungible `supply`. Many applications such as wallets, exchanges, games, etc. will want to support both fungible and non-fungible assets containing similar metadata. This proposal will extend the ERC20 standard to optionally include a nearly identical `tokenURI` parameter supporting the same JSON metadata schema as the ERC721 standard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why "nearly" and not just identical?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the tokenURI param in ERC721 contracts takes in a token ID because it has to identify the specific token the metadata is associated with.
721: function tokenURI(uint256 _tokenId)
20-extended: function tokenURI()
think it's too confusing to say "nearly" - might be unnecessary.
EIPS/eip-erc20-metadata-extension.md
Outdated
## Rationale | ||
This proposal will make adding metadata to ERC20 tokens straightforward for developers with minimal-to-no disruption to the overall ecosystem. By using the same parameter name and by consolidating the underlying Token JSON Metadata Standard, developers will confidently understand how to add and interpret token metadata between ERC20 and ERC721 tokens. | ||
|
||
## Backwards Compatibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention that the token's name()
and symbol()
getters should be preferred over the metadata's name
and (optional) symbol
properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-submitting with these fixes now
- Some grammar fixes - Removed mentions of ERC721 standard code - Added EIP # and discussion forum
EIPS/eip-1046.md
Outdated
eip: 1046 | ||
title: ERC20 Metadata Extension | ||
author: Tommy Nicholas (@tomasienrbc), Matt Russo (@mateosu), John Zettler (@JohnZettler), Matt Condon (@shrugs) | ||
discussions-to: thelab@rareart.io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this, and rename discussion-forum
to discussions-to
.
discussion-to instead of discussion-forum
Hi! I'm a bot, and I wanted to automerge your PR, but couldn't because of the following issue(s):
|
@Arachnid I accidentally have a file from ERC721 changed in this PR (sorry didn't catch that) - removing that and re-submitting |
No changes to ERC721 in this PR now
@Arachnid changes to ERC721 are now fully reverted - no changes to ERC721 in this PR, auto-merge should be possible |
EIPS/eip-1046.md
Outdated
eip: 1046 | ||
title: ERC20 Metadata Extension | ||
author: Tommy Nicholas (@tomasienrbc), Matt Russo (@mateosu), John Zettler (@JohnZettler), Matt Condon (@shrugs) | ||
discussion-to: https://www.reddit.com/r/raredigitalart/comments/8hfh1g/erc20_metadata_extension_eip_1046/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be discussions-to
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes - fixed
This is the initial submission for an ERC20 Metadata Extension standard. The goal of this EIP is to optionally extend ERC20 token interface to support the same metadata standard as ERC721 tokens. This supports fungible crypto-collectibles that have the same metadata structure as non-fungible crypto-collectibles, amongst many other use cases.
This was a collaboration between @shrugs, @JohnZettler, and @mateosu