Homework: ERC20

totalSupply- commands for total supply of given token
balanceOf- commands for sumor balance of the requested address
transfer- commands to transfer the balance to specific address

Thanks for corrections @thecil :wink:

1 Like
  1. It is a blanket to write programs to facilitate and create specific tokens on the ethereum blockchain.

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

Having a standard like ERC20 makes it so that all apps, exchanges, and wallets can operate consistently with each other. It is more consistent and efficient and allows all different ERC20 tokens to have interoperability. Programmers are able to share a foundation of coding.

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

balanceOf(): shows the number of tokens held by a given address.

transfer(): sends tokens from the message sender to another address. However 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 a certain number of tokens. This is also known as allowance.

transferFrom(): take tokens from sender’s account to execute its work. If there aren’t enough tokens then the transfer won’t happen and “doSomething()” will not operate.

doSomething(): Operate instructions if certain conditions are met.

allowance(): provides the number of tokens allowed to be transferred from a given address by another given address. Anyone can query any address’ allowance because blockchain data is publicly available.

1 Like
  1. The benefits of setting a token standard like ERC20 include an efficient economy as all wallets, exchanges, and applications will be able to support new tokens from day 1. With setting a standard, there is more uniformity when creating so many tokens and applications that are capable of doing many different things.
  2. totalSupply: tells you how many tokens are in circulation of a certain token. And balanceOf(address account): gives you the total balance of tokens the account you put in for “address account”
1 Like
  1. Allows compatibility across smart contracts and other tokens.
  2. name: Name of the token; decimals: Number of decimal places; symbol: The ticker symbol; balanceOf: Number of tokens held by a given wallet address; totalSupply: The total supply of all tokens; transfer: Transfers from one wallet address to another; approve: Token holder approves transfer to a smart contract; transferFrom: Smart contract transfers approved tokens.
1 Like
  1. The ERC20 standard makes it easier for wallets and exchanges to communicate with the smart contracts of the different tokens.
  2. totalSupply() is a function to determine how many tokens are in circulation.
    balanceOf(address account) is used to determine how much balance that address has. Wallets and exchanges can use this function to check what balance there is in that address.
1 Like
  1. The benefits of setting a token standard like ERC20 are uniformity and universality. Now, no matter how many different tokens are developed, they can all communicate with wallets and each other given there’s a universal language.

  2. There are functions in the ERC20 standard like, balanceOf(), which allows the number of tokens at a given address to be verified. There’s also the transfer() function which is used to send tokens from one user to another.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    This allows for a frictionless digital economy and supports scalability.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Functions are lines of code that perform a task. By having a standard like ERC-20 this allows for an ecosystem to be built around a coin such as ETH.

getSupply function which allows exchanges or Dapps to access how much crypto or ERC20 token I have in my wallet.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    All tokens are fungible & have identical standards that can be applied to any token built on Ethereum.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Each ERC20 token has a function called ‘totalSupply’. It is a standard that all ERC20s have as well as, ‘balanceOf (address account)’ shown on exchanges & wallets. Standards are important for smart contracts that allow faster adoption & efficiency.

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

The benefits of setting a token standard such as ERC-20 is that all of the tokens built using this standard on the Ethereum network will be able to speak with each other. This reduces friction and hence increases efficiency in the Ethereum economy.

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

In the ERC-20 Token Standard Interface we have the following functions:

a) function totalSupply() - This gives how many tokens are currently in supply.
b) function balanceOf() - This gives the balance of the named address
c)function approve() - This gives permission for the owner of an address to withdraw tokens from the author of the smart contracts address
d) function transfer() - This lets the author of the contract send tokens to another address like a normal cryptocurrency transfer.
e) function transferFrom() - This function allows the smart contract to automate the transfer process and make a transaction from the author to the recipient. This is different to transfer as its automated for example paying a monthly bill as opposed to paying off a one off bill.

  1. The benefits of setting a token standard like ERC20 is that for one any new token using the standard can be supported straight away by wallets and exchanges.

  2. Functions in the ERC20 Standard Interface :
    balanceOf() - This function shows the number of tokens held in a wallet.

transfer() - This function enable a user to transfer money to another wallet.

approve() - This function allows the token holder to give another address (usually of a smart contract) approval to transfer a certain number of tokens.

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

transferFrom() - This function allows you to send money from one designated wallet to another.

totalSupply() -This function shows the total token supply

  1. The benefits of setting a token standard are that every wallet and exchange will be able to support every token.

  2. The functions that are in the ERC20 token standard are as follows:

    a) totalSupply- shows you how many of the tokens are in circulation.

    b) balanceOf- once you input an address of the account that you want to know the balance of then you will get the answer of how many tokens that balance has.

    c) transfer- to transfer the tokens

  1. What are the benefits of setting a token standard like ERC20?
    A huge benefit of having a standard is that every project or token that uses a standard can use a same function instead of programming differently for each and every project.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    There are a standard function on how to get Balance, transfer and others.

Hey @seasame, hope you are well.

Did you forgot to type your answers to this question?
2. What functions are in the ERC20 Token Standard Interface and what do they do?

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

Carlos Z.

1 Like
  1. Efficiency and interoperability. For example a wallet can easily support many different tokens that created with ERC20 standard.

balanceOf() - number of tokens of a given address

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

approve() - gives another address usually a smart contract permission to transfer a certain number of tokens know as a allowance

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

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    So that all the programming of tokens uses the same language for the coding.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    They are the coding functions that enable the balance checking or transfer between addresses.
    BalanceOf checks the balance, totalSupply gives the max supply, transfer allows transfers
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    A) Makes the network operate efficiently by maintaining good communication.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    A) totalSupply() total number of token supply
    balanceOf() Gives balance of a address
    transfer() transferring of tokens between accounts
    approve() gives approval of another address to transfer funds
    allowance() Maximum amount to be transferred by a address
    transferFrom() transferring of funds to another address

1 Like
  1. The benefit of using ERC20, especially at this point, is being interoperable with many other projects and exchanges.
  2. Functions range from balanceOf to transfer and can perform many different operations depending on the code for each various smart contract.
    Is Porsche calling about that deal yet? :wink:
1 Like
  1. Standards allow for developers in the community/network speak the same language. For example, it allows for wallet providers to be able to support different tokens that exist on the network.
  2. Types of functions in the ERC20 Token standard: -
    a). totalSupply = Returns the supply of tokens in circulation
    b). balanceOf() = Returns the balance of a given address
    c). transfer() = Allows for transfer of funds
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It ensures that wallets and exchanges will have it easier to adapt a token and to use the same functions in the erc20 code when programming.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    there are different ones like for example:
    function totalSupply() shows how many tokens are in circulation
    function balanceOf() gives the balance amount of a balance
    function transfer() for transfering

1 Like