Skip to content
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

The uri function documentation should not indicate hex format IDs #54

Open
christopheradams opened this issue May 14, 2020 · 1 comment

Comments

@christopheradams
Copy link

I think the documentation for the ERC1155Metadata contracts uri() function is misleading:

https://github.com/arcadeum/multi-token-standard/blob/36ebad2194d79f3cf510fcaa80738d61344ff9ab/contracts/tokens/ERC1155/ERC1155Metadata.sol#L23

At first glance, this reads like the function will return the URL with an alphanumeric hexadecimal string representation of the token ID (i.e., "hex format"), rather than a string representation of the integer, which is what _uint2str() does.

It uses the word "assumed" but whose assumption is this? The spec does allow clients to assume a lowercase alphanumeric hexadecimal representation of the token ID when the contracts returns an {id} placeholder, but that's not what is happening here.

@PhABC
Copy link
Contributor

PhABC commented Jun 25, 2020

Good catch! Changed the comment to say integer instead of hex because of how the URIs are returned by that function, the _uint2str() does keep the integer format. To return hex format with this metadata contract implementation, one would need to implement something like a _uint2Hex2str() instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants