In this track: Explore safely
beginner · 3 MIN READ

Understand token approvals

An allowance lets a specified spender request token movement under contract rules.

LET’S PICTURE IT

Giving a delivery service permission to collect up to five parcels differs from handing it one parcel now.

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.

Read the spender field

An ERC-20 approve call identifies a spender and a raw allowance amount. The spender is the party permitted under the token’s implementation, not necessarily the recipient shown in a website’s purchase summary.

Permission can outlast the page

The allowance is recorded in contract state. Disconnecting a website or closing its tab does not erase that state. Changing it requires the appropriate authorized action under the token or permission mechanism.

Approval and transfer differ

A transfer directly requests token movement to a recipient. An approval changes permission for a spender. Similar-looking address-and-integer input fields can request these different actions through different function selectors.

Inspect both calls locally

Choose transfer and approve in the ABI encoder. Compare the selector while keeping the same address and amount. Nothing executes in the lab, so you can study permission encoding without connecting a wallet.

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

Does approve mean exactly the same operation as transfer?

Your progress stays in this browser.
Keep exploring the original referenceEthereum Improvement Proposals ↗

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