Implementations for registrars and local resolvers for the Ethereum Classic Name Service.
For documentation of the original ENS system, see docs.ENS.domains.
-
ECNS will not burn funds. There is a special
burn
address at the Registrar that will receive funds at destroy of theDeed
instead of burning them. -
ECNS registry natively supports
namehash
algorithm. It is possible to callnamehash(string)
and get its nameHash without having to implement the algorithm by third parties. -
There is a function to extract stuck ERC20 tokens from each contract: Registry and Registrar.
-
rootNode is
.etc
Hash Registrar: 0x7564711a9c72edfb5ca10f2962066c707398121d
Registry: 0xb96836a066ef81ea038280c733f833f69c23efde
Public Resolver: 0x4fa1fc37a083abe4c53b6304f389042bc0566855
Reverse Registrar:0x9434e3f592f5d63de25dbd54af4bd58b822b6136
Hash Registrar: 0xb93d8610e5efae1c7f7bcb5c65cfb58c3346ed0d
Registry: 0xB6FedAA1c1a170eecb4d5C1984eA4023aEb91d64
Implementation of the ECNS Registry, the central contract used to look up resolvers and owners for domains.
Implementation of a simple first-in-first-served registrar, which issues (sub-)domains to the first account to request them.
Implementation of a registrar based on second-price blind auctions and funds held on deposit, with a renewal process that weights renewal costs according to the change in mean price of registering a domain. Largely untested!
Simple resolver implementation that allows the owner of any domain to configure how its name should resolve. One deployment of this contract allows any number of people to use it, by setting it as their resolver in the registry.
The ECNS registry is a single central contract that provides a mapping from domain names to owners and resolvers, as described in EIP 137.
The ECNS operates on 'nodes' instead of human-readable names; a human readable name is converted to a node using the namehash algorithm, which is as follows:
def namehash(name):
if name == '':
return '\0' * 32
else:
label, _, remainder = name.partition('.')
return sha3(namehash(remainder) + sha3(label))
The registry's interface is as follows:
Returns the owner of the specified node.
Returns the resolver for the specified node.
Updates the owner of a node. Only the current owner may call this function.
Updates the owner of a subnode. For instance, the owner of "foo.com" may change the owner of "bar.foo.com" by calling setSubnodeOwner(namehash("foo.com"), sha3("bar"), newowner)
. Only callable by the owner of node
.
Sets the resolver address for the specified node.
Resolvers must implement one mandatory method, has
, and may implement any number of other resource-type specific methods. Resolvers must throw
when an unimplemented method is called.
Returns true if the specified node has the specified record kind available. Record kinds are defined by each resolver type and standardised in EIPs; currently only "addr" is supported.
has()
must return false if the corresponding record type specific methods will throw if called.
Implements the addr resource type. Returns the Ethereum address associated with a node if it exists, or throw
s if it does not.