Ethereum: Developer’s Guide

Amol Saini
Blockchain Research Lab
4 min readMay 28, 2020

Starting with Bitcoin in 2009, the investors gained an eye over the cryptocurrency. Back then, you could buy one of the new digital tokens for less than $0.01. Prices steadily rose until peaking above $20,000 per coin in late 2017. But blockchain technology was not limited to cryptocurrency only. Proven the fact in 2017, significant innovations such as smart contracts in Ethereum have opened up broader applications for blockchain technology. Ethereum was developed by Vitalik Buterin at the age of 23.

Smart Contract

Long gone the age of traditional Contract with involves lot of paper work. Now comes the age of Smart contracts.

Smart contracts add a layer of logic and computation to the trust infrastructure supported by the Blockchain. Smart contracts allow for execution of code, enhancing the basic value transfer capability of the Bitcoin Blockchain.

How to implement Smart Contract?

Smart Contract life Cycle

The Smart Contract has to be designed first before implemented. A robust business logic requires a robust architecture. Once the design is final then solidity programming language can be used to Implement the design. Solidity is the high level programming language code for writing smart contracts that run on EVM. Ethereum Virtual Machine (EVM) is a special structure where code is deployed after being translated into byte-code.

Remix IDE which is available online at https://remix.ethereum.org is the most widely used IDE for implementing and testing a smart contract.

How to identify smart contracts or wallet over Ethereum.?

Accounts are basic units of Ethereum protocol. These are of two type :-

  1. External Owned Accounts (EOA)
  2. Smart Contract Accounts.

An Ethereum transaction includes not only fields for transfer of Ethers but also for messages for invoking smart contracts. Externally Owned Accounts, or EOA, are controlled by private keys. Contract Accounts, or CA, are controlled by code and can be activated only by an EOA.

How to create our own private Ethereum node?

In order to communicate with the blockchain, we must use a blockchain client. The client is a piece of software capable of establishing a p2p communication channel with other clients, signing and broadcasting transactions, mining, deploying and interacting with smart contracts, etc. The client is often referred to as a node. The most common ethereum client is the geth.

Geth can be used to create a node which can be exposed over an Application PORT over a machine.

How to interact with Ethereum Network?

There are various Ethereum Network to interact with some of them is as follows :-

After a network of nodes is established, the Web3.js library can be used to interact with the network to invoke a transaction which may involve the transfer of ether or calling of smart contract. One can call it manually with curl or wget.

What a block contains in Ethereum and How it is added to the network?

Diagram of Block for Ethereum

An Ethereum block contains the usual prev block hash, nonce, transaction details, but also details about gas (fee) limits, the state of the smart contracts and runner-up headers. Transaction Validation involves checking the timestamp and nonce combination to be valid, and the availability of sufficient fees for execution. Well-defined processes for handling exceptions improve trust in the blockchain. Any transaction in Ethereum, including transfer of Ethers, requires fees or gas points to be specified in the transaction. Gas Points are used to specify the fees instead of Ether for ease of comparison using standard values. Miners are paid fees for security, validation, execution of smart contracts as well as for creation of blocks.

How to develop a decentralized application on Ethereum?

After network establishment and testing of the network, then comes the part of creating user-friendly decentralized applications. This can be done with the help of truffle IDE which provides means to compile and unit test smart contracts locally. It also facilitates users to deploy smart contracts over a test network which has several accounts to interact with the smart contract. With a simplified deployment solution provided by Truffle, the developer can focus on the web client app that would ease the invocation for the end user.

Some Popular Dapps which runs private Ethereum nodes

  1. Augur : A online betting platform
  2. Grid+: Smart Energy distribution platform.

Conclusion

In this short introduction we covered the Ethereum Basics, Geth, Truffle, Smart Contract, Accounts.You are now familiar with the Ethereum platform to kick start your Dapp development . In future articles, we’ll cover all the topics in detail.

--

--