What is Calldata?
Calldata is the read-only byte array sent with an Ethereum transaction that encodes function calls and parameters — the primary input mechanism for smart contract interactions.
WHY IT MATTERS
Every smart contract interaction sends calldata — the ABI-encoded function selector (first 4 bytes) followed by encoded parameters. When you call 'transfer(address, uint256)', the calldata contains the function signature hash plus the encoded address and amount.
Calldata is read-only and cheaper than storage. L2 rollups post transaction calldata to L1, making calldata efficiency critical for rollup costs. EIP-4844 (blob transactions) further reduces the cost of posting data to L1.
For developers, understanding calldata is important for gas optimization, debugging failed transactions, and building systems that parse and validate contract interactions.