ERC-5409 ERC-1155 owner lookup extension (EIP-1155 Non-Fungible Token extension)
Stagnant · NFTs & multi-token · created 2022-07-23
Adds an ownerOf function to ERC-1155 tokens, making it possible to confirm whether a given token is a true NFT with a unique owner and to look up that owner directly on chain.
Why it is needed
ERC-1155 can handle fungible and non-fungible tokens together in a single contract, but it provides no standard way for outside parties to tell whether a particular token ID is a unique-owner token with a supply of 1. Determining the owner then requires relying on contract-specific lookup logic or pre-agreed split-id conventions, which are not part of the standard and can vary by implementation. Without a simple way to look up the owner, as with ERC-721's ownerOf, it becomes difficult to build new uses that link data to an owner or verify ownership.
What to implement
function ownerOf(uint256 tokenId) external view returns (address);: Returns the owner address of the given tokenId. Returns the zero address if the token does not exist or does not have a unique owner (i.e., its supply may be greater than 1).
In depth
Definition of the ownerOf function
This extension defines only a single function, ownerOf(uint256 tokenId), on the IERC1155OwnerOf interface. Its return type is address, and implementations may write this function as pure or view. This function allows the owner of a given token ID to be looked up directly on chain.
Two cases meant by the zero address
If ownerOf returns the zero address, it means either that the token does not exist, or that the token is not an NFT (its supply may be greater than 1) and so has no unique owner. The original text treats both cases identically as the zero address, without distinguishing between them.
Why the design avoids throwing an exception
Calling ownerOf on a nonexistent token in ERC-721 commonly reverts, but the original text notes that assuming every ERC-721 implementation actually behaves that way can be a security risk. So this extension specifies returning the zero address instead of reverting, which handles the case of a missing token or owner more simply and avoids compatibility problems with existing code written against ERC-721.
ERC-165 interface identifier
Calling the contract's supportsInterface(bytes4) function with 0x6352211e must return true. This lets other contracts or services check in advance, via the ERC-165 mechanism, whether a given ERC-1155 token contract supports this ownerOf extension.
Backward compatibility with ERC-1155
This extension is fully backward compatible with ERC-1155. Existing ERC-1155 functions such as balanceOf and safeTransferFrom remain unchanged, and ownerOf is added purely as an additional capability. It can also be used together with the existing convention of representing NFTs via split IDs.
A proposal still stalled
This ERC was proposed in July 2022 and has remained Stagnant since, with no further active discussion. The Security Considerations section also contains no concrete content, just 'Needs discussion,' meaning security review of the proposal has not been completed.