Book Image

Blockchain Quick Start Guide

By : Xun (Brian) Wu, Weimin Sun
Book Image

Blockchain Quick Start Guide

By: Xun (Brian) Wu, Weimin Sun

Overview of this book

Blockchain is a technology that powers the development of decentralized applications.This technology allows the construction of a network with no single control that enables participants to make contributions to and receive benefits from the network directly. This book will give you a thorough overview of blockchain and explain how a blockchain works.You will begin by going through various blockchain consensus mechanisms and cryptographic hash functions. You will then learn the fundamentals of programming in Solidity – the defacto language for developing decentralize, applications in Ethereum. After that, you will set up an Ethereum development environment and develop, package, build, and test campaign-decentralized applications.The book also shows you how to set up Hyperledger composer tools, analyze business scenarios, design business models, and write a chain code. Finally, you will get a glimpse of how blockchain is actually used in different real-world domains. By the end of this guide, you will be comfortable working with basic blockchain frameworks, and develop secure, decentralized applications in a hassle-free manner.
Table of Contents (14 chapters)
Title Page
Copyright and Credits
About Packt
Contributors
Preface
Index

Writing chaincode


Chaincode is similar to a smart contract. It defines and executes the business logic invoked by authorized participants in a specific network. A chaincode is written in Go or Node.js. In our example, we will use Go.

There are many IDEs and tools to support Golang. Here are some popular IDEs that work great with Golang.

Development tools

There are various tools that support Go development. Some popular IDEs are listed in the following sections.

LiteIDE 

LiteIDE is an open source Go IDE that was directly designed for Golang. There are a bunch of useful features available for Go developers, including a configurable code editor, customized build commands, many building options, and Golang support.

JetBrains Gogland

Gogland has a powerful built-in autocomplete engine, errors detection, code refactoring tools, and more.

Visual Studio Code

You can install Go extension in Visual Studio Code. It provides code hints and the ability to debug code.

In this chapter, we will use LiteIDE to develop...