Homework: ERC20

  1. The benefit is communication, when all the tokens are created on the same standard, it means that they use the same language, which allows efficient communication with all the applications they use.

  2. balanceOf() amount of tokens that a specific address has.
    transfer() this function sends the specified number of tokens from one address to another but
    doesn’t work when tokens are being used to pay for a function.
    totalSupply() gives maximum number of tokens that exist.

    doSomething() / approve() / transferFrom() / allowance()
    I could use some help to understand these 4 functions, can someone please explain to me?
    @Fabrice
    @filip

1 Like

Homework on ERC20 token standard.

  1. What are the benefits of setting a token standard like ERC20?
    The benefit of setting a token standard is that it heightens efficiencies. All tokens can interoperate with each other without causing friction in an economy. Its also good to have standards like ERC20 because if the code is laid out in the same way all exchanges and wallets can support the token on day one. It becomes easier to deploy tokens on Ethereum’s network.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalsupply function equals the sum of all balances.
    balanceOf() function 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() and transferFrom() are two functions using a two-step process.
    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?
    A token standard like ERC20 allows tokens using the standard to be fungible and interoperable. This allows wallets, smart contracts and applications to easily work with ERC20 tokens.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    A few examples of functions:
    totalSupply() - returns the total supply of the token in circulation.
    balanceOf() - returns the token balance of a particular account address.
    transfer() - transfers an amount of tokens from the sender to the recipient.

1 Like

All rules are the same and therefor al ERC20 are possible to have in one wallet, they talk to eachother because of the token standard.
2.
Total supply: How many tokens are in circulation
BalanceOf: How many tokens 1 address has in wallet
transfer: send tokens to another address

1 Like
  1. Standardization in the crypto space allows for the construction of apps and products that can work with all tokens that adhere to.the standard, providing more value to the community.
  2. Total Supply/ Transfer/ Authorize/ Decimals/ Balance of/ Allowance
1 Like

[quote=“filip, post:1, topic:8440”]

  • What are the benefits of setting a token standard like ERC20?
    ERC20 allows wallets and exchanges to be programmed to support any token using that standard. This is much more simple and scalable than each new token having it’s own way of coding.

  • What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf() - gives the balance of ERC20 tokens
    totalSupply() - Maximum number of tokens that exist
    transfer() - allows transactions

1 Like
  1. Makes it easy for all of use to integrate and inter operate with each other, wallets etc.
  2. totalSupply() - total circulating supply of tokens.
    balanceOf() - balance of a wallets address
1 Like
  1. As the functions are the same for many different erc20 tokens exchanges and wallets add these tokens easily.
  2. BalanceOf() gives the total balance of a wallet
    totalSupply() gives the maximum number of tokens that exists.
1 Like

1.exchanges and wallets operate on the same standard,useing the same common code structure
2.balaceOf()and total supply

1 Like

Homework on ERC20 token standard.

  1. What are the benefits of setting a token standard like ERC20?
  2. What functions are in the ERC20 Token Standard Interface and what do they do?

1- It offers a common language that gives the same name to the functions allowing frictionless interoperability

2- Some of the more common functions are:

balanceOf() function 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.

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

1 Like

Wallets and exchanges can be programmed to support any token using the ERC20 standard.
Brings consistensy and increases efficiency when all tokens use the ERC20 standard.

balanceOf(): shows u the ni-umber of tokens a certain adress holds
transfer(): transfer a number of tokens directly from A to B
approve() a token holder gives another adress aoprival to transfer a certain amount of tokens
transferFrom() It takes in three inputs — the address of the sender, the address of the receiver, as well as the number of tokens to be transferred. And gives an output of the success or failure of the transfer.

1 Like
  1. The standardized programming functions of ERC20 code (Smart contracts) means that many projects can be deployed, in a way that entities like wallets & exchanges can easily engage with them, instead of having many variations in the coding for the same functions/smart contracts, which would mean a lot more work & effort from those entities that need to interact with the tokens / smart contracts. Also this provides an effective way of validating the compliance of a token to an approved standard.

• balanceOf() - Number of tokens held by a given address
• transfer() - function transfers a number of tokens directly from the message sender to another address
• appove() - provides approval for an event to take place
• transferFrom() - Take tokens from one address to another
• dosomething() - can be used to trigger multiple functions when a certain condition is met.
• allowence() - 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?
    Having standard and consistency gives an ability to write applications that are able to work with different tokens (that follow ERC20). Wallets and exchanges are particular examples of such applications.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply - total amount of tokens in circulation
    balanceOf - balance of particular account
    transfer - transfer tokens from owner’s account to some other account
    transferFrom - transfers tokens on behalf of owner’s account to another another account
    approve - creates approve event
    allowance - number of tokens allowed for withdrawal from owner’s address by recipient’s 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.

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

2 Likes

Hi @Gloria_Garcia

transferFrom():- The transferFrom method is used for a withdraw workflow, allowing contracts to transfer tokens on your behalf. This can be used for example to allow a contract to transfer tokens on your behalf and/or to charge fees in sub-currencies.

approve():- Allows spender to withdraw from your account multiple times, up to the value amount. If this function is called again it overwrites the current allowance with value.

allowance():- Returns the amount which spender is still allowed to withdraw from owner .

source https://eips.ethereum.org/EIPS/eip-20

Happy learning :wink: ,
Abel S.

1 Like
  1. Allows all tokens to be fungible (the same) using the standard to be accepted by all exchanges and wallets, with same naming conventions, same parameters and same standards.
  2. Common functions include function totalsupply, which defines the total supply of tokens; function BalanceOf, (address account) which determines balances and function Transfer (address recipient, unit256 amount), which allows transfers.
1 Like

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

It reduces friction in the system by allowing all wallets and exchanges, understand the same code in all different tokens.

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

There are these functions:

totalsupply(), outputs the total supply of tokens

balanceOf() , which provides the balance of a given address.

transfer() which allows transferring tokens from one address to another in one step,

or approve() and transferFrom() as a two-step process, if the sending of tokens depends on processing other previous functions of the smart contract after checking the allowance() function makes the transaction approvable.

1 Like

1)
It makes sure that every token created follows those same set of rules. This will prevent any confusion, problems, or issues related to the creation of these tokens. It will also increase efficiency of the network as a whole.

2)
balanceOf() = Will check the balance of a specific address. Because it is publicly accessible, every addresses balance can be shown.
transfer() = Will directly transfer funds from the sending address to the receiving address.
allowance() = Provides the number of tokens that are allowed to be sent from address #1 to address #2 at addresses #2’s initiation.

1 Like

Homework on ERC20 token standard.

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

By having a standard it allows all tokens build on it to communicate which makes it efficient and easier to build. This pushes adoption and usage of the standard.

  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • function totalSupply() = shows how many tokens are in circulation
  • function balanceOf (address account) = provides the total balance of the address given
  • function transfer () = used to transfer tokens from A to B
1 Like

1. What are the benefits of setting a token standard like ERC20?
It would be based on the same contract that is already accepted by exchanges and wallets. Standards allow for efficiency and better integration.

2. What functions are in the ERC20 Token Standard Interface and what do they do?
Examples are totalSupply (returns the total supply of tokens) and balanceOf (returns the balance of a specified in the arguments address).

1 Like