/**
* Transfer時呼叫
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* Approve時呼叫
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
- totalSupply() => 總供給量
- balanceOf(account) => 帳戶餘額
- transfer(to, amount) => 從自己到轉代幣到to
- allowance(owner, spender) => 返回owner授權給spender的額度
- approve(spender, amount) => 自己授權代幣給spender
- transferFrom(from, to, amount) => 透過授權,從from帳戶轉向to代幣。同時allowance的額度會被扣除。
- mint(amount) => 鑄造代幣
- burn(amount) => 銷毀代幣