0xcalldata

Calldata, from bytes to meaning

Learn Ethereum calldata

Practical explanations of the bytes sent to Ethereum contracts: how a call identifies a function, how its arguments are laid out, and how much you can recover when the ABI is missing.

A useful mental model

For a standard ABI-encoded external function call, calldata is a 4-byte selector followed by an encoded argument block. The selector proposes a function signature; a matching function ABI gives every following byte a type and structure.

That distinction explains most decoding surprises. The bytes are deterministic, but they are not self-describing: the same word can represent an integer, address, offset, or part of another value depending on the schema used to read it.

ERC calldata references

Look up a standard function’s signature and selector, understand its parameters, and generate an editable calldata example.