HomeEIPs
EIPsERC-5409
ERC-5409

EIP-1155 Non-Fungible Token extension

Allow EIP-1155 to represent Non-Fungible Tokens (tokens who have a unique owner)
StagnantStandards Track: ERC
Created: 2022-07-23
Requires: EIP-165, EIP-721, EIP-1155
Ronan Sandford (@wighawag)
DiscussionsOriginal linkEdit
1 min read
Anyone may contribute to propose contents.
Go propose
Video
Anyone may contribute to propose contents.
Go propose
Original

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

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.

Further reading
Anyone may contribute to propose contents.
Go propose
Adopted by projects
Anyone may contribute to propose contents.
Go propose

Not miss a beat of EIPs' update?

Subscribe EIPs Fun to receive the latest updates of EIPs Good for Buidlers to follow up.

View all
Serve Ethereum Builders, Scale the Community.
Resources
GitHub
Supported by