In this track: ABI encoding foundations
advanced · 4 MIN READ

Static tuples explained

A tuple of static members concatenates their encodings without an offset to a tail.

LET’S PICTURE IT

Several fixed-size form fields can be placed next to each other in an agreed order.

SEE IT FOR YOURSELF
Build a transfer call from typed fieldsStep 1 / 4
Build a transfer call from typed fieldstransfer(address,uint256)Recipient: 0x0000…0001Raw amount: 100Diagram labels abbreviate addresses; the lab shows full bytes4-byte selectora9059cbbEach box is one byte; this prefix is not a 32-byte wordWord 0 · recipient address12 zero bytes20 address bytes000…0001Left padding preserves the lower-order address valueSelector4 bytesa9059cbbAddress32 bytesword 0Amount32 bytesword 1 → 0x644 + 32 + 32 = 68 bytesThe integer does not contain token decimals or market price

The standard transfer interface takes an address and a raw integer amount. This diagram uses address one and amount one hundred.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Classify every member

A tuple is static only if all its components are static under ABI rules. A tuple containing a string becomes dynamic even if another member is a fixed integer.

Concatenate in order

For a tuple of uint256 and bool, the integer word comes first and the boolean word follows. The tuple occupies sixty-four bytes in this example.

Static does not mean one word

A fixed tuple or fixed array can occupy several words. When calculating later dynamic offsets, use each static value’s full encoded width rather than assuming one slot per top-level parameter.

Connect to nested layouts

A static tuple can be nested inside another structure without introducing dynamic offsets merely for being nested. Dynamic membership, not the presence of parentheses, determines the classification.

Follow the bytes

types: (uint256,bool)
values: [["7",true]]
no function selector prefix

word 0 · argument offset 0 bytes
0x0000000000000000000000000000000000000000000000000000000000000007

word 1 · argument offset 32 bytes
0x0000000000000000000000000000000000000000000000000000000000000001

The tuple contains two static words and no dynamic tail.

TURN UNDERSTANDING INTO PRACTICEOpen the ABI encoder →
QUICK CHECK · NO PRESSURE

Is every static tuple exactly one ABI word?

Your progress stays in this browser.
Keep exploring the original referenceSolidity documentation ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.