Compact concatenation has different boundaries and ambiguity properties.
LET’S PICTURE IT
Removing separators from a form saves space while making some field boundaries impossible to recover.
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.
Standard encoding uses full rules
Ordinary ABI encoding has typed words, offsets and lengths. The added structure lets a decoder with the schema locate dynamic components.
Packed encoding is a separate mode
For supported types, packed encoding can concatenate more compact representations. A uint16 pair such as 0x1234 and 0x5678 can occupy four bytes together rather than two full words.
Dynamic boundaries can collide
Packed strings ab and c produce the same concatenated bytes as a and bc. Hashing those identical bytes does not recover the missing boundary distinction.
Match the verifier’s exact construction
A signing or proof protocol must define types, framing and domain separation. Do not interchange encode and encodePacked merely because both produce hex data.