Book Image

Blockchain By Example

By : Bellaj Badr, Richard Horrocks, Xun (Brian) Wu
Book Image

Blockchain By Example

By: Bellaj Badr, Richard Horrocks, Xun (Brian) Wu

Overview of this book

The Blockchain is a revolution promising a new world without middlemen. Technically, it is an immutable and tamper-proof distributed ledger of all transactions across a peer-to-peer network. With this book, you will get to grips with the blockchain ecosystem to build real-world projects. This book will walk you through the process of building multiple blockchain projects with different complexity levels and hurdles. Each project will teach you just enough about the field's leading technologies, Bitcoin, Ethereum, Quorum, and Hyperledger in order to be productive from the outset. As you make your way through the chapters, you will cover the major challenges that are associated with blockchain ecosystems such as scalability, integration, and distributed file management. In the concluding chapters, you’ll learn to build blockchain projects for business, run your ICO, and even create your own cryptocurrency. Blockchain by Example also covers a range of projects such as Bitcoin payment systems, supply chains on Hyperledger, and developing a Tontine Bank Every is using Ethereum. By the end of this book, you will not only be able to tackle common issues in the blockchain ecosystem, but also design and build reliable and scalable distributed systems.
Table of Contents (13 chapters)

Creating a frontend website

Our contracts are deployed and ready, but currently, the only way to interact with them is through a console attached to a client, or using a third-party website that is able to read the contracts. This is all well and good for a developer, but for investors and members of the public, this is likely too much of a barrier to participation we need a simpler way for them to interact.

In the next part of our tutorial, we will create a simple, single-page website that will allow users to quickly and easily buy tokens in our token sale. The page we will be making is shown here:

The page contains the following:

  • Information about the name of the token and the current token price.
  • The user's current token balance.
  • The user's account address.
  • An input field and button to enter the amount of tokens to buy.
  • A progress bar indicating the progress...