Decodable bytes can still represent the wrong intended action.
LET’S PICTURE IT
A correctly filled form can be submitted to the wrong department.
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.
Check framing and schema
Confirm the target interface, selector and parameter types. Similar word lengths do not establish that two declarations have the same meaning.
Validate semantic constraints
A successfully decoded address or integer may still violate protocol rules. Check allowed targets, amount ranges and relationships among fields.
Avoid blind reinterpretation
Reading raw bytes under a convenient alternate ABI can yield plausible but incorrect values. Preserve the exact expected schema and reject unsupported shapes.
Test confusing inputs
Include mismatched selectors, truncated tails and valid encodings with unauthorized values. Structural decoder checks and application authorization checks must both hold.
Work through the boundary
bytes fit address,uint256
→ values decoded
→ still check target, recipient, amount and authority
A simplified local review scenario. The example establishes a question to test, not a guarantee of production safety.
QUICK CHECK · NO PRESSURE
Does successful ABI decoding prove an action is authorized?
Structural validity is separate from semantic permission.