Homework: ERC20

  1. It’s a standard, so it’s reliant it makes the whole space able to communicate with each other. Can quickly be adopted by ERC20 platforms and wallets.

  2. The balanceOf() function provides the number of tokens held by a given address.
    The transfer() function transfers a number of tokens directly from the message sender to another address.
    The second event is Approval() which emits details of approvals of tokens from one address to another.
    The allowance() function provides the number of tokens allowed to be transferred from a given address by another given address.

1 Like
  1. What are the benefits of setting a token standard like ERC20?

Standards like ERC20 has ‘less friction’, developers can follow that standard for all dapps and smart contracts.

  1. What functions are in the ERC20 Token Standard Interface and what do they do?

Total supply
balanceOf
transfer
approve
allowance
transferFrom

1 Like
  1. The benefit of token standards make it easier for exchanges and wallets can easily support those tokens. It create less friction in the ecosystem.

  2. Some functions include: totalSupply gives the total number of tokens, balanceOf(account) gives the available balance of a certain account, transfer() transfers a designated ERC20 token to another public address.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    -it allows wallets and exchanges to add ERC20 since they are all using the same standard.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    -balanceof(): shows the number of tokens for a specific address
    -approve(): giving approval to send tokens from one address to another

1 Like

The advantage of the ERC-20 token standardization are numerous:

It’s a time saving blueprint for developers to ensure that tokens are fungible and compatible with the Etherem Blockchain. Developing a token from scratch is expensive and time consuming. This wise to do because it sped up the development of Etherem application. This standardization also makes things work well with ERC-20 compatible services line wallets.

The functions that are in the standard interface of ERC-20 are:
Total supply: this function outlines the total supply of the token

BalanceOf: shows the amount of tokens an address has

Transfer: the transfers ownership of a token to another user

1 Like
  1. What are the benefits of setting a token standard like ERC20?
  • The benefits of setting a token standard like ERC20 allows for adaptability and use cases to arise. This happens by using a standard set of functions to allow all tokens to write smart contracts in the same way.
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • The functions that are in the ERC20 Token Standard interface are “BalanceOf, Totalsupply and Transfer”. The BlanceOf function allows to show the balance of the address, the total supply shows the token’s total supply and transfer allows for the transfer of ownership of the token.
1 Like

1- Having a standard like ERC20 allows wallets and exchanges to be programmed to support any token using that standard ,

2- totalSupply() gives maximum number of tokens that exist
balanceOf(address account) gives a public addresses’ balance of ERC20 tokens
transfer() allows someone to transfer their ERC20 tokens to another public address

1 Like
  1. It makes it easier for the whole ecosystem to interact with eachother. Exchanges don´t need several wallet types to store all the different tokens.

balanceOf () - gives the balance of a token
transfer () - transfers the token to a given address
approve () - approving to an action the token wants to do

1 Like
  1. What are the benefits of setting a token standard like ERC20?

Uniform functionality, compatibility, and fungibility.

  1. What functions are in the ERC20 Token Standard Interface and what do they do?

Functions include total supply limiting and balance queries.

1 Like
  1. When all token follow the standard ERC20 it is easy to use them because new tokens already supported by exchanges and wallet.
  2. For example totalSupply to know total supply and balanceOf to check balance of specific network address.
1 Like
  1. So that developers can all build applications that can
  2. function: totalSupply() it gives you how many tokens are in circulation.
    function: balanceOf (address account) it gives you the balance of an address.
    function: transfer (address recipient, uint256 amount) it fires a transfer of funds if
    enough funds are available.
    There are more standard functions, see:
    https://eips.ethereum.org/EIPS/eip-20 = great source of ERC-20 Token Standard functions overview!
1 Like
  1. Benefits of setting those standards are that make different tokens exchange easily, and wallets can provide balances for every different token.

  2. totalSupply()- gives the number of tokens that exist
    balanceOf(address): gives a public addresses balance of ERCO20 tokens.
    transfer(): allows transfer of the tokens to another public address
    doSomething(): operates insturctions
    allowance(): provides the number of tokens allowed to be transfered from a given address by another.

