What are smart contracts? Everybody bears an expression trying to understand the meaning of contracts and the significance of the word "smart" in reference to contracts. Smart contracts are, essentially, code segments or programs that are deployed and executed in EVM. A contract is a term generally used in the legal world and has little relevance in the programming world. Writing a smart contract in Solidity does not mean writing a legal contract. Moreover, contracts are like any other programming code, containing Solidity code, and are executed when someone invokes them. There is inherently nothing smart about it. A smart contract is a blockchain term; it is a piece of jargon used to refer to programming logic and code that executes within EVM.
A smart contract is very similar to a C++, Java, or C# class. Just as a class is composed of state (variables...