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

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 At this moment, no data is set on DNSSEC Oracle nor ENS so they all show 0x0 .

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.

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, 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.

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.