How does ERC-20 WORKS

How does ERC-20 WORKS.

The ERC-20 standard code has 6 functions:
The totalSupply function determines the total number of tokens;
The balance0f function shows the balance on the account of a certain address specified by the address _owner parameter, where _owner is the desired address;
The transfer function transfers tokens from the primary address to the address of an individual user, for example, a member of ICO;
The transferFrom function is used to send tokens from one user to another;
The approve function checks whether tokens have remained in the smart contract and allows funds withdrawal from the account up to the maximum allowed amount, which is specified as a parameter of the function;
The allowance function guarantees that there are enough tokens at the sender’s address for sending them to the recipient’s address.

ERC20 also provides two types of events:
transfer — the event of transferring tokens between accounts;

approval — the event is initiated when the approve function described above is successfully executed.

So if your transactions is pending or declined, you must read this :heart::heart::heart:

2 Likes