⛓️ERC-20 Token Standard
Also known as ERC-20, ERC20, EIP-20, Fungible Token
The rule book for Ethereum tokens. Each unit of one is worth the same.
Think of it like
It is like a rule that all bus tickets are the same size. Then each ticket fits each machine.
Example
A game makes one million gold tokens as an ERC-20 contract. Lucy's wallet shows them as soon as she gets some, with no extra work.
Why it matters
One shared shape means one wallet can hold thousands of different tokens.
Definition
Example code
solidity
function balanceOf(address owner) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);Common mistake
Key takeaways
- 1Same functions. Every token has the same buttons.
- 2Fungible. Each unit equals every other.
- 3Works everywhere. Wallets read any ERC-20 token.