6. Smart Contracts

The most important feature of the Ethereum blockchain is its ability to execute software code known as smart contracts. Now, we already have many distributed computing networks. Why do we need a blockchain to act as a distributed computer? The answer is decentralized and trusted autonomous execution. With the Ethereum blockchain, you do not need to trust anyone to correctly execute your code. Instead, a community of network participants (Ethereum miners) will all execute your smart contract code and reach a consensus that the results are correct.

In this chapter, I will first revisit the “Hello, World!” smart contract to illustrate how an Ethereum smart contract works under the hood. I will then provide a high-level overview ...

Get Building Blockchain Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.