Ethereum Development with Go

This little guide book is to serve as a general help guide for anyone wanting to develop Ethereum applications using the Go programming language. It's meant to provide a starting point if you're already pretty familiar with Ethereum and Go but don't know where to to start on bringing it all together. You'll learn how to interact with smart contracts and perform general blockchain tasks and queries using Golang.

This book is composed of many examples that I wish I had encountered before when I first started doing Ethereum development with Go. This book will walk you through most things that you should be aware of in order for you to be a productive Ethereum developer using Go.

Ethereum is quickly evolving and things may go out of date sooner than anticipated. I strongly suggest opening an issue or making a pull request if you observe things that can be improved. This book is completely open and free and available on github.

Online

https://goethereumbook.org

E-book

The e-book is avaiable in different formats.

Introduction

Ethereum is an open-source, public, blockchain-based distributed computing platform and operating system featuring smart contract (scripting) functionality. It supports a modified version of Nakamoto consensus via transaction based state transitions.

-Wikipedia

Ethereum is a blockchain that allows developers to create applications that can be ran completely decentralized, meaning that no single entity can take it down or modify it. Each application deployed to Ethereum is executed by every single full client on the Ethereum network.

Solidity

Solidity is a Turing complete programming language for writing smart contracts. Solidity gets compiled to bytecode which is what the Ethereum virtual machine executes.

go-ethereum

In this book we'll be using the go-ethereum, the official Ethereum implementation in Go, to interact with the blockchain. Go-ethereum, also known as geth for short, is the most popular Ethereum client and because it's in Go, it provides everything we'll ever need for reading and writing to the blockchain when developing applications using Golang.

The examples in this book were tested with go-ethereum version 1.8.10-stable and Go version go1.10.2.

Block Explorers

Etherscan is a website for exploring and drilling down on data that lives on the blockchain. These type of websites are known as Block Explorers because they allow you to explore the contents of blocks (which contain transactions). Blocks are fundamental components of the blockchain. The block contains the data of all the transactions that have been mined within the allocated block time. The block explorer also allows you to view events that were emitted during the execution of the smart contract as well as things such as how much was paid for the gas and amount of ether was transacted, etc.

Swarm and Whisper

We'll also be diving a little bit into Swarm and Whisper, a file storage protocol, and a peer-to-peer messaging protocol respectively, which are the other two pillars required for achieving completely decentralized and distributed applications.

image credit

Support

Join the #ethereum channel on the gophers slack for Go (golang) help.

About the Author

This book was written by Miguel Mota, a software developer working in the blockchain space from the always sunny Southern California. You can find him on Twitter @miguelmotah


Enough with the introduction, let's get started!

results matching ""

    No results matching ""