Homework: ERC20

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 simpler and scalable than each token having its own personalized code. Moreover all tokens based on the same standards will be able to communicate in a known and expected way, meaning interoperability between the tokens is possible.

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. But it doesn’t work well when tokens are being used to pay for a function in a smart contract.

approve(): a token holder gives another address approval to transfer up to a certain number of tokens(allowance).

transferFrom(): take certain tokes from sender’s account and carry on its work.

doSomething(): to operate instructions.

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?
    a. to allow wallets to interact with all tokens on a single language.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    b. function name() public view returns (string)
    function symbol() public view returns (string)
    function decimals() public view returns (uint8)
    function totalSupply() public view returns (uint256)
    function balanceOf(address _owner) public view returns (uint256 balance)
    function transfer(address _to, uint256 _value) public returns (bool success)
    function transferFrom(address _from, address _to, uint256 _value) public returns
    (bool success)
    function approve(address _spender, uint256 _value) public returns (bool success)
    function allowance(address _owner, address _spender) public view returns (uint256 remaining)

1 Like
  1. They are fungible so every token is the “same”. They all have some functions in common which makes them easier to use and integrate for exchanges etc.

  2. TotalSupply shows you the existing tokens; balanceOf shows you the balance of an address and transfer is to send tokens

1 Like
  1. The benefits of setting a token standard like ERC 20 are that all wallets and exchanges can support that standard token.
    2.The functions in the ERC 20 Token Standard Interface are :
    Total supply - total supply of the token
    Balance - Balance of address
    Allowance - amount allowed to be sent/spent
    Transfer - send amount of tokens from one address to another
    Approve - allows spender to withdraw from your account
    Transfer From - returns amount spender is still allowed to withdraw from owner account
1 Like

1.- ERC20 is a set of rules and regulations that create a blueprint for Ethereum base tokens, and that standards make the interactions between different tokens more easy and fast given to the ecosystem more traction.

2.- Functions

TotalSupply() :total number of tokes.
BalanceOf() : Amount of tokens in an specific account.
Transfer(): Sending tokens
allowance() : Holds the amount of tokens possible to be send.

1 Like

1: All things can use erc20 tokens because they have standardized code so anything can recognize them

2: Function balanceOf () Shows the amount of tokens held by the address
Function transfer() Gives a certain amount of tokens by the sender to the recipient

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It will bring efficiency as everyone building smart contracts will be using the same conventions.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Totalsupply() gives you the total amount in circulation, balanceOf() gives you the balance of a given address, and transfer() can transfer amounts from one address to another.
1 Like
  1. Setting a standard like ERC20 allows wallets and applications to interact with them easily, and accelerates development of the space.

  2. totalSupply()- gives maximum number of tokens that exist
    balanceOf() - gives back the balance of a specific address
    allowance()- shows how many tokens are allowed to be transferred
    transfer() -sends value amount of tokens from address from to address to
    approve() - allows spender to withdraw from your account, multiple times, up to the value

1 Like
  1. What are the benefits of setting a token standard like ERC20? Giving Standards let one blockchain handle all tokens and coins on one network so we don’t need multiple wallets and exchanges to handle the transactions.
  2. What functions are in the ERC20 Token Standard Interface and what do they do? Total supply()is number of unit for that coin or token.
    balance () returns accounts balance.
    transfer() is amount of units sent from one wallet to another.
    approve() let unit holder know units were accepted received/sent.
    do something() instuctions for operator.
    allowance() gives max or min of units that can be sent or received.
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    That you ensure interoperability between different tokens based on the same standard
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    They are basic functions allowing to check total supply, to check balances, to check allowances and to transfer tokens.
1 Like
  • What are the benefits of setting a token standard like ERC20?
    The benefit’s of setting a token standard for ERC-20 is it allows a uniform way to deploy tokens on smart contract platforms. A functional token standard.

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

*BalanceOF: It will give back the correct balance of a specific address.

*Transfer: Transfers coins from one sender’s wallet address to a recipients wallet address.

*Allowance: This function takes in the wallet’s address of a coin owner/spender then produces an output for them. Resulting in the correct amount of coins being transferred from address to address.

*Total supply: This gives a number of total output. This number is the total supply of the coin.

*Approve: This function will approve another address holder to spend from your account.

*TransfferredFrom: This function takes in three separate inputs - The address of the sender, the address of the receiver, and also gives the total number of coins that will be transferred. It will present the output resulting in a positive or negative transfer.

