The ERC20 Token Standard is a specification for creating tokens through Ethereum. According to the ERC20 specification, a smart contract can be written to create an "interchangeable token". It is not mandatory, but following this standard, the tokens created can interact with numerous exchanges, wallets, etc., and it is now generally accepted by the industry. What is ERC ERC is the abbreviation of Ethereum Request for Comment, and 20 is the number. Request for Comment (RFC) is a series of working memorandums issued by the Internet Engineering Task Force (IETF), which later evolved into standard documents used to document Internet specifications, protocols, processes, etc. For example, the RFC numbers of common Internet protocols are: IP, 791; TCP, 793; SMTP, 2821.
Now, Ethereum has followed the formulation of Bitcoin, and the improvement proposal to the Bitcoin system is now called BIP (Bitcoin Improvement Proposals), followed by a number. The standards related to tokens follow the form of ERC, but they are all included in the EIP (Ethereum Improvement Proposals) sequence. The standard sequence of Ethereum EIP includes Core (core improvement), Networking (network layer improvement), Interface (interface improvement) , ERC (Application Layer Comment Collection). The Ethereum Improvement Proposal is available at: https://eips.ethereum.org. What is ERC20 The ERC20 token standard was first proposed by the Ethereum developer Fabian Vogelstler in the open source community, and later the Ethereum founder Vitalik (known as "Vitalik") wrote the first version of the document, which was named at the time. "Standardized Contract APIs" (Standardized_Contract_APIs). The earliest discussion document is available at: https://github.com/ethereum/EIPs/issues/20. Following the ERC20 standard, tokens created on Ethereum are universal and can be used by Ethereum and most other applications in the blockchain world. In addition to the official implementation, there are now multiple ERC20-compliant software implementations in the Ethereum network. Detailed explanation of ERC20 token standard Smart contracts can be written following the ERC20 token standard. The token methods it needs to implement include: optional name, symbol, decimals, and required balanceOf, transfer, transferFrom, approve, and allowance. The event responses it needs to implement include Transfer and Approve (see Figure 1).
Methods and events of ERC20 smart contract program Figure 1: Methods and events of the ERC20 smart contract program
For the current ERC20 documentation, see: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
In addition to ERC20, Ethereum's popular token standard is ERC721. Different from ERC20, ERC721 is a non-fungible token standard (NFT).
ERC20 tokens are interchangeable and homogeneous, while ERC721 tokens are non-fungible and non-homogeneous; ERC20 tokens are infinitely subdivided, and the smallest unit of ERC721 tokens is 1 , the segment can no longer be split.
In June 2018, ERC721 was finally officially accepted by the Ethereum community as the final standard. The popular cryptokitties (cryptokitties) followed the ERC721 standard.