I know that an ethereum wallet address can have a ENS (Ethereum Name Service) name, but it is possible for a contract? So instead of giving the contract address is it possible to give the contract's ENS name?
2 Answers
Yes a contract can have an ENS address.
A well known example is the Ethereum Foundation donation contract, which you can look up with ethereumfoundation.eth
. You can see it at: https://etherscan.io/enslookup-search?search=ethereumfoundation.eth
The ENS Ethereum Address for this name is 0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359 Also accessible at ethereumfoundation.eth
-
2Promoting a token or ICO is gauche. I replaced it with a fairly neutral example of the Ethereum Foundation donation contract.– carverDec 19, 2017 at 17:13
From ENS documentation. Architecture.
ENS has two principal components: the registry, and resolvers.
The ENS registry consists of a single central contract that maintains a list of all domains and subdomains, and stores three critical pieces of information about each:
The owner of the domain
The resolver for the domain
The time-to-live for all records under the domain
The owner of a domain may be either an external account (a user) or a smart contract. A registrar is simply a smart contract that owns a domain, and issues subdomains of that domain to users that follow some set of rules defined in the contract.