Ethereum token standard
ERC-20 calldata
ERC-20 defines the common interface for fungible tokens: balances, transfers, allowances, and optional display metadata.
Every calldata example below contains only a function selector and ABI-encoded inputs. Token amounts are raw integers; use the specific token contract’s decimals when converting a human-readable amount.
Write functions
Generate transaction input for calls that can change contract state.
approve(address,uint256)0x095ea7b3Sets how many ERC-20 tokens a spender may transfer from the caller’s account.transfer(address,uint256)0xa9059cbbMoves an ERC-20 amount from the transaction caller to a recipient address.transferFrom(address,address,uint256)0x23b872ddMoves ERC-20 tokens from one account to another using the caller’s allowance.
Read functions
Generate eth_call input for views that read contract state.
allowance(address,address)0xdd62ed3eReturns the remaining ERC-20 amount a spender may transfer for an owner.balanceOf(address)0x70a08231Returns the ERC-20 balance associated with one account address.decimals()0x313ce567Returns the decimal precision commonly used to display an ERC-20 token amount.name()0x06fdde03Returns the human-readable name reported by an ERC-20 token contract.symbol()0x95d89b41Returns the short ticker symbol reported by an ERC-20 token contract.totalSupply()0x18160dddReturns the ERC-20 token supply currently reported by the contract.