Calldata is the input data carried by an Ethereum transaction or by a message call from one contract to another. When a transaction is sent to a smart contract, the calldata tells the contract which function to run and with which arguments. A plain transfer of ether between two accounts usually carries empty calldata, while a token transfer, a swap or a loan repayment carries a structured payload that the contract decodes.
The term belongs to the Ethereum Virtual Machine (EVM) and is used in the same way on the many EVM-compatible chains. Calldata is read-only: the receiving code can inspect it but cannot change it. It is stored as part of the transaction in the chain's history, not in the contract's long-term state, which is why it has been cheaper to use than storage and why it became the first place where rollups published their data.
How calldata is structured
Most calldata follows the rules of the contract Application Binary Interface (ABI). The first four bytes are the function selector, taken from the start of the Keccak-256 hash of the function's signature, such as transfer(address,uint256). A cryptographic hash function gives each signature a practically unique fingerprint, so the contract can match the selector to the right function.
The arguments follow, each padded to a 32-byte word. Fixed-size values such as addresses and integers sit in order; variable-length values such as strings and arrays are placed after the fixed part, with offsets pointing to them. Wallets and block explorers use the ABI to turn this hexadecimal string back into readable function names and values, which is how a user can see what a transaction will do before signing it.
In Solidity, calldata is also the name of a data location. Function parameters marked calldata are read directly from the input without being copied into memory, which saves gas for large arrays and strings.
Gas cost of calldata
Every byte of calldata is paid for in gas, on top of the base cost of the transaction. Since the Istanbul upgrade of December 2019, a zero byte costs 4 gas and a non-zero byte costs 16 gas. The calldata charge is therefore:
- is the gas charged for the input data.
- is the number of zero bytes.
- is the number of non-zero bytes.
A token transfer whose calldata is 68 bytes long, of which 38 are zero bytes (mostly padding) and 30 are non-zero, costs gas for its data. This is added to the 21,000 gas base charge for any transaction and to the cost of running the contract code. The total is then multiplied by the gas price to give the gas fee. The cheaper rate for zero bytes is one reason the ABI's padding does not make transactions as expensive as their raw length suggests.
Calldata and rollups
A rollup executes transactions away from Ethereum's main chain and posts compressed batches back to it, so that anyone can rebuild the rollup's state and challenge or verify it. Until 2024 the usual way to publish this batch data was as calldata in transactions to the rollup's contract. Both the optimistic rollup and the zero-knowledge rollup designs relied on it, and calldata made up most of the fees that users of a layer 2 network paid.
The Dencun upgrade of March 2024 introduced proto-danksharding (EIP-4844), which added a separate data type, the blob. Blobs are priced in their own fee market and are pruned by nodes after a limited period, which suits rollup data that only needs to be available for a while. Most large rollups moved their batches from calldata to blobs, and their fees fell sharply. Calldata remains available as a fallback when blob space is congested or more expensive.
Changes to calldata pricing
Because calldata is kept permanently in the history, large data-heavy blocks increase the storage and bandwidth burden on node operators. Proposals in the Ethereum Improvement Proposal (EIP) process have therefore adjusted its price over time. EIP-2028, part of Istanbul, lowered the non-zero byte cost from 68 gas to 16 gas to help early scaling solutions. EIP-7623, included in the Pectra upgrade of May 2025, moved in the other direction for one class of transactions: it set a higher floor price for calldata in transactions that mainly carry data and do little computation. Ordinary contract calls are largely unaffected, while using calldata as cheap bulk data storage became more expensive, pushing such use towards blobs.
Why calldata matters outside engineering
For finance and compliance readers, calldata is the field that shows what a transaction actually instructed a contract to do. Transaction monitoring tools, auditors and investigators decode it to identify token transfers, approvals and governance votes. It is also the place where some phishing attacks hide harmful approvals inside a transaction that looks routine, which is why wallets increasingly decode and display calldata before a user signs.
External links
Ref 1070001314