-
What are the benefits of setting a token standard like ERC20?
The main benefit of setting a tonken standard is that all ETH wallets will already be able to accept and create ERC-20 token transactions. -
What functions are in the ERC20 Token Standard Interface and what do they do?
balanceOf()
function provides will query the blockchain for the token balance.
transfer() can be used to send tokens
-
It gives a better integration of tokens in applications: applications such as wallets, or exchanges, can simply develop functionalities which will work for all tokens following the ERC20 standard and any new token will be supported automatically.
-
ERC20 functions:
- totalSupply() returns the number of tokens in circulation.
- balanceOf() returns the balance of one particular address.
- approve() allows the caller to give authorization to the provided address to withdraw a certain amount of his tokens.
- allowance() allows the caller to know how many tokens a provided spender address is able to withdraw from a provided owner address.
- transfer() allows the caller to transfer some of his tokens to a destination address (payment).
- transferFrom() allows the caller to transfer some of the someone else’s tokens to a destination address.
-
The main benefit is that eveyone uses the same syntax for their smart contracts. Having this erc20 standard allows for easier integration with wallets and exchanges as well as adoption from the development space.
-
balanceOf(): this function provides the amount of token x held by address y.
-
transfer(): this function transfers tokens from the message sender to an address.
-
approve() & transferFrom(): these 2 functions are a 2 step process. A message sender gives another address (usually a smart contract) the approval to transfer x amount of tokens. Then the token uses the approve() function to give the smart contract the ability to spend the x amount of tokens.
-
allowance(): this function returns the amount of tokens allowed to to be transferred from 1 address to another.
-
Setting a standard like ERC-20 allows all interfaces … wallets, exchanges, listing sites, etc. to manage ERC-20 tokens in a known way and that allows interoperability with tools and tool kits and has fueled the growth of areas such as Defi.
-
ERC-20 was approved on 11-19-2015. https://eips.ethereum.org/EIPS/eip-20. The minimum required functions are as follows:
Methods
Returns the name of the token - e.g. “MyToken”.
function name() public view returns (string)
Returns the symbol of the token. E.g. “HEX”.
function symbol() public view returns (string)
Returns the number of decimals the token uses - e.g. 8, means to divide the token amount by 100000000 to get its user representation.
function decimals() public view returns (uint8)
Returns the total token supply.
function totalSupply() public view returns (uint256)
Returns the account balance of another account with address _owner.
function balanceOf(address _owner) public view returns (uint256 balance)
Transfers _value amount of tokens to address _to, and MUST fire the Transfer event. The function SHOULD throw if the message caller’s account balance does not have enough tokens to spend.
function transfer(address _to, uint256 _value) public returns (bool success)
Transfers _value amount of tokens from address _from to address _to, and MUST fire the Transfer event.
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success)
Allows _spender to withdraw from your account multiple times, up to the _value amount. If this function is called again it overwrites the current allowance with _value.
function approve(address _spender, uint256 _value) public returns (bool success)
Returns the amount which _spender is still allowed to withdraw from _owner.
function allowance(address _owner, address _spender) public view returns (uint256 remaining)
Events
MUST trigger when tokens are transferred, including zero value transfers.
A token contract which creates new tokens SHOULD trigger a Transfer event with the _from address set to 0x0 when tokens are created.
event Transfer(address indexed _from, address indexed _to, uint256 _value)
MUST trigger on any successful call to approve(address _spender, uint256 _value).
event Approval(address indexed _owner, address indexed _spender, uint256 _value)
- It creates a common language that wallets know how to interact with bringing the industry greatly increased interoperability.
- I am sure that I could look up any number of these, but some that were mentioned in the lecture were: totalSupply - sets the total number of tokens; balanceOf - gives the balance of an account; and transfer - transfers money from one account to another. This will require further exploration and detail when I get to the ERC20 courses.
1- ERC 20 standards generate interoperability in the ecosystem and facilitating the applications that make use of tokens the integration of these through standards.
This makes it easier for wallets and exchanges to support these tokens.
2- ERC 20 provides the methods of token transfer (transfer), approval or authorization of use of your tokens to another Ethereum address (profit), authorized token transfer from another Ethereum address (transferFrom), current balance query (balanceOf) and consultation of the amount of tokens possible to use on behalf of another Ethereum address (allowance). Additionally, there are two types of events (Transfer and Approval) that are triggered when a transfer or approval is made.
Excellent answers, It’s easy to understand. Please keep them like that
Carlos Z.
-
Using a standard code eliminates friction and allows interoperability between exchanges, wallets and web servers
-
totalSupply, number of fungible tokens, balanceOf(address account) specific balance of accounts, allows for ERC20 token transfers between another public address
- What are the benefits of setting a token standard like ERC20?
- it means that the token would be automatically supported by exchanges and wallets
- What functions are in the ERC20 Token Standard Interface and what do they do?
- for example:
totalSupply - number of tokens in circulation
balanceOf (address account) - to check the balance of a specific address
- What are the benefits of setting a token standard like ERC20?
If standards are set, it makes it possible for Exchanges and Wallets to support tokens following these standards from Day 1.
- What functions are in the ERC20 Token Standard Interface and what do they do?
- totalSupply() - Gives the token’s total supply.
- balanceOf(address account) - For checking the token balance in an address.
- transfer(recipient address, amount) - Transferring the token to the specifies address.
- What are the benefits of setting a token standard like ERC20?
Same standard means that all application can communicate easily with each other. It also allows uniform and fast transactions and wallets can provide token balances for different tokens. Exchanges can add new token easier because of a standard.
- What functions are in the ERC20 Token Standard Interface and what do they do?
-totalsupply - equals the sum of all balances
-balanceof () - provide the number of tokens held by a given address
-transfer - transfers a number of tokens directly to another address
-approve - token holder gives another address approval to transfer up to a certain number of tokens
-allowance - provides the number of tokens allowed to be transferred from a given address by another given address
1-the benefits are: allow walltes to exchange with all tokens and providing them balance.
2-balanceOf () Gives balance of a specific account, totalsupply
- The benefits are that the wallets, exchanges and other smart contracts can interact with each other in an easy way as the functions are named the same.
- totalSupply(), balanceOf(), approve(), transfer(), transferFrom(), etc…
-
What are the benefits of settling a token standard like ERC20?
A: The benefits of setting a token standard like ERC20 include that various tokens and ecosystems can be created on the same foundation as they can all speak to each other in “the same language”, also allowing for exchanges and wallets to easily transact. -
What functions are in the ERC20 Token Standard Interface and what do they do?
A: f(n) - totalSupply - shows the total supply of said token in the the network.
f(n) - balanceOf - shows the total of tokens in a particular 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!
Carlos Z.
- The benefits of setting a token standard like ERC20 includes creating the ability for all tokens that shares these same parameters to be able to more easily communicate with each other and connect to the same wallets and exchanges as other tokens. Without this standard, tokens would be more prone to manipulation from users building their own versions of the token.
- Some functions that are in the ERC20 interface include the total supply and balance functions that set universal conventions for calculating account balances and token supply.
-
It creates a way for everyone to communicate easily and effectively with each other
-
balanceof() provides the number of tokens held by an address
transfer() transfers funds from one address to another
approve() takes funds from holder and transfers a certain amount to a new address. This is used to transer a certain amount of funds for a certain purpose. This is more for creating and approving a transfer and then transferFrom() is used to actually make the transfer
allowance() checks to see how many tokens are allowed to be transferred for a specified action
- What are the benefits of setting a token standard like ERC20? they standardize all tokens. everything is the done the same way
- What functions are in the ERC20 Token Standard Interface and what do they do? they make and stardazie all tokens
-
What are the benefits of setting a token standard like ERC20?
The standard convention allows for ERC-20 tokens to be compatible with wallets, exchanges and other dApps. -
What functions are in the ERC20 Token Standard Interface and what do they do?
- totalSupply() shows total supply of a token;
- balanceOf(address) shows a balance of a token on a given address;
- allowance() function shows how many tokens can be transferred from a given address.
Homework on ERC20 token standard.Qs
-
What are the benefits of setting a token standard like ERC20?
That all Wallets, exchanges and tokens can communicate and be compatible with each other -
What functions are in the ERC20 Token Standard Interface and what do they do?
function total supply () - Shows the total supply of the token
function balance of (address) - Shows the balance of the specific address
function transfer (address) - Allows the transfer of tokens from and to an address