AlertSourceDiscuss
Skip to content

ERC-5409: EIP-1155 Non-Fungible Token extension

Allow EIP-1155 to represent Non-Fungible Tokens (tokens who have a unique owner)

🚧 StagnantERC

Stagnant

This EIP has had no recent activity for at least 6 months, and has automatically been marked as stagnant. This EIP should not be used in production.

If you are interested in helping move this EIP to final, create a PR to move this EIP back to Draft and add yourself as an author, and an EIP editor will help guide you through the process. Thank you!

AuthorsRonan Sandford (@wighawag)
Created2022-07-23

Abstract ​

This standard is an extension of EIP-1155. It proposes an additional function, ownerOf, which allows EIP-1155 tokens to support Non-Fungibility (unique owners). By implementing this extra function, EIP-1155 tokens can benefit from EIP-721's core functionality without implementing the (less efficient) EIP-721 specification in the same contract.

Motivation ​

Currently, EIP-1155 does not allow an external caller to detect whether a token is truly unique (can have only one owner) or fungible. This is because EIP-1155 do not expose a mechanism to detect whether a token will have its supply remain to be "1". Furthermore, it does not let an external caller retrieve the owner directly on-chain.

The EIP-1155 specification does mention the use of split id to represent non-fungible tokens, but this requires a pre-established convention that is not part of the standard, and is not as simple as EIP-721's ownerOf.

The ability to get the owner of a token enables novel use-cases, including the ability for the owner to associate data with it.

Specification ​

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY" and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Contract Interface ​

solidity
interface IERC1155OwnerOf {

    /// @notice Find the owner of an NFT
    /// @dev The zero address indicates that there is no owner: either the token does not exist or it is not an NFT (supply potentially bigger than 1)
    /// @param tokenId The identifier for an NFT
    /// @return The address of the owner of the NFT
    function ownerOf(uint256 tokenId) external view returns (address);
}

The ownerOf(uint256 tokenId) function MAY be implemented as pure or view.

The supportsInterface method MUST return true when called with 0x6352211e.

Rationale ​

ownerOf does not throw when a token does not exist (or does not have an owner). This simplifies the handling of such a case. Since it would be a security risk to assume all EIP-721 implementation would throw, it should not break compatibility with contract handling EIP-721 when dealing with this EIP-1155 extension.

Backwards Compatibility ​

This EIP is fully backward compatible with EIP-1155.

Security Considerations ​

Needs discussion.

Copyright and related rights waived via CC0.

Citation

Please cite this document as:

Ronan Sandford, "ERC-5409: EIP-1155 Non-Fungible Token extension[DRAFT]," Ethereum Improvement Proposals, no. 5409, 2022. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-5409.