- What are the benefits of setting a token standard like ERC20?
The benefits are that if you create an ERC20 token it will be readable by all wallets that can interpret ERC20 standards, it also creates better communication in the community.
- What functions are in the ERC20 Token Standard Interface and what do they do?
function totalSupply() - Returns the token total supply.
function balanceOf(address _owner) - Returns the balance of an especific account.
function transfer(address _to, uint256 _value) - Transfer tokens to another account.
function transferFrom(address _from, address _to, uint256 _value) - For transfer tokens from an specified account to another.
function approve(address _spender, uint256 _value) - Allows spender to withdraw from your account multiple times.
function allowance(address _owner, address _spender) - returns the total amount of tokens that an account can transfer to another account.
event Transfer(address indexed _from, address indexed _to, uint256 _value) - to transfer tokens from the sender’s address to another address.
event Approval(address indexed _owner, address indexed _spender, uint256 _value) - When aprove function is succesfull, this event is needed for triger that call.