Use the schema, padding and complete static width together.
LET’S PICTURE IT
Several fixed-width fields become readable once you know which ruler belongs to each one.
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.
Challenge one: a small number
A uint256 word ending in 2a is decimal 42 when all preceding bytes are zero. The encoding is left-padded and occupies a complete word.
Challenge two: a fixed byte label
bytes4 0x12345678 starts its word with those bytes and has trailing zeros. Reading it as a right-aligned integer would assign a different meaning.
Challenge three: a fixed array
uint256[2] containing 1 and 2 has two words and no dynamic length prefix. Its count is part of the schema.
Challenge four: the missing selector
A pair of ordinary return values begins with the first output word. Do not remove four bytes by habit. Identify whether you have calldata, return data, event data or error data first.
Follow the bytes
types: uint256[2]
values: [["1","2"]]
no function selector prefix
word 0 · argument offset 0 bytes
0x0000000000000000000000000000000000000000000000000000000000000001
word 1 · argument offset 32 bytes
0x0000000000000000000000000000000000000000000000000000000000000002
Use the trace to check the static array’s complete width.