Skip to content

Commit

Permalink
Update EIP-1046: Fix some issues
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
Pandapip1 committed Oct 18, 2023
1 parent 6c7c46e commit ab2383a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions EIPS/eip-1046.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,12 @@ interface ERC721TokenMetadataInterop extends ERC721TokenMetadata {
pragma solidity ^0.8.0;
/// @title ERC-1155 Metadata URI Interoperability Extension
interface ERC1155TokenMetadataInterop /* is ERC1155Metadata */ {
/// @notice Gets an ERC-1046-compliant ERC-1155 token URI
/// @dev The resolved data MUST be in JSON format and support ERC-1046's Extension to the ERC-1155 Token Metadata Schema
/// This MUST be the same uri as the `uri()` function
function tokenURI() external view returns (string);
interface ERC1155TokenMetadataInterop /* is ERC1155 */ {
/// @notice Gets an ERC-1046-compliant ERC-1155 token URI
/// @param tokenId The token ID to get the URI of
/// @dev The resolved data MUST be in JSON format and support ERC-1046's Extension to the ERC-1155 Token Metadata Schema
/// This MUST be the same URI as the `uri(tokenId)` function, if present.
function tokenURI(uint256 tokenId) external view returns (string);
}
```

Expand All @@ -196,7 +197,7 @@ interface ERC1155TokenMetadataInterop extends ERC1155TokenMetadata {

### Miscellaneous Recommendations

To save gas, it is RECOMMENDED for compliant contracts not to implement the optional `name()`, `symbol()`, or `decimals()` functions, and instead to only include them in the metadata URI. Additionally, if the decimals is `18`, then it is NOT RECOMMENDED to include the `decimals` field in the metadata.
To save gas, it is RECOMMENDED for compliant contracts not to implement the `name()`, `symbol()`, or `decimals()` functions, and instead to only include them in the metadata URI. Additionally, for ERC-20 tokens, if the decimals is `18`, then it is NOT RECOMMENDED to include the `decimals` field in the metadata.

## Rationale

Expand Down

0 comments on commit ab2383a

Please sign in to comment.