Homework: ERC20

  1. By using a token standard, all tokens and smart contracts adhering to that same standard can be interoperable.

  2. The functions Ivan mentioned in the lecture were: totalSupply, which provides the total number of a token in circulation, and balanceOf (account address), which provides the balance of a specified account.

1 Like
  1. Because there is standard in ERC20 it allows all tokens to be supported by wallets and exchanges. With common code brings usability amongst all the platforms.

  2. balanceOf- Delivers the balance of a account
    totalsupply() - Shows the absolute max of coins that are in existence.
    transfer() - Allows someone to transfer their ERC20 tokens to another public address.

1 Like
  • What are the benefits of setting a token standard like ERC20?
    Programmer can use this standard to communicate with each other and users. Token issuer and use the standard to issue their own ERC20 tokens. Thus the ecosystem is being built.
  • What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply() - Total supply of the token
    balanceOf() - Number of tokens held by the given address
    transfer() - Transfer a number of tokens directly to another address
    transferFrom() - Send a number of tokens from an specific address to another address
    approve() - When calling this function, the owner of the contract authorizes or approves the given address to withdraw instances of the token from the owner’s address
    allowance() - Returns the amount which spender is still allowed to withdraw from the owner
1 Like
  1. It set’s a standard that makes tokens be operated in the same way by exchanges and wallets and the rest of the eco system.
  2. Amongst others, functions to get number of tokens in circulations, ballance of an address, transfering from one address to another.
1 Like
  1. What are the benefits of setting a token standard like ERC20?

Having a standard help with widespread adoption of tokens. Because they are standardised wallets, exchanges and other tools can interact with them in the same way easily. Having a standard also helps promote best practice and collaboration with programmers.

  1. What functions are in the ERC20 token standard interface and what do they do?

Some of common functions are: totalSupply() giving the max number of tokens, balanceOf() providing a balance of an account address, transfer() allowing the transfer of tokens, approve() allowing users to approve transfers, transfer() is used to transfer tokens to an account, allowance()specify the number of tokens allowed to be sent from an address, transferFrom() allows you to specify the address of a sender, receiver and the amount of tokens.

1 Like

Sure! here it goes:

balanceOf() -> provides the balance of a given address
transfer() -> sends token amount to provided address, from sender address. This function does not track who sent the transfer once executed.
approve() -> provides approval from address holder to move token
transferFrom() -> a transfer that tracks origin of token transfer.
allowance() -> provides number of token that can be transferred

1 Like

1. What are the benefits of setting a token standard like ERC20?
Allows exchanges and wallets to interact with each other smoothly and execute transactions and commands using the standard. Provides structure and interoperability.

2. What functions are in the ERC20 Token Standard Interface and what do they do?
Total supply - shows you how many tokens are in circulation.
Balance off - shows you the balance of a particular address.

1 Like
  1. The advantage in using a token standard like ERC20 is that all the different tokens can communicate and work together because they all use the same way of expressing things in their code.
  2. BalanceOf() - Tells you how many tokens for any specific address
    transfer() - sends token from one address to another
    approve() - Gives an address from a smart contract which allows a certain number of token to be used for something.
    transferfrom() - Allows a user to take tokens from another account
    allowance() - allows a certain number of tokens to be moved from one address to another address.
    tranfer() - shows the details of the movement of tokens from one address to another.
    approval() - shows details of the addresses receivingsending tokens from each other.
1 Like

A standardized token format makes new token formation and adoption quicker.
balance - user token balance
transfer - moves tokens between wallets
approve - allows wallet transfer permission from 3rd wallet
do something - contract instructions
transfer from - fee logic

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    A: Because it is readily acceptable on exchanges and allows to interact with it.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    A: totalSupply-tells how much of tokens there are;
    balanceOf-how many tokens an address holds;
    transfer- move tokens;
    approve- authorization;
    allowance- the amount of tokens able to be transferred.
1 Like
  1. What are the benefits of setting a token standard like ERC20?

No need to re-inventing the wheel :slight_smile:
If you have standards others can adopt your project quicker, also it makes the development or communication much more clean as everyone understands what you are talking about.

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

totalSupply - max possible number of the token
balanceOf - account balance
transfer - send token to someone
transferFrom - send from a specific address
approve - approve from the address owner/holder/manager
allowance - how much tokens are able to transfer

2 Likes

1.) What are the benefits of setting a token standard like ERC20? Allow wallets and exchanges to support the token easily day one.
2.) What functions are in the ERC20 Token Standard Interface and what do they do?
-totalsupply () gives the maximum number of tokens that will ever exist.
-balanceof (address account) gives a public addresses balance of erc20 tokens
-transfer() allows user to transfer their ERC20 token to a public address.

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

ERC20 standard defines how we program tokens so that all exchanges and wallets can support the tokens that have been programmed. This allows for more fungible tokens to be easily deployed and launched on top of the Ethereum.

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

balanceOf() provides the number of tokens held by a given address

transfer() function transfers a number of tokens directly from the message sender to another address

approve() function to give another address approval to transfer up to a certain number of tokens, known as an allowance.

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

transferFrom() function to take an amount of tokens from the allowance

1 Like
  1. All ERC20 tokens are fungible, meaning each token has the same value.

  2. There are functions to retrieve the amount of tokens in circulation, the balance of an address, to transfer tokens from one address to another, and to retrieve the amount of tokens available for an address to spend.

1 Like
  1. It is easier to communicate with the wallet, exchanges and between them.
  2. totalsupply() the maximum amount of token that exists.
    balanceof(address account) the balances of someone.
    transfer() transfer token to another address.
    approve() someone else can spend money from your account
1 Like
  1. it gives a platform for greater adoption, development, and efficiency
  2. totalsupply gives the number of tokens
    balanceof gives a wallet’s balance
    transfer
1 Like
  1. It defines how we program the tokens. Standards determine how tokens are developed. This helps in the acceptance of new tokens by all exchanges and wallets.
  2. balanceOf(address account) - This is a common function within all ERC20 tokens in determining the balance within an account.
    totalSupply - Provides the maximum number of tokens that can ever be created.
    transfer - Is a function that allows the transfer of tokens from one address to another.
    With such functions, there is a consistency in the design, availability, and value of tokens.
1 Like
  1. It creates a standard for the industry to work off, allowing for easier adoption.
  2. transfer() transfers an amount from one account to another; balanceOf() returns the balance of a specified address
1 Like

1.- To create compatibility, specially in exchanges or in cases where smart contracts need communication.
2.-
transfer (): “Transfers a number of tokens directly from the message sender to another address”.
balanceOf(): “Provides the number of tokens held by a given address”.
allowance(): “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?
  • all exchanges and wallets will be able to support those tokens from day 1, ease of use.
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • totalSupply - max possible number of the token
    balanceOf - account balance
    transfer - send token to someone
    transferFrom - send from a specific address
    approve - approve from the address owner/holder/manager
    allowance - how much tokens are able to transfer
2 Likes