ENS (Ethereum Name Service) is a system of smart contracts on the Ethereum blockchain which allows
users to claim domain names like
bruno.eth. Supporting wallets can then allow senders to input ENS
domains instead of long and unwieldy addresses. This prevents phishing, fraud, typos, and adds a
layer of usability on top of the regular wallet user experience.
Note: You will need an ENS name and an Ethereum account with some ether in it to follow along with this guide. To register an ENS name, visit the ENS App or any number of subdomain registrars like Nameth. Note that if you're using an older ENS name, you should make sure you're using the new resolver. Visiting the ENS App will warn you about this if not. You will also need some way to use your Ethereum address - following this guide on a personal computer is recommended. Wallets like Frame and Metamask are safe and will make interacting with the Ethereum blockchain through your browser very easy.
Despite living on the Ethereum blockchain, the ENS system has multi-chain support. In this guide you'll go through the process of adding a KSM and DOT address to ENS. We cover both KSM and DOT to show two different approaches.
Note: DOT can currently only be added using the Resolver method. KSM can be added through both methods described below.
This guide is also available in video format on Youtube.
Adding via the UI
The ENS App allows an ENS domain owner to inspect all records bound to the domain, and to add new ones.
In the example above, the domain
bruno.eth has an Ethereum and a Bitcoin address attached. Let's
attach a KSM account. First, click the
[+] icon in the Records tab.
Then, pick "Other Addresses", "KSM", and input the Kusama address:
After clicking Save, your Ethereum wallet will ask you to confirm a transaction. Once processed, the record will show up on the domain's page:
Adding via the Resolver
DOT has only recently been added to ENS, so it's not available in the UI yet. Let's go through an
alternative method of registering a DOT address on the
First, you need to find out which resolver we have set on the domain. This should be Public Resolver 2, but you can double check on the domain's ENS page.
Next, you need to go to the
resolver contract's Write Contract interface on Etherscan
by clicking on "Contract -> Write Contract", or appending
#writeContract to the resolver's URL
in Etherscan, like so:
There should be an option to "Connect to Web3" which, when clicked, will ask your active wallet for permission to connect.
Allow this. If for some reason the option "Connect to Web3" does not automatically switch to "Connected - Web3 [YOUR_ADDRESS]", refresh the page and try again.
Scroll down to
setAddr. There will be three input fields on this function:
node is the
namehash of your
domain. You can get it by entering your domain into
this tool. Cointype is the ID of the
supported coin, as specified in the address-encoder
library which wallets can use to integrate ENS. The file to look for is
src/index.ts - scroll to
the bottom and notice DOT and KSM. The coin ID of KSM is 434, while DOT is 354, so we enter this
a is the address to bind to this value, in public key format. To turn your
address into a public key, use this tool and
enter your address into the
AccountId to Hex left field, then copy the output of the right field.
Clicking "Write" will initiate a transaction. Note that Etherescan's UI is in beta and might throw a "GasLimit" error. If this happens, modify the gas limit in your wallet to 80,000. You can leave the gas fee as is - any wallet you use will usually be good at estimating the required fee.
Once the transaction is confirmed, your DOT address will be bound to your ENS domain. Because the ENS App UI is currently missing support for DOT, this entry will not be visible. However, should a wallet decide to implement ENS before the official ENS App does, the resolving will work just fine.
There is no wallet support for ENS names for either KSM or DOT at this time.