What is Ethereum Smart Contract? Examples & Explanations 101
AnythingWithWheels360
What is Ethereum Smart Contract? Let me show you how code in an Ethereum ETH smart contract is going to change the world. Can it be used for insurance? Legal matters? Gambling?
Here are some wild code examples to tell you what ethereum smart contracts are.
Ethereum was designed as a smart contract platform. The Ethereum Virtual Machine (EVM) is where smart contracts run in Ethereum. It provides a more expressive and complete language than bitcoin for scripting. In fact, it is a Turing Complete programming language.
EVM is a distributed global computer where all smart contracts are executed.
Given that smart contracts run in the EVM, there must be a mechanism to limit the resources used by each contract. Every single operation that is executed inside the EVM is actually simultaneously executed by every node in the network. This is why gas exists. An Ethereum transaction contract code can trigger data reads and writes, do expensive computations like using cryptographic primitives, make calls (send messages) to other contracts, etc. Each of these operations have a cost measured in gas, and each gas unit consumed by a transaction must be paid for in Ether, based on a gas/Ether price which changes dynamically. Price is deducted from the Ethereum account sending the transaction. Transactions also have a gas limit parameter that is an upper bound on how much gas the transaction can consume, and is used as a safe-guard against programming errors that could deplete an account’s funds. You can read more about gas here. ... https://www.youtube.com/watch?v=FzvV8tRl4p8
24527732 Bytes