- What are the benefits of setting a token standard like ERC20?
A; it makes the system frictionless, because now all tokens are coded in the same fashion so they can communicate and interact with each other. it also means that wallets and exchanges can interact with newly created tokens from day 1, if they abide by the standard. this also makes adoption easier since exchanges and wallets won’t have to talk differently to the new coins. - What functions are in the ERC20 Token Standard Interface and what do they do?
A: Balance of() 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
allowance()
function provides the number of tokens allowed to be transferred from a given address by another given address
It allows tokens to communicate easier with other currencies, exchanges, and wallets.
totalSupply = the total number of tokens
balanceOf = how much is in the wallet
transfer = transferring $ to an address
Imagine if nerds were still fighting about Java and what was better. We would still be looking at pictures of peoples food they are about to eat.
- what are the benefits of setting a token standard like ERC20 ?
- everyone can communicate via code through wallets , because their is a common language in the code
- balanceOf , gives the balance of any specific account, total supply communicates the total number of fungible tokens
-
What are the benefits of setting a token standard like ERC20?
Wallet and exchange are able to read immediately and accept every token based on the ERC20 Standard -
What functions are in the ERC20 Token Standard Interface and what do they do?
Found the information on this website https://medium.com/blockchannel/the-anatomy-of-erc20-c9e5c5ff1d02
Standards are important so everyone is building smart contracts the same which allows for exchanges & wallets to operate the same on each the conform to the standard. Makes it easier and more efficient to build out many applications on a network.
get_balance and transfer are two functions in a ERC20 token. Functions like these set a standard so that all ERC20 tokens can be managed the same way.
Homework on ERC20 token standard.
What are the benefits of setting a token standard like ERC20?
Basically we can build applications that can talk to each other achieving integration & interoperability.
ERC20 tokens allow tokens to operate on exchanges and wallets seamlessly.
This is how we reach efficiency > The economy is efficient if has no friction.
What functions are in the ERC20 Token Standard Interface and what do they do?
function totalSupply() public view returns (uint);
totalSupply: Returns the total circulating amount of tokens.
function balanceOf(address tokenOwner) public view returns (uint balance);
balanceOf: Returns how many tokens exist in an account.
function transfer(address to, uint tokens) public returns (bool success);
transfer: Transfer an amount of tokens from token owner’s account to another account.
function approve(address spender, uint tokens) public returns (bool success);
approve: A token owner can approve for spender to transferFrom tokens from the token owner’s account.
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
allowance: Returns the amount of tokens approved by the owner that can transferred to the spender’s account.
function transferFrom(address from, address to, uint tokens) public returns (bool success);
transferFrom: Allows a spender account to transfer an amount of tokens on behalf of the token owner to another account.
- What are the benefits of setting a token standard like ERC20?
It simplifies writing software that interacts with ERC-20 tokens by standardising the programming interface. For instance an exchange writes code for ERC-20 tokens only once and does not need code specific to each and every token it wants to support.
- What functions are in the ERC20 Token Standard Interface and what do they do?
Some functions return information, such as
- totalSupply (total units of token in existence),
- balanceOf (balance of given account) and
- allowance (remaining amount that spender is approved to withdraw from owner)
Other functions are used to control transfer of tokens from an account to another:
- transfer,
- transferFrom,
- approve
The interface also provides 2 events:
- Transfer (upon successful transfer) and
- Approval (successful call to approval)
- Compatibility/Support between tokens, wallets, and exchanges.
- balanceOf(address account) shows the balance in an account, totalSupply() shows the number of fungible tokens
- What are the benefits of setting a token standard like ERC20?
Allows wallets and exchanges to be programmed using Standard. Simple and Scalable. - What functions are in the ERC20 Token Standard Interface and what do they do?
ERC20 standard Function is Total Supply (how many are in circulation)
balanceOf (Finds balance of address)
transfer (Transferes tokens to addresses)
-
being that ERC20 tokens are all the same (fungible), it is imperative that a token standard is set to allow the interoperability of the ecosystem. a standard allows smart contracts to interact with all tokens, as well as allow layered smart contract scalability. overall, it promotes growth in the ecosystem and enables creative innovation.
-
totalSupply() represents maximum number of tokens that exist
balanceOf(address account) represents a public address’ balance of ERC20 tokens
transfer() allows the transfer of ERC20 tokens to another public address
-
the benefit is that all nodes will be able to communicate with each other because they use the same standard. e.g. If one programs a “token” by a different standard, only other nodes who use that standard (if any) can communicate with it.
-
totalSupply = how many tokens are in circulation.
balanceOf = to get the balance in specified account
transfer = for transferring
We also have allowance but let’s skip that lol
- Entities have a universal way to communicate with each other.
- ADD, MULTIPLY, etc.
- All applications can talk with each other because they have a same standard.
- *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
*approve() and transferFrom()
*allowance() function provides the number of tokens allowed to be transferred from a given address by another given address
- What are the benefits of setting a token standard like ERC20?
With a token standard, everyone formats and programs their token according to a specific standard. This makes it easier to use and implement these tokens on a widespread network because wallets and other related devices can be geared towards being applicable to all of a specific type of token, since all of those tokens follow a given standard. This all increases efficiency. - What functions are in the ERC20 Token Standard Interface and what do they do?
There is totalSupply which shows the number of tokens in circulation, there’s balanceOf which checks the balance of any address that is queried and there is transfer which allows someone to transfer their tokens to another address.
Answers to Homework on ERC20 token standard.
-
What are the benefits of setting a token standard like ERC20?
By use a standard, “different” applications can talk to each other. Standards use f.ex. specific functions built in, that is not possible to modify.
The standard function can then be used across multiply Tokens.
This allows the community be reliant and integrated, where the whole space can communicate with each other.
-
What functions are in the ERC20 Token Standard Interface and what do they do?
- totalSupply() = will show how many tokens are in circulation.
- balanceOf(address account) = It gives the address of the account that shows how much Balance this specific account has.
- Setting standards allows a common platform to communicate while dealing with wallets and exchanges.
- total supply - how many tokens are in circulation
balanceOf - shows account balance
transfer - allows transactions
transferFrom - allows transactions between wallets
approve- allows another account to withdraw
allowance - used to set withdrawal amount
1. What are the benefits of setting a token standard like ERC20?
- Consistency
- Compatability
- Ease of programming/communication/code review between people/projects
- Ease of interaction with exchanges, wallets, tools
2. What functions are in the ERC20 Token Standard Interface and what do they do?
From: https://ethereum.org/en/developers/docs/standards/tokens/erc-20/
(and github for comments of what each does)
https://eips.ethereum.org/EIPS/eip-20 - has better definitions
function name() public view returns (string)
* Returns the name of the token
function symbol() public view returns (string)
* Returns the symbole of the token
function decimals() public view returns (uint8)
* Returns the number of decimals used to get its user representation - just for display
function totalSupply() public view returns (uint256)
* Returns total circulating supply
function balanceOf(address _owner) public view returns (uint256 balance)
* Balance of account
function transfer(address _to, uint256 _value) public returns (bool success)
* Trasfer amount (_value) to a address, the caller address must have balance available
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success)
* Transfer from address ... to address .. X amount and confirms the both addresses are non-zero
And the sender must have enough balanec.
function approve(address _spender, uint256 _value) public returns (bool success)
* checks the 'spenders' address that they have enough balance
function allowance(address _owner, address _spender) public view returns (uint256 remaining)
* Returns the amount which _spender is still allowed to withdraw from _owner
- Allows wallets to provide token balances for hundreds of different tokens and creating a means for exchanges
to list more tokens by providing nothing more than the address of the token’s contract. - totalSupply() - number of tokens that exist
balanceOf(address account) gives a public addres balance of ERC20 tokens
transfer() allows someone to transfer their ERC20 tokens to another address
-
What are the benefits of setting a token standard like ERC20? The benefits are that standards brings uniformity and fungibility to tokens. It makes it easier for wallets and exchanges to support tokens.
-
What functions are in the ERC20 Token Standard Interface and what do they do? There is the total supply function that lets you know how many tokens are in circulation. There is the balance of function, that lets you know the balance of a certain address.