makoto
makoto

2 min read - Posted 30 Oct 18

Claiming your DNS on ENS via Web (2/3: The Demo)


    1. The Theory
    1. The Demo

    1. The Code Previously In the first blog post, I talked about the theory behind how DNSSEC can prove that a certain Ethereum address belongs to a domain and how ENS can use the mechanism by submitting the proof into DNSSEC Oracle smart contract. In this blog post, I will show you how the actual process works on the web.
      1. The Demo
      I have been working for the past few months making it easier to retrieve the proof from DNS and submit into the DNSSEC Oracle smart contract, and this video shows the first attempt where you can do the whole process online.

Let’s dissect the demo video screenshot by screenshot.

Step 1: Type domain name and press “Lookup”.

This will show you the ETH address set under _ens.domain.xyz At this moment, no data is set on DNSSEC Oracle nor ENS so they all show 0x0 .

article image

Step 2: Submit the proof

Clicking the button will prompt to send two transactions, one to claim the proofs for each record on DNSSEC Oracle smart contract, and another one to set ownership of the domain on the ENS contract.

article image

If you look at the transactions, you can see that the first transaction is over 1.2 million gas which is quite expensive. But hold your horses! It’s likely you’ll pay a lot less in practice.

## claim()
Transaction: 0x554a91b048ee837d000b88cc73dbacccbad0bc27ee555b4e29a1af9422478a32
Gas usage: 1252768 <= *1.2 M !
## setSubNodeOwner()
Transaction: 0xc08125d6ea9c11f866458eac335defee436f4ac72fdc3d07f59197017d2f14ad
Gas usage: 83849
Step 3: Setting another domain record

Now let’s try to set another record, ethlab.xyz. What you notice is that the first half of the proofs are already set because the proof of .xyz is already set in a previous transaction.

article image

So if you press “Submit the proof”, this time the cost of the first transaction to put the proof in DNSSEC Oracle is a lot lower.

## claim()
Transaction: 0xfd091eeb5bd81ddf01ef62b784f9ed651b333ef22938438a93f189b307ee404a
Gas usage: 373156 <= *373K !
## setSubNodeOwner()
Transaction: 0x003d32cd1c2a57ca2f1252735d4e2e25d565fb56249c8fc5e8ac9a1a4793819a
Gas usage: 84822

In reality, the majority of people will be paying this amount of gas. Summary In this blog post, I showed you the demo app which allows you to claim DNS on ENS. I also explained that transaction cost becomes lower if part of the proof has already been submitted. In the next blog post, I will show you how the demo code make use of a series of ENS libraries.

Created with Sketch.Content is"CC-BY-SA 4.0" licensed
Article On-chain
Article Author
0 Comments
Related Articles
Claiming your DNS on ENS via Web (3/3: The code)

The Theory The Demo 3. The Code Previously In the second blog post, I showed you how the demo web app works. In this final blog post, I will explain how this demo code was built by assembling the multiple ENS related libraries. NOTE: The library API are evolving and it will more likely become out of date fairly quickly 3. The code Before diving into the code, let me quickly explain various components which this demo code uses. ENS = The main smart contract repository which contains various smart

makoto
Makoto Inoue

30 Oct 18

Step by step guide “Claim your DNS domain on ENS”

This is a note I took while setting up matoken.xyz ENS address using NameCheap and Google Cloud DNS. Before continuing this blog post, make sure you read the original post by Nick Johnson Nick’s blog post is fairly concise and well written for people who have good understanding of how to administer DNS. If you are not so familiar with administering DNS like me, then this step by step guide with plenty of screenshots may help. (Warning: readers are expected to know how to work with command line t

makoto
Makoto Inoue

30 Oct 18