ERC-5298: ENS Trust to hold NFTs under ENS name
An interface for a smart contract acting as a "trust" that holds tokens by ENS name.
Abstract
This EIP standardizes an interface for smart contracts to hold of EIP-721 and EIP-1155 tokens on behalf of ENS domains.
Motivation
Currently, if someone wants to receive a token, they have to set up a wallet address. This EIP decouples NFT ownership from wallet addresses.
Specification
- Compliant contracts MUST implement
ERC721TokenReceiver
, as defined in EIP-721. - Compliant contracts implement the following interface:
-
claimTo
MUST check ifmsg.sender
is the owner of the ENS node identified bybytes32 ensNode
(and/or approved by the domain in implementation-specific ways). The compliant contract then MUST make a call to thesafeTransferFrom
function of EIP-721 or EIP-1155. -
Any
ensNode
is allowed.
Rationale
-
ENS was chosen because it is a well-established scoped ownership namespace. This is nonetheless compatible with other scoped ownership namespaces.
-
We didn't expose getters or setters for ensRoot because it is outside of the scope of this EIP.
Backwards Compatibility
No backward compatibility issues were found.
Test Cases
Reference Implementation
Security Considerations
Needs discussion.
Copyright
Copyright and related rights waived via CC0.