An Introduction to Ethereum
Ethereum is a blockchain that stores and runs programs called smart contracts. A blockchain is.
What you will learn
- Where an introduction to ethereum fits into an Ethereum application.
- Which assumptions should be tested before a mainnet deployment.
- What to read next when this concept is working.
Ethereum is a blockchain that stores and runs programs called smart contracts.
Place these Ethereum concepts beside Bitcoin's UTXO model, proof of work, fixed issuance, and narrower execution rules.
For a fixed-precision contrast with wei and ether, use the exact BTC and satoshi denomination calculator.
A blockchain is a public network of decentralized nodes that process transactions and append them to an ever-growing ledger. Ethereum is not the only blockchain (Bitcoin, Stellar, Tezos…) but it is definitely the most popular blockchain used by most developers and companies.
To make it more easy to explain things in all of our articles, we’ll name people as Alice, Bob, Charlie to describe actions made by different people.
For display-value checks, compare the application output with the ETH-to-USD informational converter, then account separately for fees and slippage.
As in most blockchains, every block contains a list of transactions. In Ethereum they are two kinds of transactions between accounts:
- Simple transactions: A transaction from Alice to BoB account containing a value in Ether.
- Smart contract calls: A transaction from Alice to a smart contract that will trigger code execution.
As they are two type of transactions, they are also two types of accounts:
- Accounts: Similar to other blockchain an account is used to store the blockchain native token and send transactions to other accounts or smart contracts.
- Smart contracts: On Ethereum, the smart contracts can’t send transactions themselfs but contains code that can be triggered when a normal account send a transaction to it. A smart contract has also a balance and can have Ether tokens.
Turn the example into production evidence
A working demo is the beginning of verification, not the end. Add tests for failure paths, inspect every permission, and record the chain, contract address, compiler, and dependency versions used for the deployment.
Check behavior
Test expected inputs, boundary values, reverts, events, and calls made to other contracts.
Check operations
Plan key storage, monitoring, pause or upgrade authority, and a response if an assumption stops being true.