04. ETH.BUILD: Smart Contracts
Overview
Section titled “Overview”So far a transaction has moved ETH from one account to another. A smart contract is what makes Ethereum more than a payment ledger: it is an account that holds code as well as a balance. When a transaction targets that account, the code runs. This is the concept the rest of the course is built on — every dApp, token, and DeFi protocol is just smart contracts being called by transactions.
Key concepts
Section titled “Key concepts”- Two kinds of account — an EOA (externally owned account) is controlled by a private key, the key pair from lesson 01. A contract account is controlled by its code; it has no private key and cannot start a transaction on its own.
- Code is deployed once, then called many times — you deploy a contract with a special
transaction (empty
to, code indata). It gets its own address. After that, anyone can call it by sending a transaction to that address. - A call is just a transaction — the
datafield encodes which function to run and its arguments (lesson 03). The contract executes deterministically: given the same state and input, every node computes the same result. - Contracts have storage — a contract can keep persistent data (balances, ownership, configuration) in its own state, which its functions read and modify.
- Deterministic and public — the code is visible onchain and runs the same for everyone. There is no hidden server logic; “the contract is the backend.”
- Immutable by default — once deployed, a contract’s code normally cannot be changed. Bugs ship permanently unless the contract was explicitly designed to be upgradeable. This is why testing and security review (Modules 2 and 4) matter so much.
Common pitfalls
Section titled “Common pitfalls”- Expecting a contract to “run in the background.” Contract code only executes when a transaction calls it — nothing runs on a timer by itself.
- Assuming you can patch a deployed contract like a web server. By default you cannot; the deployed bytecode is fixed.
- Blurring the two account types. EOAs sign and initiate; contracts hold code and only act when called.
Check yourself
Section titled “Check yourself”- What is the difference between an EOA and a contract account, and which one can start a transaction?
- How does a transaction tell a contract which function to run?
- Why is “immutable by default” both a safety feature and a risk?
Watch the Video
Section titled “Watch the Video”
ETH.BUILD: Smart Contracts
Video credit: Austin Griffith · Duration: 27 minutes
