Homework: ERC20

  1. A token standard like ERC-20 allows wallets to show token balances of newly created tokens and exchanges can list them just by using the address of the token contract.
  2. ERC-20 functions are:
    totalSupply() Number of tokens in existence
    balanceOf() Number of tokens by address
    transfer() sends tokens from one address to another
    approve() another address is given the allowance to manage the tokens
    transferFrom() moves tokens on behalf of the token owner
1 Like
  1. new tokens can be supported in wallets and exchanges from day one
  2. balanceOf(): number of tokens by a given address
    transfer(): transfers the number of tokens to an other address
    approve(): is the second step of a transfer to authorize an amount to an address, first step is transferFrom()
    doSomething(): instruction
    allowance(): provides the number of tokens transfered to another address
1 Like
  1. Usually, a standard is created to simplify things and work for those who apply it in the near future. A common thing that happens in our lives are the general formulaes in maths. We’ve used them for generations and we’ve used them to further develop and create things. In the context of ERC 20 standard, I think it would facilitate the development of projects and tokens on the ethereum blockchain. It would also facilitate integration into different cryptocurrencies exchanges thus potentially facilitate adoption (more trades, more usage). I guess another benefit would be to facilitate further development of the projects which use the ERC 20 standard because of the abundant pool of knowledge and developers in the market. Wallets can also be easily updated to display numerous tokens balances from different projects once they integrate reading ERC 20 or other standards, for example.

  2. The following are the functions:

balanceOf() function provides the number of tokens held by a given address. Anyone can query this because all data on the blockchain is public;

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

approve() function approves the smart contract to transfer up to a certain amount of tokens;

transferFrom() function transfers tokens from one address to another;

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

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    The benefits are that it that is “Standard” any can create any token or smart contracts. It makes it universal.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    a. balanceOf() it returns the balance of an acct.
    b. transferFrom() transfers a given balance from one acct to another.

1 Like
  1. Efficiency. Making different tokens exchange easily, allowing wallets to provide token balances for different tokens.
  2. Total supply - gives maximum number of tokens that exist.
    Balance of (address account) - gives a public addresses balance of ERC20 tokens.
    Transfer - allows someone to transfer their ERC20 tokens to another public address.
1 Like

2. 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() : transfers a number of tokens directly from the message sender to another address.
  • transferFrom() : transfers a number of tokens directly from an account to another address. Used with approve() function.
  • approve() : approval to transfer up to a certain number of tokens, known as an allowance.
  • allowance() : provides the number of tokens allowed to be transferred from a given address by another given address.

Hope this gives you a clear view of the subject, keep learning! :slight_smile:

If you have any doubt, please let us know so we can help you!

Carlos Z.

  1. Allows the economy to operate with less friction and effectively communicate. This means that all wallets and exchanges know how to communicate and work with the standards as opposed to everyone being different and unique.
  2. Total supply, balance of, transfer
  1. What are the benefits of setting a token standard like ERC20?
    All wallets and platforms are able to operate with the tokens.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply() --> Get the total token supply
    balanceOf() --> gives back the balance of a specific address
    transfer() --> transfer tokens from the sender address to another address
    allowance() --> shows how many tokens are allowed to be transferred
    The function approve() --> gives another address approval to transfer a certain amount of funds from the given address. This is usually how smart contracts are give permission to take the necessary funds needed to perform requested operations.

1 Like

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

ERC 20 token standards enable a repeatable use case for tokens, same naming conventions, reach efficiency

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

totalSupply() total supply of tokens available, in circulation, to a SC
balanceOf() # of tokens held by a given address

transfer() transfers a # of tokens from mssg sender to another address
Approval() gives details of approvals of tokens from one address to another

allowance()
doSomething()
transferFrom()
approve()

2 Likes

ERC20 is standard for Fungible token, meaning each token is valued the same.

  1. There are common structures and functions to these token in which standardisation makes it easier for wallets and exchanges to communicate better. Standards include naming of functions, basic structure that define supply, balance, minting (or not) …
  2. ERC20 functions interface are:
    totalSupply(), balanceOf(), approve(), transfer(), transferFrom() and allowance()
  1. The benefits of adhering to a standard like ERC20 are that they can be seamlessly deployed onto the Ethereum network but also have interoperability as they are programmed according to specific set standards.
    2 Several functions exist in ERC20. Some are"
  • balanceOf ( ) which deliveres the balance of the requested address
  • transfer ( ) which transfers a specific amount directly from the sender’s address to a specified address
  • transferFrom ( ) and approve ( ) do the same but via a smart contract whereby both sides initiate and/or approve the transaction according to a preset number of conditions
  • doSomething ( ) is the function that actually describes the purpose of the smart contract
  • allowance ( ) is the function that describes the maximum transaction value that is allowed to be initiated by the initiator/external party with the transferFrom function
1 Like
  1. Benefit of a token standard. It makes the programming easier across a range of applications and values, such as in gaming where their may be different costs and properties of items. It also makes it easier to develop tokens as there is one common standard for any developer to use.
  2. Functions in ERC20: ‘balanceof()’ shows the number of tokens held by an address, ‘transfer()’ allows sending of tokens between addresses, ‘dosomething()’ which will perform an operation if a certain condition is met, ‘allowance()’ which factors in the balance of payment in a transaction.
1 Like

1. What are the benefits of setting a token standard like ERC20?
Adopting a standard the interoperability increases

2. What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply () for getting the total money supply, balanceOf function for using the balance of a specified address account.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    The benefit for setting a token standard is that exchange will be able to support the token immediately. Plus, each smart contract will be able to communicate more efficiently and quickly.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    total supply () is a standard function to find the total amount of money supply. Balance of () tells the user the balance. Transfer() transfers token from the sender address to another address.
1 Like
  1. Token standard allows wallets, token, and exchanges to communicate on the network efficiently. Hence, provides interoperability between token networks.
  2. a.) totalSupply - returns the total amount of supply token
    b.) balanceOf - provides number of tokens held in a given address
    c.) transferFrom - proceed the transfer token from one address to other address
    d.) doSomething - operates instruction on the network
1 Like
  1. All wallets & exchanges etc will be able to read your data immediately.

allowance() Sets how much max you’re willing to spend
transfer() Send from on SC to another
balanceOf() Check balance of an ERC20 token holder
name Full name
symbol three or four characters
decimals 0-18
totalsupply All tokens that can exist in the SC - Sum of all bals
Doer SC getting paid
doSomething() Task
approve() sends the tokens to another SC ready to be used
transferFrom() Sender?

1 Like
  1. All newly created Tokens can easily be supported by wallets and exchanges. Implementation and development is made easier.

• balanceOf() provides the token balance of a specified address
• transfer() transfers token from one address to another
• approve() provides approval for a certain token amount to be sent
• doSomething() activates a set of operations
• transferFrom() activates a token transfer as part of a doSomething() operation

1 Like
  1. The benefits of a token standard like ERC20 is that being fungible tokens can be easly added by all wallets and exchanges.

  2. Total supply- how many tokens are in circulation
    Function balance0f-balance tokens

1 Like
  1. standards like the erc20, allow for uniformity and allow everyone to be able to communicate with one another and understand one another more easily.
  2. for example (balanceOf) which checks the balance of total tokens.
1 Like

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

Yes sir(s), but could you please describe what those functions do?

If you have any doubt, please let us know so we can help you!

Carlos Z.

1 Like