In this track: Dynamic ABI and nested layouts
Nested ABI challenge set
Resolve a nested layout and justify every offset base.
A good route explanation says where each direction begins, not just how far to travel.
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.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
Challenge one: classify the shape
Consider (uint256,string[]) as one parameter. The array member is dynamic, making the entire tuple dynamic. Predict an outer tuple pointer before inspecting the example.
Challenge two: find the local bases
The tuple body has an integer and an array offset. The array body begins with a count; its string element offsets use the region immediately after that count as their base.
Challenge three: handle an empty member
In the example, the array contains an empty string and x. The empty string tail consumes its length word only. Its neighbor therefore follows after thirty-two bytes, not sixty-four.
Check the reasoning, not just the result
Decode the bytes back to the intended values, then explain each pointer destination in words. If you cannot name a pointer’s base, revisit that layer before moving on to event and error layouts.
Trace a local example
types: (uint256,string[])
values: [["7",["","x"]]]
no function selector prefix
word 0 · argument offset 0 bytes
0x0000000000000000000000000000000000000000000000000000000000000020
word 1 · argument offset 32 bytes
0x0000000000000000000000000000000000000000000000000000000000000007
word 2 · argument offset 64 bytes
0x0000000000000000000000000000000000000000000000000000000000000040
word 3 · argument offset 96 bytes
0x0000000000000000000000000000000000000000000000000000000000000002
word 4 · argument offset 128 bytes
0x0000000000000000000000000000000000000000000000000000000000000040
word 5 · argument offset 160 bytes
0x0000000000000000000000000000000000000000000000000000000000000060
word 6 · argument offset 192 bytes
0x0000000000000000000000000000000000000000000000000000000000000000
word 7 · argument offset 224 bytes
0x0000000000000000000000000000000000000000000000000000000000000001
word 8 · argument offset 256 bytes
0x7800000000000000000000000000000000000000000000000000000000000000Track the tuple base, array element base, and each string tail separately.
How much tail space does an empty string consume here?
Its zero length word remains, with no content block.
Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.