Book Image

Learn Ethereum

By : Xun (Brian) Wu, Zhihong Zou, Dongying Song
Book Image

Learn Ethereum

By: Xun (Brian) Wu, Zhihong Zou, Dongying Song

Overview of this book

Ethereum is a blockchain-based, decentralized computing platform that allows running smart contracts. This book provides a basic overview of how Ethereum works, its ecosystem, mining process, and the consensus mechanism. It also demonstrates a step-by-step approach for building decentralized applications. This book begins with the very basics of Blockchain technology. Then it dives deep into the Ethereum architecture, framework and tools in its ecosystem. It also provides you an overview of ongoing research on Ethereum, for example, Layer 1 and 2 scaling solution, Stablecoin, ICO/STO/IEO, etc. Next, it explains Solidity language in detail, and provides step-by-step instructions for designing, developing, testing, deploying, and monitoring decentralized applications. In addition, you’ll learn how to use Truffle, Remix, Infura, Metamask, and many other Ethereum technologies. It’ll also help you develop your own cryptocurrency by creating ERC20, and ERC721 smart contracts from scratch. Finally, we explain private blockchains, and you learn how to interact with smart contracts through wallets.
Table of Contents (19 chapters)
Free Chapter
1
Section 1: Blockchain and Ethereum Basics
5
Section 2: Blockchain Development Cycle
8
Section 3: Ethereum Implementations
12
Section 4: Production and Deployment
16
Section 5: Conclusion

Knowing about DApps

A DApp is an application that uses smart contracts to run. Smart contracts are deployed on an Ethereum Virtual Machine (EVM). It is similar to a client-server two-tier architecture, where there is no need for any middlemen to operate. A DApp can have a frontend (web) that makes calls to its backend (smart contract) through the web3.js API.

To interact with a blockchain smart contract, web3.js typically connects with a wallet—one of the most popular browser wallets is MetaMask. The wallet will connect with a backend blockchain node instance and send a request to the blockchain.

The following diagram shows a typical DApp architecture and the flow interactions between the frontend and backend:

In this chapter, we are going to follow the preceding diagram to build our decentralized digital art market DApp. A frontend tier on the client side will use React...