Book Image

Ethereum Cookbook

By : Manoj P R
Book Image

Ethereum Cookbook

By: Manoj P R

Overview of this book

Ethereum and Blockchain will change the way software is built for business transactions. Most industries have been looking to leverage these new technologies to gain efficiencies and create new business models and opportunities. The Ethereum Cookbook covers various solutions such as setting up Ethereum, writing smart contracts, and creating tokens, among others. You’ll learn about the security vulnerabilities, along with other protocols of Ethereum. Once you have understood the basics, you’ll move on to exploring various design decisions and tips to make your application scalable and secure. In addition to this, you’ll work with various Ethereum packages such as Truffle, Web3, and Ganache. By the end of this book, you’ll have comprehensively grasped the Ethereum principles and ecosystem.
Table of Contents (13 chapters)

Introduction

Smart contracts enable you to solve common problems in a way that maximizes trust. The purpose of contracts is to reduce ambiguity and inclination so that a predictable set of outcomes is produced, and these outcomes can be depended upon. In Ethereum, you can write smart contracts with the built-in Turing complete programming language (solidity). The language can create its own arbitrary rules for ownership, transaction formats, and state transition functions. Smart contracts in Ethereum are written in solidity and targeted to run on the Ethereum Virtual Machine (EVM). To actually execute smart contract code, someone has to send enough Ether as a transaction fee. The fee is calculated based on the computing resources required. This pays the miner nodes for participating and providing their computing power.

This chapter covers all the essentials of writing a smart...