In this track: Meet smart contracts
beginner · 3 MIN READ

Functions and arguments explained

A function identifies an action; arguments supply the details.

LET’S PICTURE IT

“Deliver” is an action. “To Leo, three boxes” supplies the information needed for that particular delivery.

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.

A function has a defined interface

A contract can expose named functions with typed parameters. A transfer action may take an address and an unsigned integer. Those types help software agree on how to encode the request.

Arguments are concrete values

In transfer(Leo, 100), the address selects a destination and the integer supplies a raw amount under the contract’s rules. The number 100 does not automatically mean 100 ETH or 100 whole tokens.

Names help humans, types shape bytes

A parameter name can explain intent, but standard ABI function signatures use the function name and canonical parameter types. Renaming a parameter alone does not create a new selector for the same canonical signature.

Inspect the encoded request

Use the ABI encoder to compare transfer(address,uint256) with approve(address,uint256). The argument shapes look similar, while the selectors request different actions. The contract still checks what each caller is permitted to do.

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

Does an argument named amount automatically use ETH units?

Your progress stays in this browser.
Keep exploring the original referenceethereum.org ↗

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