Homework: ERC20

1- The benefits of setting a token standard like ERC20 are that all exchanges and wallets will be able to support the token. The standard defines how a token is programmed.

2- totalSupply() function gives the total number of tokens that exist.
balanceOf() function gives the number of tokens of a given address, anyone can query an address’ balance.
transfer() sends from token from message sender to another address.

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

benefits of the ERC20 standard is that is defines the operation parameters and enables all to follow the same pattern to enable ease of communication for the system to read to the token, the amount etc.

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

examples of the functions within an ERC20 Token interface are as follows:

balanceOf() enables anyone to call the balance of an account.
totalSupply() enables exchanges to know how much of a token has been supplied.

1 Like
  1. It is easy to launch new tokens and they will have wallets’ support right away.

  2. totalSupply - shows amount of tokens in circulation,
    balanceOf - shows a requested addresses balance,
    transfer - moves tokens from one account to another.

1 Like
  1. All wallets and exchanges can support the standard making it more efficient.
  2. totalSupply() gives total number of tokens in circulation
    balanceOf() gives balance of provided addresses
1 Like
  1. Having a standard like ERC20 hugely simplify adoption and scalability of tokens. Any exchange or wallet can easily include tokens with the same standard. It would be cumbersome to add tokens without standardised code.
  2. Functions of an ERC20 token contract:
  • 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;
  • approve() - gives approval to transfer up to a certain number of token;
  • transferFrom() - allows automate transfer process and sends a given amount of the token on behalf of the owner;
  • allowance() - provides the number of tokens allowed to be transferred from a given address by another given address;
  • totalSupply() - gets total supply of tokens.
1 Like

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

A). ERC-20 - the official fungible unified protocol, designed to solve the issue of compatibility of different coins and improve the functioning of the network. The fungible standard token on the Ethereum blockchain is characterized by the following properties:

#)Makes assets interchangeable;
#). Used on compatible platforms, projects, exchanges;
#). Ensures operation with compatible decentralized applications (DApps);
#). Simplifies transactions with the receipt and sending of coins;
#). Interacts with other currencies, smart contracts;
#). The standard tokens based on the blockchain are decentralized and open source.

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

A). ERC20 Smart Contracts are composed of six mandatory functions and three optional (but more familiar) ones.
These first six functions are:
balanceOf( )
totalSupply( )
transfer( )
transferFrom( )
approve( )
allowance( )

OPTIONAL FUNCTIONS ARE:

Token Name

Token Symbol

Number of Decimal
A). When creating a token and building a smart contract, there are 6 simple but obligate functions:

A). When creating a token and building a smart contract, there are 6 simple but obligate functions:

i).Control of the initial number of coins and issue; (-TotalSupply)
ii). Assignment of the initial quantity to the company’s address and to the owner of the ICO; (allowance25% to marketing, 10% marketing, etc, etc)
iii). Sending assets to investors, recording the balance;(-Ttransfer, TransferForm, Approve)
iv). Distribution of coins among users for transactions, verification of their movement;
v). Checking the remaining balance;(-balanceOf)
vi). Control the adequacy of the currency at the address for transmission. (-approve)

2 Likes

Hello @NLUGNER, i think you forgot to specify which are the functions, you describe them, but to which function those description belong?

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

Carlos Z.

  1. What are the benefits of setting a token standard like ERC20?
    -Having a standard allows exchanges and wallets to have a consistent design to accomodate any ERC20 token. It also allows for consistency between coding in terms of common function names, naming conventions and similar functionality.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
  • function name() public view returns (string) - returns the name of the token
  • function symbol() public view returns (string) - returns the symbol of the token
  • function decimals() public view returns (uint8) - returns the number of decimal places a token uses
  • function totalSupply() public view returns (uint256) - returns the total token supply
  • function balanceOf(address _owner) public view returns (uint256 balance) - returns the account balance for a specific account address
  • function transfer(address _to, uint256 _value) public returns (bool success) - transfers tokens from one address to another
  • etc.
1 Like
  1. the benefits of setting a token standard like ERC20 is keeping all of the tokens on the same standard and not having them create their own which would mean the wallets would need to speak that same standard to communicate.
  2. functions in the erc20 token standard interface are:
    totalSupply() - retrieves the total token supply
    balanceOf() - gives the balance of a specific address
    transfer() - sends specified value of tokens from address to send address
    allowance() - returns the amount which the spender is still allowed to withdraw from the owner
    approve() - allows spender to withdraw from account, multiple times, up to a value
    transferFrom() - sends specified value of tokens from address to address to
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    A: It creates a set of rules that everyone follows which makes it easier to create wallets, to track balances on wallets, exchanges, etc. If every coin had a different token standard then keeping track of things would be a nightmare!

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    A: A couple examples mentioned in the video are totalSupply () and balanceof (address balance).
    totalSupply tells you how many tokens are in circulation.
    balanceOf (address balance) gives you the balance of an address.

1 Like

Point taken, My bad. I have updated my post and I trust it will suffice. You learn something everyday.

Thx and have a greate day Learning :wink:

1 Like

1- it is fungiable, supports all exchanges and wallets

2 total supply- gives total num of tokens that exists

  • balance0f- balance of ERC20 tokens
  • transfer- you can transfer ERC20 tokens to each other
1 Like
  1. Having a token standard allow tokens to be easily adopted onto exchanges and wallets. This is a very important use-case for real-world adoption.

  2. Functions allow users to find out the balances of accounts as well to transfer them from one account to another user under varying conditions.

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.

Doer has a function doSomething() that requires 10 Do tokens to operate.

The 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?
    The benefit is that all tokens will be able to communicate making interoperability between tokens posssible.
  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. 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 tokens 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. It ease for any developer using the ethereum to use the same naming of functions and it makes wallets and exchanges to interact efficiently with the new tokens

  2. balanceOf() to give information about balance
    totalSupply() gives information about the number of tokens
    transferFrom() to gives information about the sender address

1 Like
  1. Benefits of setting a token standard in general is to be able to build on top of something and at the same time be able to accepted to all wallets that simply follows one standard. It uniforms the ecosystem that a lot more applications can be built on top of one giant ecosystem, its like a train platform, and the tokens are the trains.

  2. totalsupply(): provide will the amount of eth in circulation
    balanceOf(address account): shows balance of the account
    transfer(): transfer between ERC20 tokens

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Creates clarity among all tokens so that any token created is easy to be added to any exchange, wallets, platforms.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    function totalSupply () a set total number of fungible tokens.
    function balanceOf (address account) gives available token balance for an account
    function transfer is to send to another account
1 Like
  1. Token standards allow multiple tokens to be built upon a network like ethereum and also allows funds to be transferred between wallets.

  2. An ERC20 Token determines the circulating supply, facilitates transactions from one wallet to another and provided the public addresses in which the token is contained

1: A standard makes for a frictionless communication.

2: The balanceOf() function provides the number of tokens held by a given address.
The transfer() function transfers a number of tokens directly from the message sender to another address.
The approve() gives another address approval to transfer up to a certain number of tokens.

1 Like
  1. ERC20 is a set of rules for token creation and implementation on Ethereum network. The benefit of such a standard makes it possible for wallets and exchanges to manage many tokens in one place. compatibility between applications and various tokens that adopted this standard.

totalSupply(): total numbers of tokens.
balanceOf(): shows the balance of particular address
allownance(): shows how much an address can store or spend.
transfer(): transfer tokens from one address to another.
approve(): If an account has enough balance, this function allows up to specified amount to be spent by another address. (Smart contract)
transferFrom(): when an address with allowance want to transfer to another address. (Smart contract)

1 Like