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

The JSON ABI format

Structured interface entries describe functions, events and errors.

LET’S PICTURE IT

A machine-readable form catalog lists each action and the types of its fields.

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.

Entries have kinds

An ABI can include function, event, error, constructor and other relevant entry types. A function entry provides its name, inputs, outputs and state mutability metadata.

Tuple components need structure

A tuple type uses component definitions to describe its members. Nested arrays of tuples retain the relevant array dimensions alongside that component schema.

Internal names are not all wire types

Compiler metadata such as internalType can preserve source-level information. The external encoding still follows the canonical ABI type rules.

The JSON is not deployment proof

Anyone can provide an interface file. Match it with the intended address, implementation and network when making claims about real execution. The local lab also accepts concise human-readable declarations.

Follow the bytes

[
  {
    "type": "function",
    "name": "count",
    "stateMutability": "view",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ]
  }
]

This example describes a getter and contains no executable bytecode.

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

Does receiving a JSON ABI file authenticate a deployed contract?

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.