A fixed count does not automatically make the entire value static.
LET’S PICTURE IT
A shelf with two spaces can still hold expandable bags rather than fixed-size boxes.
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.
Know element type and count
uint256[2] holds two unsigned integer elements. Standard ABI encoding places their full element encodings in order. This static array occupies sixty-four bytes.
Dynamic elements change classification
string[2] has a fixed element count but dynamic elements. Its ABI layout is dynamic and uses offsets for variable-size data under the tuple rules.
There is no dynamic length prefix for a static array itself
A fixed array’s count is part of the schema. Do not prepend a length word merely because you are encoding an array; distinguish it from a dynamic array.
Inspect the actual schema
A decoder needs both element type and count. The same bytes can fit other combinations of static fields, so raw length does not establish the intended array type.
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
There are two data words, not a length word followed by two more.