- What are the benefits of setting a token standard like ERC20?
[Ans] It allows to have a set of common interfaces and guidelines so that other applications can interact with each other. Further, this helps the common application like - wallet/exchange, to interact with a common interface to all smartcontract that are compliant with ERC20 or other standards. This will also help in reusability where a new application can extend functionalities of one or more existing applications. - What functions are in the ERC20 Token Standard Interface and what do they do?
[Ans] following are some examples
-
What are the benefits of setting a token standard like ERC20?
With a standard, every new token complying to this standard will be automatically useable by exchanges and wallets which have this standard âappliedâ -
What functions are in the ERC20 Token Standard Interface and what do they do?
The ERC20 standard provides functions to check the balance of accounts and functions to transfer funds from one account to another based on conditions.
-
Standards such as the ERC-20 token standard provide a commonality for all participants. This helps increase speed in the development of new token contracts and improve efficiency in the settlement of transactions. Wallets are able to display numbers of tokens in parity with each other.
-
The following are functions of the ERC-20 token interface with a brief description of what they do:
name is for the long name for the token contract
symbol is for the three initial symbol representing the token contract
decimals denote how divisible a token may be made
total supply the total sum of all tokens
balanceOf() total tokens in a particular address
transfer() number of tokens sent from one address to another
- So that functions are standard and exchanges and wallets can read the coinâs programming
- a. Balanceof() to see balance of tokens needed
b. Transfer() to send
c. Dosomething() make the move
d. Approve() approve transaction
e. TransferFrom() take from where
f. Allowance() is there enough
- all token smart contract will have the same functions/methods. It will be easier to create app and be used by all token smart contract.
- Here all functions :
- totalSupply : get the total supply of the token
- balanceOf : get the balance token of a wallet
- allowance : return the amount of token a spender has right to do
- transfer : transfert token to another wallet
- approve : give permission to do something with his token
- transferFrom : transfert token on behalf someone
- What are the benefits of setting a token standard like ERC20?
All applications (i.e wallets) can interract with different ERC20 tokens easily because of it.
- What functions are in the ERC20 Token Standard Interface and what do they do?
TotalSupply. Show total suply of ERC20 tokens at the moment.
Balance. Shows balance of requested wallet for this ERC20 token.
Homework on ERC20 token standard.
-
What are the benefits of setting a token standard like ERC20?
Setting a token standard allows wallets or exchanges to interact with different tokens by providing their balances and to list more tokens. -
What functions are in the ERC20 Token Standard Interface and what do they do?
FUNCTIONS
-> balanceOf(): Provides the total amount of token in an address.
-> transfer(): Transfer tokens from one user to the other.
-> allowance(): Shows the amount of token that the smart contract owner allows an address to transfer to other address.
-> transferFrom(): token transfer from allowance from one address to the other.
-> approve(): s.contract owner authorise an address to withdraw tokens(allowance) from owners address.
-
What are the benefits of setting a token standard like ERC20?
Standards encourage all programmers to work within the same specs of quality and respect of protocol, minimizing complications and âfrictionâ. -
What functions are in the ERC20 Token Standard Interface and what do they do?
balanceOf
- Checks and stores the balance of the given address, confirming availability of funds.
totalSupply
- Checks and stores the total supply of the cryptocurrency the contract is paying in, presumably so one cannot send more coins than actually exists.
transfer
- allows the owner to transfer the balance to the token of another address.
transferFrom
- Establishes the address of the source of the funds.
approve
- the approval of the owner of the contract to transfer funds.
allowance
- can be used to establish a timed, routine distribution.
- What are the benefits of setting a token standard like ERC20?
Easy for exchanges & wallets to instantly accept a token because they have common coding
- What functions are in the ERC20 Token Standard Interface and what do they do?
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 allowance()
function provides the number of tokens allowed to be transferred from a given address by another given address.
-
Interoperability and removal of friction. It allows everyone to be able to read a code and makes the entire process more efficient of creating and analyzing other tokens.
-
totalSupply() - gives you total supply of all tokens
balanceOf(address account) - gives you balance of tokens in an individual account
-
What are the benefits of setting a token standard like ERC20?
=> Standards and conventions make cooperation and integration easier. For instance, by following conventions, new tokens can be supported on exchanges and wallets from day one. -
What functions are in the ERC20 Token Standard Interface and what do they do?
=> We have some functions below :- totalSupply that returns the total amount of tokens
- transfer that transfer an amount to a different account
- balanceOf(account) which returns the balance of an account
For a full list,we can look at:
https://eips.ethereum.org/EIPS/eip-20#methods or
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol
1. What are the benefits of setting a token standard like ERC20?
Setting a token standard comes with a lot of advantages such as :
-
Exchanges, wallet, and other services con easily support the token.
-
Interoperability and efficiency that comes with that.
2. What functions are in the ERC20 Token Standard Interface and what do they do?
Functions in the ERC-20 Token standard :
-
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. -
totalSupply()
gives maximum number of tokens that exist
[Homework on ERC20 token standard.
- What are the benefits of setting a token standard like ERC20?
Allows wallets to provide token balances for hundreds of different tokens and creates a means for exchanges to list more tokens by just providing a contract ID. - What functions are in the ERC20 Token Standard Interface and what do they do?
function totalSupply() constant returns (uint theTotalSupply);
function balanceOf(address _owner) constant returns (uint balance);
function transfer(address _to, uint _value) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function approve(address _spender, uint _value) returns (bool success);
function allowance(address _owner, address _spender) constant returns (uint remaining);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
- It has allowed developers to create and launch tokens and get support at far greater speeds.
-
balanceOf()
-
allowence()
-
totalSupply()
-
approve()
Hi, hereâs my answers:
1. What are the benefits of setting a token standard like ERC20?
So that every token can communicate with each other and with wallets without friction.
2. What functions are in the ERC20 Token Standard Interface and what do they do?
-
totalSupply()
: returns total amount of tokens in existence; -
balanceOf()
: returns the token balance of an address; -
transfer()
: transfers an amount of tokens of the caller to another address; -
approve()
: gives permission to another address (spender) for spending some amount of tokens of the caller (approver); - transferFrom(): transfers some amount of tokens of an approver to another address by the caller (spender);
- allowance(): keeps track of how many tokens left the spender can transfer (using transferFrom()) on behalf of the approver.
Homework - erc20 tokens
What are the benefits of setting a token standard like ERC20?
That thereâs full on platform communication on the code.
What functions are in the ERC20 Token Standard Interface and what do they do?
totalsupply() gives the total supply of a token
balanceOf() gives the balance of a account
-
What are the benefits of setting a token standard like ERC20?
The benefits of setting a token standard such as ERC20 allows for greater integration, interoperability as well as efficiency. When all tokens deployed on the network conform to the same standards, this process allows for a seamless integration by all wallets and exchanges. -
What functions are in the ERC20 Token Standard Interface and what do they do?
The balance Of ( ) function provides the number of tokens held by a given address.
The transfer ( ) function transfers a certain amount of tokens directly form the message of the sender to another account.
The transfer ( ) function is okay when sending tokens between users, but does not work well in smart contract payment.
The allowance ( ) function provides the number of allowed tokens, that can be transferred between given addresses.
The approve ( ) function is the permission you grant regarding transaction withdrawal form your address.
-
The token standard will allow interoperability / compatibility in the long term. Which means that different applications, which are built on the blockchain (or even on different blockchains) utilizing different âtokensâ are supported by different wallets, exchanges and ecosystems in general.
-
totalSupply - represents the number of circulating tokens + balanceOf(address account) - reveals the balance of ERC20 tokens related to a public address + transfer() - allows the transfer of ERC20 tokens among addresses.
1/ A standard like ERC20 allows the technology to work seamlessly by ensuring smart contracts are compatible across all wallets and exchanges. All apps are then interoperable and consistent.
2/Within ERC20 the functions are
totalSupply() which gives maximum number of tokens that exist
balanceOf(address account) which gives a public addressesâ balance of ERC20 tokens
transfer() which allows someone to transfer their ERC20 tokens to another public address and token management
** What are the benefits of setting a token standard like ERC20?*
That makes it easy for exchanges and wallets to communicates with any the tokens
** What functions are in the ERC20 Token Standard Interface and what do they do?*
balanceOf: it allows a smart contract to store and return the balance of the provided address
totalSupply: it calculates the amount of the token that exists in circulation
transfer: it lets the owner of a contract to send tokens to another address
transferForm: it is when the owner of a contract automate the transfer process and send given amount of the token in specific time.
approve: it is a function that gives the owner of a contract to authorizes a given address to withdraw som tokens