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...