What are the benefits of setting a token standard like ERC20?
ERC20 Standardisation creates commonality of design and interaction which in turn leads to efficiency and predictability and greater adoption within the industry.
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.