ERC-20 empowers developers
One of the most prominent types of tokens is known as the ERC-20 and when it comes to token implementation, it has proven to be the technical standard used for all intelligent contracts on the Ethereum blockchain. As of April 16, 2019, there are more than 181,000 ERC-20 compatible tokens in the Ethereum core network.
The ERC-20 is crucial due to the fact that it defines a common list of rules that all Ethereum tokens must follow. That is why this particular token allows developers to predict exactly how the new tokens will work under the larger Ethereum system. The impact that the ERC-20 standard has on developers is therefore tremendous. In this case, there is no need to redesign or add support for each newly created token. They are designed to be compatible with the new tokens, provided that they also follow the rules set by the standard. Developers of new tokens generally follow the rules of ERC_20, which means that most of the tokens released through the initial coin offerings built on the Ethereum blockchain comply with the requirements of ERC-20.
6 functions that specify the ERC-20
The ERC-20 is defined by six different functions in favor of other tokens in the Ethereum system. In general, these are basic functionality issues, including how tokens are transferred and how users can access specific token data.
Overall, this set of functions and signals ensures that Ethereum tokens of different types will work anywhere in the Ethereum system in an evenly distributed manner. Almost all digital wallets that support Ethereum currency also support ERC-20 compatible tokens. But because the ERC-20 standard is still relatively young, there are likely to be bugs that need to be tweaked as Ethereum is still maturing.
The allowance function allows two addresses to create a repetitive one-way transaction channel. The owner's address and the recipient’s address are defined as two wallets that participate in recurring transactions. More specifically, the recipient will receive a certain amount from the owner's wallet at a certain interval. Both of these variables must be defined.
This feature is closely related to the previous one. It allows two addresses to repeatedly terminate a one-way transaction. Approve is a simple standard feature that allows the wallet owner to authorize the transaction he is making. This function requires two inputs, the recipient’s address and the number of tokens to receive. The output sends a Boolean value (0 or 1) that determines whether the transaction was allowed.
Simply put, this function receives output from the address on the blockchain and returns a numeric output that indicates the number of tokens on the account. The Ethereum blockchain is public, so anyone can find out how many tokens are in any account.
This feature has been run only once, at the very beginning when the Ethereum network was being launched. The function is anonymous and, as the name suggests, it indicates the final number of tokens that can exist on the network.
The transfer function is the most important function that ERC-20 tokens have. Defines and implements direct token transfers between accounts. The extent to which the function is initiated by wallet owners requires only two parameters. The recipient's address and the number of tokens the sender wants to send. The output of this function is a Boolean value that determines whether the transaction will take place.
The last feature, TransferFrom, allows smart contracts to make a transaction based on the wallet owner's requirements. Not to be confused with the previous function, which is used only for direct transactions. However, this function is used to determine the conditions under which the transaction can take place. For example, stock exchange transactions or buying and selling tokens at a certain price are all performed using this function. The TransferFrom function has three basic input parameters, the sender's address, the recipient's address, and the number of tokens to be transferred.
The most popular Ethereum client is written in the Google Go programming language. Developers usually choose those languages that are “smart contracts-friendly”. That is why they usually choose languages like Vyper, Bamboo, Serpent, and Solidity.
Sources: investopedia.com, kryptoportal.sk, cryptosvet.sk, support.blockchain.com, ledger.com