4

Is there an easy GUI way to get the namehash of an ENS subdomain name? I know how to get the needed namehashes from Geth console using the ensutils script, or writing javascript that uses web3 & eth-ens-namehash. But is there a way for people to get the namehash without using command line, simply via browser. I see that MEW will produce the label & namehash for domains, but there is no way to search subdomains. Does Solidity have a namehash function? Or would I have to write my own, recursively calling the sha3 (or is it keccak-256)?? It was one solution so that users could just interact with the contract via MEW to get namehashes. Any other ways to get the namehash without using command line??

3 Answers 3

2

Found it at https://etherscan.io/enslookup This site will give the required hashes needed for sub-domain creation. And the blog http://blog.rudikovac.com/create-an-ens-eth-subdomain/ gives instructions on how to use MEW to create the sub-domains

2

Etherscan tool has a limitation, it always appends the .eth suffix. There is another online tool where you can calculate the namehash of any domain, not only .eth domains:

https://swolfeyes.github.io/ethereum-namehash-calculator/

5
0

You can generate the various hashes associated with an ENS domain using the ENS Hash Generator Tool at EthTools.com.

It will show you the labelhash, namehash, and token ID for any inputted domain/subdomain.

Disclaimer: I built EthTools.com

The official ENS documentation for how the Namehashing algorithm works can be found here.

First, a domain is divided into labels by splitting on periods (‘.’). So, ‘vitalik.wallet.eth’ becomes the list [‘vitalik’, ‘wallet’, ‘eth’]. The namehash function is then defined recursively as follows:

namehash([]) = 0x0000000000000000000000000000000000000000000000000000000000000000
namehash([label, …]) = keccak256(namehash(…), keccak256(label))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.