1 Like
  1. ERC20 token standard, makes it possible for tokens to be interoperable with wallets, exchanges and dApps. If there were no standards tokens would be written in different code and would be limited.

  2. ERC20 Token Standard Interface is a inbuilt set of code functions, in a relively self explaitory format.
    eg.
    balanceOf() - number of tokens at an address
    total Supply() - how many tokens ther are
    transfer(), - move tokens between addresses.

1 Like
  • What are the benefits of setting a token standard like ERC20?

As it is the same language , interoperability is possible. wallets can provide balance for ERC20 tokens.
Easy to integrate tokens on exchanges only with token contract’s address.

  • What functions are in the ERC20 Token Standard Interface and what do they do?

Functions allows users to check balances and initiate token transfer.

‘totalSupply()’ : gives the total balances of a given token.

´balanceOf()´ function return the balance of a given address

transfer() function Initiate a token transfer from an address to an other address.

allowance() function provides the number of tokens allowed to be transferred from a given address by another given address.

1 Like
  1. Having a token standard makes it easier to develop and progress the blockchain as all tokens must be structured the same way. This means developers save time and dont have to write the same code over and over again, possibly in slightly different ways, to achieve the same outcome (no need to reinvent the wheel). This standardization allows for easier querying and reporting of blockchain data as we know what type of information all tokens will contain.

name - long name by which the token is known
symbol - the symbol by which the token contract should be known, most often 3 letters but can be any length
decimals - number of decimals after the decimal point, 0-18, how divisible the token is.
totalSupply - equals the sum of all balances
balanceOf() - the number of tokens held by a given address
transfer() - transfers a number of tokens directly from the message sender to another address
approve() - gives another address (usually of a smart contract) approval to transfer up to a certain number of tokens, known as an allowance.
transferFrom() - transfers a number of tokens from a specified address to another address
allowance() - provides the number of tokens allowed to be transferred from a given address by another given address

1 Like

1- The benefits of standards like ERC20 are to make interaction and communication with in the ETH network easier.
2-
balance()- shows the available balance in the account
transfer()- allows you to send tokens from one account to another.
approve()- a token holder gives another address (usually of a smart contract) approval to send tokens
allowance()- function provides the number of tokens allowed to be transferred from a given address by another given address.
transferFrom()- a two-step process similar to approve() that insures available tokens.

1 Like

communication runs smooth because everyone speaks the same language -no misunderstanding.

FRAME
name(‘Etherium’); symbol(‘ETH’); decimal(18); totalsupply(sumOfAllBalances);

FUNCTIONS
balaceOf(‘token’) transfer(adress)/ approve(allow a smartContract: 50) transferFrom(function used by smartContract/wallet to excecute given instruction: i.e 20 );
allowance(20)

1 Like
  1. It is easier for wallets to know what to do. If standards weren’t set it would take much more time, energy …for transactions to be executed.

  2. totalSupply, balanceOf, …all the same “rules” for erc-20 tokens.

1 Like

Answers:

  1. Benefits of setting a token standard like ERC20 is that everyone creating or using ERC20
    tokens can understand and operate with each other in unity rather than having to figure
    out a new code for every token and associated smart contract.

  2. Some standard functions in the ERC20 token are, totalSupply which states how many
    tokens are in circulation, balanceOf function shows the token balance of a particular
    address, transfer function shows the sender’s and recipient’s address and how many
    tokens were transferred in a particular transaction.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    standards are important to ensure a proper communication between tokens and wallets.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    function name() public view returns (string)
    ==> returns name of token
    function symbol() public view returns (string)
    ==> returns the abbreviation of the token
    function decimals() public view returns (uint8)
    ==> returns the number of decimal a token is using
    function totalSupply() public view returns (uint256)
    ==> returns the total number of tokens in cirkulation
    function balanceOf(address _owner) public view returns (uint256 balance)
    ==> Returns the total number of tokens held in a specific account
    function transfer(address _to, uint256 _value) public returns (bool success)
    ==> Transfers a specified number of tokens to address and returns a true or false
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success)
    ==> Transfers a specified number of tokens from address and returns a true or false
    function approve(address _spender, uint256 _value) public returns (bool success)
    ==> function that allow tokens to pay for functions on smart contracts.
    function allowance(address _owner, address _spender) public view returns (uint256 remaining)
    ==> Returns the amount of tokens a specified smart contract address is still allowed to withdraw from another specified account address

1 Like