Find the selector, split the words, and follow dynamic offsets.
LET’S PICTURE IT
A parcel has an action label and a carefully arranged set of compartments. Calldata uses a similarly agreed layout.
SEE IT FOR YOURSELF
Build a transfer call from typed fieldsStep 1 / 4
The standard transfer interface takes an address and a raw integer amount. This diagram uses address one and amount one hundred.
The standard transfer interface takes an address and a raw integer amount. This diagram uses address one and amount one hundred.Keccak-256 of the canonical signature supplies the first four bytes. The transfer selector is a9059cbb.An address is twenty bytes. Standard ABI encoding adds twelve zero bytes on the left to fill one thirty-two-byte word.The integer one hundred is hex 64, left-padded in word one. Selector plus two words produces sixty-eight bytes of standard calldata.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
First identify the layout
Standard function calldata begins with a 4-byte selector. Bytes after it encode the arguments. Split that argument region into 32-byte words. Our decoder numbers the words starting at zero and shows offsets relative to the start of the arguments.
A static example
transfer(address,uint256) encodes two words. The first is a zero-padded 20-byte address; the second is the unsigned amount. The amount is a raw integer. Token decimals are separate information, so a decoder should not automatically label it as ETH.
Follow a string offset
For setMessage(string), the first argument word is 0x20, meaning 32 bytes from the argument region’s start. At that location, a word gives the UTF-8 byte length. The bytes of the string follow and are padded to a multiple of 32 bytes. A byte count can differ from the number of visible characters.
Know what you can conclude
Decoding with a supplied ABI tells you how those bytes fit that ABI. It does not prove the recipient’s deployed code uses that interface or that a selector has only one possible signature. Contract behavior, state and network context require further checks.