03. ETH.BUILD: Transactions
Overview
Section titled “Overview”A blockchain is a history of state changes — and a transaction is the only way that state ever changes. Nothing happens on Ethereum without a signed transaction from an account: every ETH transfer, every contract call, every NFT mint is one. Learn the fields of a transaction and you can read almost anything a block explorer shows you.
Key concepts
Section titled “Key concepts”A transaction is a signed message with a small, fixed set of fields:
- From (sender) — the account that signs and pays. It is not a field you set directly; it is recovered from the signature, which is why a valid signature is what authorizes the transaction.
- To (recipient) — the destination address. If it is a normal account, this is a
payment; if it is a contract, this call runs the contract’s code. A transaction with an
empty
tofield is how a new contract gets deployed. - Value — the amount of ETH to send, denominated in wei (1 ETH = 10¹⁸ wei).
- Data (calldata) — optional payload. For a plain transfer it is empty; for a contract call it encodes which function to run and with what arguments.
- Nonce — a per-account counter, starting at 0, that increments with each transaction the account sends. It fixes the order of your own transactions and prevents the same signed transaction from being replayed twice.
- Gas fields — a gas limit and fee settings that cap and price the work (covered in lesson 05).
- Signature — produced by the sender’s private key; it both authorizes the transaction
and lets the network derive the
fromaddress.
The lifecycle: you sign a transaction locally → broadcast it to the network → it waits in the mempool of pending transactions → a block producer includes it in a block → it executes and updates state.
Common pitfalls
Section titled “Common pitfalls”- Thinking
fromis something you type in. It is derived from the signature — you prove who you are by signing, not by asserting an address. - Ignoring the nonce. A gap in nonces (e.g. nonce 5 sent while 4 is still pending) stalls the later transaction until the gap is filled; a reused nonce lets you replace a pending transaction.
- Assuming an empty
datafield means “nothing happened.” A contract call carries its entire meaning indata; that is where the function and arguments live.
Check yourself
Section titled “Check yourself”- Which field distinguishes a plain ETH transfer from a contract function call?
- Where does the
fromaddress come from if it is not an input field? - What does the nonce prevent, and what breaks if you skip a number?
Watch the Video
Section titled “Watch the Video”
ETH.BUILD: Transactions
Video credit: Austin Griffith · Duration: 15 minutes
