- All coins tokens can interact with each other.
2.totalSupply() - Total supply of tokens.
balanceOf() - Amount balance.
transfer()- Recipient of transaction.
2.totalSupply() - Total supply of tokens.
balanceOf() - Amount balance.
transfer()- Recipient of transaction.
What are the benefits of setting a token standard like ERC20?
That all developers are programming their code to certain requirements and making it efficient and easy for all users, dexs, platforms etc to easily see balance, owners etc.
What functions are in the ERC20 Token Standard Interface and what do they do
Totalsupply - total supply of holder
BalanceOf - accepts address returns balance uint
Allowance - gives allowance to user to spend tokens
Approve - approve user to spend a certain amount of tokens
Transfer - transfer tokens from - to
Transferfrom - transfer tokens from, to, amount (needs approval)
It ensures there’s a frictionless coding economy. If everyone’s using the same language it’s easier to communicate.
The totalSupply() function tells you how much total tokens exist.
The balanceOf(account address) gives you a balance of ERC20 tokens from a public address.
transfer() allows someone to transfer their ERC20 tokens to another public address.
ERC-20 has many benefits:
balanceOf()
provides the number of tokens held by a given address.
transfer()
sends a number of tokens directly from the message sender to another address. Note that there are no checks made on the recipient address, so it is incumbent on the sender to ensure that the recipient is as intended.
approve()
programs tokens to be sent when a condition is met.
allowance()
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?
ERC20 tokens provide a common standard to create tokens on the Ethereum Blockchain which makes communication and integration way easier.
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. Note that anyone can query any address’ balance, as all data on the blockchain is public.
The transfer() function transfers a number of tokens directly from the message sender to another address.
approve() and transferFrom() are two functions that allow the above scenario to work using a two-step process.
The 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?
It allows all tokens built on that standard to be interoperable and communicate with each other frictionlessly
What functions are in the ERC20 Token Standard Interface and what do they do?
A// It defines how we all program , it makes communication and integration easier in the momento of creating tokens on the ethereum network.
A// Function totalSupply(): it give you how many tokens are in circulation.
Function balanceOf(): To get the balance of the account.
Homework on ERC20 token standard.
What are the benefits of setting a token standard like ERC20?
It makes it easy for different exchanges and wallets to interact with all tokens deployed with ERC20
What functions are in the ERC20 Token Standard Interface and what do they do?
totalsupply() - tells the total supply of the token
transfer() - transfers token from wallets to wallets
balanceOf() - Tells the remaining token a wallet is holding.
The account model doesn’t require much space as the UTXO model, why is that a benefit? This means exchanges and wallets will support this standard
How is the account model not as great as the UTXO model for privacy? Total supply of tokens- provides an exact amount of supplied tokens.
Balance- provides the balance of a wallet
balanceOf(address account) = account balance
transfer(address recipient, unit256 amount) = This function lets the owner of the contract send a given amount of the token to another address just like a conventional cryptocurrency transaction.
allowance = allowance(address _owner, address _spender) constant returns (uint remaining); = shows how many tokens are allowed to be transferred
1 having a standard like ERC20 makes all the tokens easily compatible for different exchanges, wallets and dapps
2 totalsupply() lets you see the total supply of a token
balanceof() lets you see how many tokens a wallet is holding
Having a token standard like ERC20 has a lot of benefits, being the most important one the fact that there is a standard language that all the applications use and allows them to communicate with each other. It also allows wallets and exchanges to adopt the tokens easily. It is beneficial for the community, for the space and it significantly increases efficiency.
There are a lot of different standard functions in the ERC20 standard (which is a standard for fungible tokens). The two examples given in the video are totalSupply() which gives you the total amount of tokens in circulation and the balanceOf(address account) function that gives you the balance of the specified address acount.