ERC20 Sepc
ERC20 is the standard for fungible tokens on Ethereum.
Transfer vs TransferFrom
The transfer
methods is 2 party transfer:
- Sender →
transfer(receiver_address, amount)
The transferFrom
method is 3 part transfer:
- Sender →
approve(exchange_address, amount)
- Buyer → trade on the exchange
- Exchange →
transferFrom(sender_address, buyer_address, amount)