The array is dynamic even when every tuple element has fixed width.
LET’S PICTURE IT
A variable-length list can contain records with exactly two fixed fields each.
SEE IT FOR YOURSELF
Follow a dynamic string from head to tailStep 1 / 4
This example encodes one string parameter with value hello. A dynamic argument uses an offset in its head, even when it is the only argument.
This example encodes one string parameter with value hello. A dynamic argument uses an offset in its head, even when it is the only argument.At argument byte 32, the string tail begins with length five. This counts the UTF-8 payload bytes and excludes all padding.At argument byte 64, read 68 65 6c 6c 6f for hello. Twenty-seven following zero bytes fill the final content word.The encoding uses ninety-six argument bytes: one offset word, one length word and one padded content word. A normal function call adds a four-byte selector before these bytes.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
Classify both layers
A (uint256,bool) tuple is static and occupies sixty-four bytes. An array of those tuples with type (uint256,bool)[] is dynamic because the number of records can vary.
Write the array prefix
The top-level argument points to the array length. For two records, the length is two, followed by the encodings of both tuples in their declared order.
Flatten each static record
Record one contributes its integer then its boolean. Record two contributes the same fields. There are no per-record pointers because each tuple is static.
Compute width from the schema
Four record words plus one count and one top-level offset total six words, or 192 bytes. Do not assume one array element always equals one word.
Trace a local example
types: (uint256,bool)[]
values: [[["7",true],["9",false]]]
no function selector prefix
word 0 · argument offset 0 bytes
0x0000000000000000000000000000000000000000000000000000000000000020
word 1 · argument offset 32 bytes
0x0000000000000000000000000000000000000000000000000000000000000002
word 2 · argument offset 64 bytes
0x0000000000000000000000000000000000000000000000000000000000000007
word 3 · argument offset 96 bytes
0x0000000000000000000000000000000000000000000000000000000000000001
word 4 · argument offset 128 bytes
0x0000000000000000000000000000000000000000000000000000000000000009
word 5 · argument offset 160 bytes
0x0000000000000000000000000000000000000000000000000000000000000000
Two records expand into four words after the array count.