Polkadot Wiki

Polkadot Wiki

  • Get Started
  • Learn
  • Build
  • Maintain
  • Kusama
  • Contribute
  • Languages iconEnglish
    • Русский
    • 中文
    • Help Translate

›General

General

  • Getting Started
  • Claims
  • Redenomination of DOT
  • Grants
  • Thousand Validators Programme
  • Polkadot Ambassador Programme
  • Research Pages
  • Community
  • Contributing
  • Contributors
  • Glossary
  • Using ENS with DOT/KSM accounts
  • Ledger Application
  • How to Protect Yourself from Scams
  • Frequently Asked Questions (FAQs)

Learn

  • Polkadot Launch Phases
  • Basics

    • Architecture
    • Polkadot Accounts
    • Account Generation
    • Backing up and Restoring Accounts
    • DOT
    • Security of the network
    • Polkadot Consensus
    • Nominator
    • Validator
    • Collator
    • Governance
    • Identity
    • How to transfer Balances
    • Transaction Fees
    • Polkadot Host (PH)
    • Treasury
    • How to use W3F Registrar

    Parachains

    • Parachains
    • Parathreads
    • Bridges
    • Parachain Slots Auction
    • Parachain Crowdloans

    Advanced

    • Staking
    • Proxy Accounts
    • Availability and Validity
    • Randomness
    • Cross-chain Message Passing (XCMP)
    • SPREE
    • WebAssembly (Wasm)
    • Sequential Phragmén Method
    • Simple Payouts

    Cryptography

    • Cryptography Explainer
    • Polkadot Keys

    Polkadot Comparisons

    • Comparing Polkadot and Kusama
    • Ethereum 2.0
    • Cosmos
    • Dfinity
    • Other comparisons

Build

  • Builder's Portal
  • Development Guide

    • Polkadot Builders Starter's Guide
    • Parachain Development Kits (PDKs)
    • Parachain Implementer's Guide
    • Cumulus
    • Building Parachains on Rococo
    • Smart Contracts
    • Oracles
    • Polkadot Wallets

    Integration Guide

    • Integration Initiation
    • Polkadot Protocol
    • Node Management
    • Node Interaction
    • Transaction Construction

    Tools

    • Tool Index

    Resources

    • Hackathon

Maintain

  • Network Maintainers
  • Parameters
  • Nodes and Dapps

    • Set up a Full Node
    • Networks
    • Set up Secure WebSocket for Remote Connections
    • Resolving Errors

    Nominator Guides

    • How to Nominate on Polkadot
    • Unbonding and Rebonding

    Validator Guides

    • How to run a Validator on Polkadot
    • Validator Payout Overview
    • Using systemd for the Validator Node
    • Secure Validator
    • How to use Polkadot Secure Validator Setup
    • Set Up a Sentry Node
    • How to Upgrade Your Validator
    • Monitor your node
    • How to Chill

    Governance Guides

    • Participate in Democracy
    • Join the Council
    • Voting for Councillors
Edit

Adding accounts to an ENS domain

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.

bruno.eth domain name in the ENS application

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.

The plus icon in the records tab

Then, pick "Other Addresses", "KSM", and input the Kusama address:

Inputs needed to register a KSM 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:

KSM address now visible in bruno.eth records

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 bruno.eth domain.

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.

The domain's resolver is highlighted on the ENS app 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: https://etherscan.io/address/0x4976fb03c32e5b8cfe2b6ccb31c09ba78ebaba41#writeContract

There should be an option to "Connect to Web3" which, when clicked, will ask your active wallet for permission to connect.

Connect to Web3 option

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.

Connected to Web3

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 into coinType. 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.

Filled out information in the contract's write interface

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.

Wallet Support

There is no wallet support for ENS names for either KSM or DOT at this time.

Relevant links

  • ENS docs
  • ENS Multi-chain announcement
  • Address encoder
  • Namehash calculator
  • Address to pubkey converter
Last updated on 9/22/2020 by Bruno Škvorc
← GlossaryLedger Application →
  • Adding via the UI
  • Adding via the Resolver
    • Wallet Support
    • Relevant links
General
  • About
  • FAQ
  • Contact
  • Build
  • Grants and Bounties
  • Carrers
Technology
  • Technology
  • Token
  • Telemetry
  • Substrate
  • Whitepaper
  • Lightpaper
Community
  • Community
  • Documentation
  • Brand Assets
  • Blog
  • Element Chat
  • Medium

Subscribe to the newsletter to hear about Polkadot updates and events.

Polkadot Network
  • © 2021 Web3 Foundation
  • Impressum
  • Disclaimer
  • Privacy
  • Cookie Settings
  • Testnet disclaimer