-
What are the benefits of setting a token standard like ERC20?
A. ERC20 sets the technical standard and ensures that all exchanges and all wallets will be able to support ERC20 tokens. -
What functions are in the ERC20 Token Standard Interface and what do they do?
A. totalSupply() provides the total number of tokens in circulation.
balance Of(address account) provides the balance of the account.
transfer(address recipient unit amount) initiates transfer of ERC20 tokens between accounts
@thecil sure, below the descriptions:
totalSupply() - provide information about the total token supply
balanceOf() - Get the token balance for account tokenOwner
allowance() - returns the amount that spender
can spend from tokenOwner
's funds.
transfer() - Transfer tokens from ownerâs account to another account
approve() - Allow spender
to withdraw from your account, multiple times, up to the tokens
amount.
trasferFrom() - Send tokens
amount of tokens from address from
to address to
event Transfer() & event Approval() are not exactly functions, but events that other smart contracts can listen to
- What are the benefits of setting a token standard like ERC20?
Reduces friction in the ecosystem. For example, imagine everyone having different types of code for tokens. Wallets, exchanges, etc. would have to implement each token separately, and it would be hard to make any meaningful progress.
- What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply() tells you how much of an ERC20 token there are. balanceOf tells you an accountâs balance. transfer(address recipient, uint256 amount) transfers tokens to a certain address in a certain amount.
*Total Supply - returns the total circulating amount of tokens
- Balance of - returns how many tokens exist in an account
- Transfer - Transfers an amount of tokens from token ownerâs account to another account.
- Approve - A token owner can approve for spender to transferfrom tokens from the token ownerâs account
- Allowance - Returns the amount of tokens approved by the owner that can be transferred to the spenderâs account
- Transfer From - allows ta spender account to transfer an amount of tokens on behalf of the token owner to another account
1.) Standards allow us to have a similar code for all smart contracts. and allows simple and easy communication between tokens and exchanges in a smooth way.
2.) The functions are the following:
- Transfer ( ) - transfers or sends tokens from person A to Person B
- allowance ( ) - provides a number of tokens allowed to be transferred from one address to another address
- balanceOf ( ) - shows your current wallet balance
- Approve ( ) - returns the amount that the spender can spend from token ownerâs funds
- totalSupply ( ) - Provide information about the total token supply
- transferfrom ( ) - send token amount from address to address
- What are the benefits of setting a token standard like ERC20?
It provides continuity between exchanges, wallets, and tokens and provides for more efficient and faster integration and development. - What functions are in the ERC20 Token Standard Interface and what do they do?
There are many functions such as totalSupply() that returns the total number of tokens and balanceOf(address account) which returns the balance of a specific account.
- Having standards like ERC20 means that every smart contract works the same, and can be recognised by all wallets and exchanges that support ERC20 tokens. This is straight forward and simple (as opposed to each token having its own unique code and syntax).
- each function does something specific:
totalsupply: the total supply of that token
BalanceOf(account): communicates the balance fo a specific address
TransferFrom: says from which address to which address and then the value of the transfer
Yes, but could you please explain a little bit more about the other functions and what do they do?
If you have any more questions, please let us know so we can help you!
Abel S.
Homework: ERC20
Having a standard means applications that utilize or interact with an ERC20 token can rely on certain functions to be available and for them to act in an expected way. This makes it easier for wallets, exchanges, and other applications to support new tokens. It makes the overall system more efficient.
These functions define a token (only totalSupply is required):
- name - the long name by which the token is known
- symbol - the ticker symbol of the token
- decimals - the number of digits needed after the decimal place to represent the token, i.e. how divisible the token is
- totalSupply - the total amount of the token in circulation, sum of all addresses with a balance
These functions provide a way to interact with the token (all are required):
- balanceOf - returns the number of tokens held by an address
- transfer - allows for the transfer of tokens from one address (wallet) to another
- transferFrom - used by a smart contract to transfer tokens from an address that has been previously allowed by the user
- approve - used to allow a smart contract address to utilize the transferFrom function
- allowance - can query the number of tokens approved by an address for use by transferFrom
REFERENCE: https://eips.ethereum.org/EIPS/eip-20
1.Having a standard means that Applications that run on the ETH blockchain can interact with certain pre defined functions (such as balanceOf and Total supply of the ERC 20 tokens ) in a homogenous Manner. Example - Centralised and Decentralized exhanges can retrieve your ETH addressâs exact balance etc,.
- the Different Functions are as follows:
transfer = allows transfer from one wallet to other
transfer from = the admin wallet of the smart contract
balanceOf = traces the balance of all addresses with that token
token supply = the sum of balances of all addresses using that token
-
A standard toke ensures all apps to integrate with each other as they have a standard token where they can interoperable and brings consistency.
-
totalSupply()- tells how many tokens are there in the circulation.
-
balanceOf()- gives the address of the account.
-
transfer()- for transferring.
- Everybody knows how to read and interact with these tokens.
- Total supply and amount. You can see the total supply and the balance per adress.
The benefits of setting a token standard like ERC 20 is the programmers will have a set of guidelines/rules that will allow their tokens to utilize the same functions as every other ERC20 making cooperation much easier as than if everyone was using their own distinct functions for their specific token.
Total Supply - gives you the total amount in current circulation
Balance - gives account balances
-
What are the benefits of setting a token standard like ERC20? Allows wallets to handle different coins. Its more convenient. Its easier for developers to come up with tokens instead of working from scratch.
-
What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply â identifies the total number of ERC20 tokens created
balanceOf â returns the number of tokens that a particular address has in their account
approve() â once balance is checked the contract owner gives their approval to the user to collect the required number of tokens. Also checks the transaction against the total supply of tokens to make sure none are missing or extra.
Transfer() â lets owner of contract send a given amount of token to another address
transferFrom() â automate payment transfers to a specific account
allowance () â cancels transactions if the user doesnât have the minimum required number of tokens.
@Maki
good answers Maki, but did you mean Balanceof() gives the number of tokens in that address?
1. To achieve a consistency so the exchanges and wallets can easily adopt and support the compatible tokens from day 1.
2.
totalSupply() : shows total tokens in circulation
balanceOf(address account) : shows the balance of a given address and account
transfer() : allows the transfer of ERC20 tokens to another address
- allows programming of wallets which brings interoperability
- total supply- gets the total supply of token
balance of- given a specific address, it returns account balance.
transfer- transfers an amount to a specified address
transfer from- finds from address, to address and a value to transfer
approve- when terms are met of contract and contract is authorized to pay out tokens
allowance- returns units remaining
- What are the benefits of setting a token standard like ERC20?
A. A token standard such as ERC20 allows universal communication through the code that comprises smart contracts. With a universal standard, programs and transactions will run smoothly.
- What functions are in the ERC20 Token Standard Interface and what do they do?
A. function totalSupply determines positive or negative supply amount of tokens involved regardless of owner and function balanceOf (address account) determines amount of tokens in an ownerâs specified account.
- I mean balanceOf() tells how many tokens have the account in that address.