Homework on ERC20 token standard.
- What are the benefits of setting a token standard like ERC20?
It allows all exchanges and wallets to integrate and interoperate and support any token using that token standard
- What functions are in the ERC20 Token Standard Interface and what do they do?
balanceOf() - provides the number of tokens held by a given address
transfer() - transfers a number of tokens directly from the message sender to another address. But it doesn’t work well when tokens are being used to pay for a function in a smart contract
approve() - a token holder gives another address approval to transfer up to a certain number of tokens(allowance)
transferFrom() - take certain tokes from sender’s account and carry on its work
doSomething() - to operate instructions
allowance() - provides the number of tokens allowed to be transferred from a given address by another given address
Cheers