Great Tutorial, Can you please tell me what is the difference between the __allowances[msg.sender][__spender] and __allowances[__owner][msg.sender]? Who is owner here and who is the spender?
what if i give 2000 in the approve method… it would go through right ? as that line doesnt check whether the approved allowance is greater than total supply ? aftr that if i execute the transferFrom method with 2000, basically i will allow someone to take more than the total supply
HI-nice videos very useful .i have one doubt how to call deployed contract token balance from existing contract??how to transfer that tokens to some other address?
Hi, checked over many times to make sure I implemented all functions from ERC20, but still receive the error : This contract does not implement all functions and thus cannot be created.
__allowances mapping is confusing me. Why we need to specify our address while approving a value for spender to spend when we are the owner of the tokens? and Why we want to make a relation between owner and spender address? if any one can reply this please.
My understanding of decimals was that it was merely visual, and that if you put __totalSupply = 100000 and decimals = 3, that would tell outside software using the token that the coin has 100.000 units available, and being able to divide 1 individual unite 1000 ways. I noticed you did not use decimals in this fashion, does this mean I am incorrect or was it an accident in the video?
Hi, great series. Question: If you set up an ERC20 token for say XYZcompany, the person setting it up then has the private key and can send tokens at will to their private account. Doing it jointly with others just proliferates the problem.
Is it possible to have a mechanism that requires multiple sign-offs before large or frequent payments can be made?
Hi! Thank you for your tutorial, it is very helpful for noobs like me. I have a question. If you transfer a token to someone, is it necessary to reciepient to have an account/wallet for that kind of tokens? Thanks!
Greetings James, your tutorials are amazing and well structured. Please continue making such videos. I have a small doubt. Please help me out here. You have added indexed keyword in your events. How are indexed parameters in event different from those which are not?
In previous tutorials you talked about modifiers that for example limit certain functions to the owner of the contract. Might it also be prudent here to add isOwner modifiers to certain functions?
How does: function balanceOf(address _owner) constant returns (uint balance) { return balances[_owner]; } know that it should return the .value from request?
balances is a block of memory that stores uint which can be accessed by address. So when does these values get populated?
Many thanks great help with our ICO London's first peer to peer ridesharing service run by former Uber and Addison Lee drivers, if we wanted to pay in Eth for referrals to Blockchain Cabs from customers we would use what function?
Hi, While registering allowance for a spender, you are registering as __allowances[_owner][_spender] but while checking during transferFrom, you are checking as __allowances[_from][msg.sender], where _from would be the spender. Isn't this wrong? I tried testing, it did not work. So in transferFrom, I reveresed as __allowances[msg.sender][_from], which seems to be working. Please clarify. Here is the working test demo after correction:
Thank you for the awesome tutorial! I would like to ask if you can further explain the last 3 functions? Correct me if I’m wrong, but the transferFrom function means giving a user authority to transfer a certain amount of token from one user to another? Can you give an example where this is used? Thank you very much!
I just can not understand the allowance function? what is it used for? can you explain it a bit more?
Send erc20 code link please
Great Tutorial, Can you please tell me what is the difference between the __allowances[msg.sender][__spender] and __allowances[__owner][msg.sender]? Who is owner here and who is the spender?
What is the use of putting "__"(double underscore ) here instead of single underscore?How it is different and it's use case?
I think you forgot to decrement the allowances in transferFrom, which will render allowance method useless 🙂
Very thoughtful tutorial with a clear logic!
https://www.youtube.com/watch?v=cqZhNzZoMh8 Better check this video first
what if i give 2000 in the approve method… it would go through right ? as that line doesnt check whether the approved allowance is greater than total supply ?
aftr that if i execute the transferFrom method with 2000, basically i will allow someone to take more than the total supply
HI-nice videos very useful .i have one doubt how to call deployed contract token balance from existing contract??how to transfer that tokens to some other address?
So all balances along with related addresses are stored within a contract? How does a wallet of a transfer_to person know it has a token?
Why are the balances saved as uints if there is 18 decimal places?
Hi, checked over many times to make sure I implemented all functions from ERC20, but still receive the error : This contract does not implement all functions and thus cannot be created.
__allowances mapping is confusing me. Why we need to specify our address while approving a value for spender to spend when we are the owner of the tokens? and Why we want to make a relation between owner and spender address? if any one can reply this please.
A great work. thanks a lot. I have one question. Why totalSupply needs to be constant? what if we sold out all tokens and want to release more?
My understanding of decimals was that it was merely visual, and that if you put __totalSupply = 100000 and decimals = 3, that would tell outside software using the token that the coin has 100.000 units available, and being able to divide 1 individual unite 1000 ways. I noticed you did not use decimals in this fashion, does this mean I am incorrect or was it an accident in the video?
In transfer(), wouldn't it be better to use the standard require(), assert(), revert() checks instead of an if condition?
Hi, great series. Question: If you set up an ERC20 token for say XYZcompany, the person setting it up then has the private key and can send tokens at will to their private account. Doing it jointly with others just proliferates the problem.
Is it possible to have a mechanism that requires multiple sign-offs before large or frequent payments can be made?
It worked! Thank you!
Hi! Thank you for your tutorial, it is very helpful for noobs like me.
I have a question. If you transfer a token to someone, is it necessary to reciepient to have an account/wallet for that kind of tokens? Thanks!
adding constant means it doesnt alter state. What does that mean?
Greetings James, your tutorials are amazing and well structured. Please continue making such videos. I have a small doubt. Please help me out here. You have added indexed keyword in your events. How are indexed parameters in event different from those which are not?
transact to ERC20.transferFrom errored: Cannot read property 'op' of undefined
with code from Git…
In previous tutorials you talked about modifiers that for example limit certain functions to the owner of the contract. Might it also be prudent here to add isOwner modifiers to certain functions?
How does:
function balanceOf(address _owner) constant returns (uint balance) {
return balances[_owner];
}
know that it should return the .value from request?
balances is a block of memory that stores uint which can be accessed by address. So when does these values get populated?
Whats the difference between mapping(address => address) vs mapping(address => mapping(address => uint))
Many thanks great help with our ICO London's first peer to peer ridesharing service run by former Uber and Addison Lee drivers, if we wanted to pay in Eth for referrals to Blockchain Cabs from customers we would use what function?
Hi,
While registering allowance for a spender, you are registering as __allowances[_owner][_spender] but while checking during transferFrom, you are checking as __allowances[_from][msg.sender], where _from would be the spender. Isn't this wrong? I tried testing, it did not work. So in transferFrom, I reveresed as __allowances[msg.sender][_from], which seems to be working. Please clarify. Here is the working test demo after correction:
bit.do/testdemo_erc20_parthi2929
Thank you for the awesome tutorial! I would like to ask if you can further explain the last 3 functions? Correct me if I’m wrong, but the transferFrom function means giving a user authority to transfer a certain amount of token from one user to another? Can you give an example where this is used? Thank you very much!
I am putting together an ICO and needed some help with my token creation for a crowdsale. I'm reaching out if you would like to assist
Hey bud can we chat?
Could you please help on that last part – how to test it within Remix? How to prepare and pass the address to, say, balanceOf function?
Yes, I already noticed I missed the deduct allowance in the transfer from function, but I updated this in the github sources 🙂