In this track: Read logs and failures
advanced · 4 MIN READ

Decode an Approval event

An allowance record describes spending permission.

LET’S PICTURE IT

A permission slip names an owner, an authorized spender and a limit.

SEE IT FOR YOURSELF
From an emitted Transfer event to a receipt logStep 1 / 4
From an emitted Transfer event to a receipt logToken executionApply coded rulesUpdate relevant balancesEmit Transferfrom · to · valueA structured logA reverted execution portion does not keep its emitted logsTransfer(address,address,uint256)Topic 0: 0xddf252ad…b3efFull digest · 32 bytesEvent topic zero and a function selector use different lengthsTopic 1from addressIndexedTopic 2to addressIndexedDataraw valueNot indexedThis diagram is specifically the common ERC-20 Transfer layoutReceipt logTopics + dataBlock contextApplication viewDecoded fieldsImplementation still mattersThe local event tool does not query or authenticate a deployed token

A token implementation may update balances and emit its standard Transfer event. State and the emitted record are related but distinct.

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

Recognize the common declaration

Approval(address,address,uint256) commonly indexes owner and spender while leaving value in the data tuple. Its topic zero differs from the Transfer event digest.

Separate permission from movement

An Approval log is not by itself a token transfer. It relates to an allowance, while transferFrom behavior and subsequent state determine whether spending occurs.

Read the raw allowance

The value is a raw integer interpreted under the token’s units. A very large allowance can grant broad spending permission even though no balance movement is shown in that log.

Avoid treating a log as current state

Later transactions may change an allowance, and implementations can differ. A historical event is a record from that execution, not a guaranteed current allowance query.

Inspect the example

event Approval(address indexed owner, address indexed spender, uint256 value)
topic 0: 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925
owner: address 1
spender: address 2
data: 0x0000000000000000000000000000000000000000000000000000000000000064

The built-in event tool accepts Transfer only; this Approval layout is a separate worked example.

TURN UNDERSTANDING INTO PRACTICEOpen the Event decoder →
QUICK CHECK · NO PRESSURE

Is Approval itself proof that tokens moved?

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.