1 Like
  1. Setting a token standard like ERC20 means that all tokens programmed with ERC20 will be supported by the same exchange and wallet. It allows for faster growth and adoption.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    function total Supply - gives the total number of tokens in existence
    function balanceOf - gives the balance of an account once you give the account address
    function transfer - sends the token from send to another account address
    function allowance - how many tokens are available to transfer
    function approve - gives approval to transfer token to another address.

1 Like
  1. Having a token standard live ERC-20 ensures that all tokens have the same naming and parameter convention and are supported by all wallets and exchanges alike.

  2. Functions of an ERC-20 token include;

  • balanceOf() provides number of tokens held in given address.
  • transfer() transfers a number of tokens to a given address.
  • approve() approves transfer of a number of tokens from an address (usually a smart contract) to another.
  • transferFrom() transfers a number of tokens from a given address to another.
  • allowance() provides number of tokens allowed to be transferred from a given address to another.
  • totalSupply() provides sum of all balances.
2 Likes
  1. Every wallet and exchange will know how exactly talk to this smart contract.

  2. a) Total supply: Is defining how many tokens of each kind is created in total.

    b) An ERC-20 token contract is defined by the contract’s address and the total supply of tokens available to it, but has a number of optional items that are usually provided as well to provide more detail to users. These are the token’s name, its symbol, and the number of decimals.

1 Like
  1. Standards make wallets, exchanges, apps etc, interoperable and add efficiency as well as consistency to the network.
  2. Balance of [ : states the number of tokens held by given address.
    allowance [: Provides the number of tokens allowed for transfer from a certain address by another certain address.
    Do something [: To operate instructions.
    Transfer from [: To take certain tokens from a sender’s account to carry out its work.
    Approve [: Token holder gives address approval to transfer up to a certain number of tokens.
    Transfer [: Transfer a number of tokens from message sender to another address, though it fails to work efficiently when tokens are used to pay for a function on a smart contract.
1 Like

1.Exchanges and wallets new tokens and new applications are interactable with one another.
2. balanceOf - allows a smart contract to store and return the balance of the provided address
totalSupply - allows an instance of the contract to calculate and return the total amount of the token that exists in circulation.
transfer - allows the owner of the contract send a given amount of the token to another address just like a conventional cryptocurrency transaction.
transferFrom - allows a smart contract to automate the transfer process and send a given amount of the token on behalf of the owner.
approve - allows the owner of the contract authorizes, or approves , the given address to withdraw instances of the token from the owner’s address.

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

The standard allows exchanges, wallets and others that need to use the token to use the same code for all ERC20 tokens. This saves a lot of work and reduces the size of the code that would need to be maintained if all tokens were different.

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

balanceOf() - get the balance of any address

transfer() - send from one address to another

approve() - allows a smart contract to spend an allowance from your address

transferFrom() - allows a smart contract that has an allowance to transfer funds from the address that was previously approved

allowance() - gives the balance of the allowance that a contract is allowed to spend from a list of addresses

Transfer() - an event that triggers on transfers that emits details of the transfer

Approval() - an event that triggers on approvals that emits details of the approval

1 Like
  1. What are the benefits of setting a token standard like ERC20?
  • it allows a define standard to be adopted globally, bringing about interoperability, minimising friction in creating a global economy, and technological advancements.
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • function balanceOf()
  • function totalSupply()
  • function transfer()
  • function _mint
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    A standard like ERC20 ensures all apps are interoperable and communicate in a known and expected way. All wallets, exchanges or platforms are able to add tokens easily. Furthermore, programmers don’t have to learn or program every token from scratch.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf() - return the amount of tokens in a given address;

transfer() - transfer a specified number of tokens from one address to another;

approve() - gives another known address approval to transfer a certain amount of funds from the specified address. This is hwo smart contracts are given permission to take the necessary funds needed to perform requested operations.

transferFrom() - perform the transferring of funds by another address.

allowance() - return the maximum amount that’s allowed to be transferred by another address via the approve() function. .

1 Like

What are the benefits of setting a token standard like ERC20?
First is the fact that all the exchanges and wallets will be able to accept the new tokens as soon as its released. Another benefit is that the standard makes the whole space of the ethereum network a place where different tokens can interact with each other.

What functions are in the ERC20 Token Standard Interface and what do they do?
As in coding in general functions are the instrunctions that the developer insert into the smart contract. The functions within the ERC20 are balanceOf, transfer() and totalSupply() and they are pretty obvious.

1 Like