tony.rose@airwaze.io

A Smart Contract on Ethereum - Domain Registration

Blog Post created by tony.rose@airwaze.io on Jul 20, 2017

If you are curious to start learning how smart contracts work, this blog post takes you through the steps I've taken to register a domain name using a decentralized app (dApp) running on the Ethereum network.

 

You may want to register a .eth web domain name so that your site lives and breathes the Ethereum network.  In order to do this, you can install the Metamask chrome plugin.  This is an Ethereum wallet that plugs into your web browser and makes it possible to interact with Ethereum enabled websites (dApps), such as the one where you bid on .eth domain names.

 

Get Metamask here: MetaMask

 

It is important to note here that securing your Metamask wallet account is very important.  If you lose you password and pass-phrase, you will not be able to get back into your account and any funds in the account will be lost forever. This is one of the effects of using a de-centralized network, there is no central authority that holds your account and can help you recover a lost account, the account is a feature of the network and you are solely responsible for the security of your account!

 

With that said, after creating a wallet account in Metamask, you will need to put Ethereum into the newly created wallet. I already have a Coinbase account with some Ethereum in it, so it was very easy to scan the QR code on Metamask with my Coinbase app and send some money to the Metamask wallet.

 

If you don't have a Coinbase wallet you can sign up for one here: Buy/Sell Digital Currency - Coinbase

 

We strongly recommend that you use 2-factor authentication with your Coinbase account, and the most secure method is a validator app, such as Google Validator.

 

If you would like to send me some Ethereum, here is the QR code for my Metamask account!

 

Screen Shot 2017-07-16 at 12.15.59 PM.png

 

Now you should be all set up and have some Ethereum in your Metamask wallet.  Now to register a domain name on .eth, browse to the registration dApp.

 

http://registrar.ens.domains/

 

Registering domains is governed by a smart-contract.  This is how the decentralized Internet works that is very different from the traditional web.  The rules of registering a domain are governed by smart-contract code, and there is no central authority, business, or entity that holds the contract for the domain once you enter into the smart-contract.  It's explained really well on the registration dApp site, so read here for more details: http://registrar.ens.domains/

 

Once you have found a domain name that you want to register, you will need to place a bid, this is really exciting because this is probably your first time executing a smart-contract that is running on the Ethereum network and writing the transaction state to the Ethereum blockchain, when I did this the first time I thought it was really cool and a bit like reaching out and touching the future!  Here is what it will look like when you execute the transaction in Metamask.

 

Screen Shot 2017-07-16 at 1.20.34 PM.png

 

If you look closely at the Metamask plugin, you will see that a transaction record is kept for each of the transactions that you have made.

 

Screen Shot 2017-07-16 at 1.30.17 PM.png

 

Bly clicking on one of those transactions, it will take you to the details of that transaction on the blockchain.  For example, here is the link to my very first ever smart-contract when I registered my first ethereum domain tonyrose.eth.

 

https://etherscan.io/tx/0xba1d0a1d608d9da86ff0c258b81cebc52f18fa33dec336ba6edf958fe69409d9

 

 

Screen Shot 2017-07-16 at 1.32.56 PM.png

 

Feel free to browse to my transaction and leave me a note in the comments section!

 

Screen Shot 2017-07-16 at 1.32.35 PM.png

 

Ok, that is it for this blog post.  On my next post I am going to explore developing a simple web-site with a basic smart-contract running on it.  Stay tuned for more!

Outcomes