ERC-20 Interface Reference — Functions & Events
ERC-20 is the fungible-token standard on EVM chains. This reference lists the standard functions and events that a compliant token contract exposes.
Metadata functions
name — the human-readable token name. symbol — the short ticker. decimals — the number of decimal places the token uses when displaying balances. totalSupply — the total amount of tokens in existence. These are read-only views and are optional in the strictest reading of the standard, though nearly all tokens implement them.
Balance and transfer functions
balanceOf(owner) — returns the token balance of an address, expressed in the smallest unit. transfer(to, amount) — moves amount from the caller to to. transferFrom(from, to, amount) — moves amount from from to to, spending an allowance the caller was granted.
Allowance functions
approve(spender, amount) — authorizes spender to withdraw up to amount from the caller's balance. allowance(owner, spender) — returns the remaining amount spender is still allowed to withdraw from owner. This approve-then-transferFrom pattern lets contracts move tokens on a user's behalf.
Events
Transfer(from, to, value) — emitted on every token movement, including mints (from the zero address) and burns (to the zero address). Approval(owner, spender, value) — emitted when an allowance is set. Both from/to/owner/spender are indexed, so you can filter logs by address with eth_getLogs.
Frequently asked
Are token amounts in ERC-20 stored with decimals applied?
No. Balances and transfer amounts are stored as integers in the smallest unit. To display a human amount you divide by 10 to the power of decimals. For a token with 18 decimals, one whole token is 10^18 base units.
How do I detect all transfers of a token?
Subscribe to or query the Transfer event with eth_getLogs, filtering by the token contract address and the Transfer signature topic. Because from and to are indexed, you can further filter by a specific wallet address.
Related tools
Top up, get a key, ship.
Self-serve. Pay in crypto or card. Metered by credits — heavy primitives cost more, simple ones are cheap.
Get API key