In this track: ABI encoding foundations
advanced · 4 MIN READ

Why ABI data is not self-describing

A valid word can support several different interpretations.

LET’S PICTURE IT

A box containing the number one does not say whether it means one ticket, true, or an account ending in one.

SEE IT FOR YOURSELF
Build a transfer call from typed fieldsStep 1 / 4
Build a transfer call from typed fieldstransfer(address,uint256)Recipient: 0x0000…0001Raw amount: 100Diagram labels abbreviate addresses; the lab shows full bytes4-byte selectora9059cbbEach box is one byte; this prefix is not a 32-byte wordWord 0 · recipient address12 zero bytes20 address bytes000…0001Left padding preserves the lower-order address valueSelector4 bytesa9059cbbAddress32 bytesword 0Amount32 bytesword 1 → 0x644 + 32 + 32 = 68 bytesThe integer does not contain token decimals or market price

The standard transfer interface takes an address and a raw integer amount. This diagram uses address one and amount one hundred.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

The bytes carry no universal type tags

Ordinary ABI arguments rely on an external schema. A zero-padded word ending in 01 can represent a positive integer, true under a bool schema, or an address whose value ends in one.

Length does not solve semantics

Several static schemas can occupy the same number of bytes. A decoder can therefore produce a plausible result under a schema that was not the intended one.

Selectors narrow a request, not every uncertainty

A four-byte selector is useful dispatch information but can collide. It does not certify the target implementation or automatically reveal token decimal conventions.

Use trusted context

Choose the correct function or output ABI and retain the call outcome and network context. The lab decodes what you supply; it does not claim to discover truth from arbitrary hex alone.

Follow the bytes

0x0000000000000000000000000000000000000000000000000000000000000001

Possible schema interpretations:
uint256 → 1
bool → true
address → 0x0000000000000000000000000000000000000001

A valid interpretation is not proof that it was the intended one.

TURN UNDERSTANDING INTO PRACTICEOpen the Calldata decoder →
QUICK CHECK · NO PRESSURE

Can the same ABI word have more than one type interpretation?

Your progress stays in this browser.
Keep exploring the original referenceSolidity documentation ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.