Homework: ERC20

1- it makes easy to deploy a token and more important by having one single standard, all the tokens will operate same and we can build one tool for all of them instead of building unique tool for each and everyone of them.
2- all the ERC-20 standard tokens have these function:
- totalSupply()
- balanceOF()
- trasfare()
- trasfareFrom()
-approve()

and there are some field that can be filled optionally like token name an …
for detailed info read this:
https://medium.com/blockchannel/the-anatomy-of-erc20-c9e5c5ff1d02#:~:text=ERC20%20defines%20the%20functions%20balanceOf,of%20an%20example%20ERC20%20contract.

2 Likes
  1. What are the benefits of setting a token standard like ERC20?
  • all smart contract on the blockchain can communicate with each other. And it makes it alot easyer to create smart contracts.
  1. What functions are in the ERC20 Token Standard Interface and what do they do?

totalSupply = gives maximum number of tokens that exist
balanceOf = balance of ERC20 tokens
transfer() = allows someone to transfer their ERC20 tokens to another address

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

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

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

Carlos Z.

1 Like

Great answers. It’s easy to understand. Great work. :clap:

Carlos Z.

1 Like
  1. Token standard ERC20 allows exchanges and wallets to support any token that is using ERC20 standard which will increase interoperability between tokens.
  2. totalSupply function - returns total supply of token
    balanceOf function - returns token balance of wallet address
    transfer function - transfers funds by another address
    approve function - gives another address approval to transfer funds from a given address
    allowance function - the maximum amount allowed to be transfered by another address through the approve function
2 Likes

1, Standards are good to implement, so everyone will be following one specific way of coding, it makes it easy for tokens to be able to communicate with each other in a efficient way,

2, totalsupply() for checking tokens total supply
transfer() takes the address of the recipient and the the amount sent
balanceOf() it tells an account balance
approve() can approve someone to spend from your account
allowance()shows how many tokens are available to transfer

1 Like
  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?

Answers

1). Setting a token standard like ERC20 makes it possible for tokens created on top of the ether platform to be integrated because it guarantees interoperability.

2). The ERC20 Token standard interface has the following functions:
(i). The balanceOf() function which provides the number of tokens held by a given address.
(ii). The transfer() function which transfers a number of tokens directly from the message sender to another address. Here, the sender must cross check to verify the recipient is as intended as the function do that.
(iii). The allowance() function which provides the number of tokens allowed to be transferred from a given address by another given address.
(iv). The total supply function which returns the number of total number of tokens in circulation.

1 Like

1- Benefits are clear communication, efficiency, easier to interact with many other entities & happy best practices
2- ERC20 tokens must state their supply amount, how to determine owner, what to do with each token- what are the outputs, how to determine state & how to interact with contracts

1 Like
  1. Uniformly and fast transactions. More efficient confirmations. Low risk of contract breaking.

totalSupply(): allows an instance of the contract to calculate and return the total amount of the token that exists in circulation.

balanceOf(): returns the balance of the provided address. The function accepts an address as a parameter, so it should be known that the balance of any address is public.

approve(): the owner of the contract approves the given address to withdraw instances of the token from the owner’s address.

transfer(): lets 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.

1 Like
  1. What are the benefits of setting a token standard like ERC20? — all exchanges and all wallets can support these tokens, smart contracts can work in a standardized ways, fungible
  2. What functions are in the ERC20 Token Standard Interface and what do they do? — control total supply, get balance of address, transferring
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    The token standard like the ERC20 assists to provide interoperability across all exchanges such as wallets and provides efficiency across the board.

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

The functions are:
totalSupply : Returns the total circulating amount of tokens.
balanceOf : Returns how many tokens exist in an account.
transfer : Transfer an amount of tokens from token owner’s account to another account

1 Like
  1. ERC-20 compliance ensures compatibility
    between the many different tokens issued
    on Ethereum, as well as the fact that all
    exchanges and wallets will be able to
    support each new token from day one. It
    also allows developers to accurately
    predict how new tokens will function within
    the larger Ethereum system.
  2. The ERC-20 standard interface defines the
    functions: balanceOf; totalSupply;
    transfer; transferFrom; approve; and,
    allowance. It also allows for optional
    fields: token name; token symbol; and,
    number of decimals.
    a. balanceOf returns how many tokens
    exist in an account.
    b. totalSupply returns the total circulating
    amount of tokens.
    c. transfer transfers an amount of tokens
    from token owner’s account to another
    account.
    d. transferFrom allows a spender account
    to transfer an amount of tokens on
    behalf of the token owner to another
    account (like setting up automatic bill
    pay at your bank)
    e. approve allows a token owner to
    approve a spender to transferFrom
    tokens from the token owner’s account.
    f. allowance returns the amount of tokens
    approved by the owner that can be
    transferred to the spender’s account.
1 Like
  1. Everyone can know what each function is great for consistency and scaling.
  2. totalSuppy - Total supply of the token.
    balanceOf - Balance of the wallet.
    transfer - Transfer ERC20 tokens.
1 Like

The benefit of setting a token standard like ERC20 is that it allows wallets and exchanges to easily add tokens as they all have ERC20 common names in their code.

balanceOf() gives the balance of any specific account
totalsupply() gives the supply of the total fungible tokens
transfer() allows people to transfer their ERC20 token to some other public address

1 Like
  1. What are the benefits of setting a token standard like ERC20? token standard like ERC20 makes it possible for tokens to be created on top of the Ethereum platform. Specific way of coding gives tokens a way to communicate with each other efficiently.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf- function provides number of tokesn held by given address.
    transfer()- transfer a number of tokens directly from sender to another address.
    approve()- approve someone to spend from you account
1 Like

1)Benefits of setting a token standard like ERC20 is that all the token would be made up of using same standards and it will be easy for exchanges, wallets and other contracts to communicate and interact with each other
2)totalsupply() - shows total supply of token
-balanceOf()-shows the balance of account
-transfer()-to transfer token from one address to another

1 Like
  1. It’s easier to develop new application that leverage fungible tokens (e.g. exchanges).
  2. A function to return the total supply. One to get the balance of an account and a function to transfer the token.
1 Like
  1. Standardisation allows easy communication between all apps, different standards for different types of smart contracts, enabling interoperability between tokens in a frictionless manner.

  2. Functions, overviews of the total supply of tokens in circirculation,
    balance of accounts, the number of tokens held in a ERC20 address,
    transfers of tokens from an account to another,
    allowance, stating the number of tokens you authorise to be transferred from a stated address to another stated address.

1 Like
  1. What are the benefits of setting a token standard like ERC20? Efficiency. Makes token exchange easier
  2. What functions are in the ERC20 Token Standard Interface and what do they do? BalanceOf(), transfer to another address, approve() to give another address approval to transfer a number of tokens to another address, transferFrom() allows certain tokens from a senders account, dosomething() operates instruction.
1 Like
  1. Tokens are fungible and are recognised by wallets and exchanges as soon as they launched. Also all apps build using this standard can communicated between them.

  2. totalSupply function is used to show the total number of tokens and balanceOf function is used to show the balance of an address account .

1 Like