- ERC20 is basically a language standard and a set of rules that helps integrate a new token. Meaning that a token built with an ERC20 interface, it can be recognised and used by wallets and exchanges that accept this standard.
Functions of ERC20:
-
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; -
approve()
a token holder gives another address (usually of a smart contract) approval to transfer up to a certain number of tokens; -
transferFrom(): takes tokens from the senderâs account;
-
doSomething(): simply operates an instruction;
-
allowance()
: provides the number of tokens allowed to be transferred from a given address by another given address.