Homework on ERC20 token standard.
-
What are the benefits of setting a token standard like ERC20?
By setting ERC20 as a standard allows communication in the same language so all tokens are compatible and can be used by all wallets and exchanges -
What functions are in the ERC20 Token Standard Interface and what do they do?
balance Of(): queries the account balance of an address for a specific ERC20 token
transfer(): allows users to transact with each by transferring tokens from the message sender to the address
approve() and transfer From(): are used to transfer funds using a smart contract
-approve(): a token holder gives another address(usually a smart contract) approval to access a certain number of tokens (an allowance)
-transfer From(): the token holder calls this function to have the smart contract take the allowance from his account if the allowance is available
allowance(): sets the total number of tokens that can be taken
total Supply(): total number of tokens that exist
decimals(): how many decimal points the token should be accounted
name(): what the token is called
symbol(): sets the ticker sign