📦 Anatomy of a Transaction: Inputs & Outputs
Learn how transactions consume previous outputs and create new ones
Your Progress
0 / 5 completed🔍 Transaction Structure
Let's dissect an Ethereum transaction to understand every field and what it does. Click on each field to explore!
🎮 Interactive Transaction Explorer
Click on any field to see its purpose and example values:
📄 Raw Transaction Data
⚙️ Gas Calculation
Understanding Gas:
Gas is the "fuel" for executing transactions and smart contracts on Ethereum. Every operation costs gas.
Gas Limit (max units):21,000
Gas Price (Gwei per unit):50
Total Fee:0.00105 ETH
Calculation: 21,000 × 50 Gwei = 1,050,000 Gwei = 0.00105 ETH
📤
Simple Transfer
21,000 gas
🪙
Token Transfer
~50,000 gas
📜
Contract Deploy
~500,000+ gas
🔐 Transaction Signing Process
1
Prepare Transaction Data
Gather all fields: from, to, value, nonce, gas limit, gas price
2
RLP Encode
Serialize transaction into standardized binary format (RLP = Recursive Length Prefix)
3
Hash Transaction
Apply Keccak256 hash to RLP-encoded data
4
Sign with Private Key
Use ECDSA to create signature (v, r, s components)
5
Broadcast Signed Transaction
Send signed transaction to Ethereum network via RPC nodes
📊 Transaction Types Comparison
| Type | Purpose | Fields | Example |
|---|---|---|---|
| Type 0 | Legacy | nonce, gasPrice, gasLimit, to, value, data | Original Ethereum transactions |
| Type 1 | Access List | + accessList | Pre-declare storage access |
| Type 2 | EIP-1559 | + maxFeePerGas, maxPriorityFeePerGas | Dynamic fee market (current) |