Cryptocurrency All-in-One For Dummies
by Kiana Danial, Tiana Laurence, Peter Kent, Tyler Bain, Michael G. Solomon
Chapter 6
Discovering Smart Contracts
IN THIS CHAPTER
Describing supply chain and its challenges
Exploring a blockchain solution to supply chain problems
Handling data and computation in Solidity
Coding to limit gas cost
Controlling execution flow and responding to errors
Smart contracts are the functional part of any blockchain solution. Just like the objects described in Chapter 5 of this minibook, a blockchain solution is a combination of data and actions on that data. The data is the content of the blocks on the blockchain. You already know that after data is added, it stays there forever. (Although you could technically change blockchain data, doing so without any other node detecting your change is next to impossible.) Because blockchain data is immutable, it is important to carefully control how that data is added.
The actions that operate on the blockchain data are the smart contracts. Smart contracts, like the data, are stored in blocks on the blockchain. But smart contracts ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access