Smart contract
A smart contract is a different kind of program that’s designed to solve the problems we encountered earlier. While in Bitcoin we store transactions, such as you sending 1 BTC to your grandma, in Ethereum, we store transactions – for example, you can change the value of a variable from 5 to 9. In Bitcoin, transactions are very narrow – they are financial. But in Ethereum, transactions are changes in the states of programs. This sounds abstract. So, let’s jump into creating a program on top of Ethereum or a smart contract.
Think of a smart contract as a program or an application that lives on the blockchain. This program is in the form of a stack-based bytecode. When you interact with the smart contract, you send an instruction to the bytecode. Then, the Ethereum virtual machine will pop and push values from the bytecode and operate on the instruction according to the values from the bytecode. So, your entire program lives on the blockchain...