The outer value measures native currency
A token transfer calls a token contract. The transaction's value describes native currency sent with that call, so it can be zero while a nonzero token amount moves. The token contract maintains token balances independently from the sender's ETH balance.
Follow a successful transfer
- Retrieve the transaction receipt and check execution status.
- Inspect logs emitted by the intended token contract.
- Decode a Transfer event using the contract's event ABI. For a standard ERC-20, indexed addresses are in topics and the amount is in data.
- Read decimals for display and keep the original integer amount in storage.
A decimal example
raw_amount = 1234500
decimals = 6
display_amount = Decimal(raw_amount) / (Decimal(10) ** decimals)
# 1.2345 tokensUse the actual token's decimals. Do not assume every token uses 18 or that every contract named USDC is the same asset. Keep chain ID plus contract address as the asset identifier.
Events need context
One transaction may emit several token transfers, including fees or internal routing. A router destination does not imply one recipient or one amount. Credit only the event and token account your application expects, and reconcile finality before final settlement. Robinhood Stock Tokens can expose an additional display multiplier; handle those documented semantics separately from a generic ERC-20 balance display.