ERC-20 Token

1. basic

An ERC-20 token is a type of token on the Ethereum network that adheres to the ERC-20 standard. This standard outlines a specific set of functions that the token contract must implement, enabling interoperability across various interfaces, including exchanges and wallet services.

1.1

"USDT (Tether), BNB (Binance Coin), and LINK (Chainlink) are examples of popular ERC-20 tokens."

2. standard

The ERC-20 standard defines a common list of rules that all Ethereum tokens must adhere to. Some of these rules include how the tokens can be transferred, how transactions are approved, how users can access data about a token, and how total supply of tokens can be checked.

2.1

"The ERC-20 standard has greatly improved the ease of creating new tokens on the Ethereum blockchain, leading to an explosion in the number of unique tokens available."

3. methods

An ERC-20 token contract must implement the following methods:

  • totalSupply(): Returns the total token supply.
  • balanceOf(owner): Returns the token balance of an account.
  • transfer(to, value): Transfers a number of tokens directly from the message sender to another address.
  • transferFrom(from, to, value): Transfers a number of tokens from one address to another.
  • approve(spender, value): Allows spender to withdraw from your account, multiple times, up to the value amount.
  • allowance(owner, spender): Returns the remaining number of tokens that spender is allowed to spend from owner's allowance.

And two events:

  • Transfer(from, to, value): Emitted when value tokens are moved from one account (from) to another (to).
  • Approval(owner, spender, value): Emitted when the owner approves (approve) a spender to control value tokens from their balance.

3.1

"By implementing the ERC-20 standard, new tokens can ensure they are compatible with existing infrastructure, like wallets and exchanges, which support this standard."

* All terms and definitions may update as the Cryptionary improves.