Timeline for transferFrom error. Exception thrown in smart contract transaction
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 14, 2020 at 11:15 | comment | added | Hackeerrrr | In remix to call a function by address, just change the account(mentioned top left ) and then call the transferFrom function. Hope this helps | |
Apr 14, 2020 at 11:14 | comment | added | Hackeerrrr | This link is a great place to start. It is the original proposal which introduces these ERC20 tokens. This link implements these functions(included for your reference) | |
Apr 14, 2020 at 10:14 | comment | added | WR10 | I think see my main problem, namely which address is calling function. I thought all calls are invoked by contract owner and he needs to sign the transaction with his private key. Do you know source when it is explained how it exaclty works? Thanks in advance | |
Apr 14, 2020 at 9:55 | comment | added | WR10 | Sorry but I don't know how to call function as B, I don't own this address and don't have its private key. | |
Apr 14, 2020 at 8:46 | comment | added | Hackeerrrr | Try the following: Open your remix ide and deploy the contract with the 1st address(let's call it A). Now call the apporve function where delegate is address 2(let's call it B). Now call allowed function where address1 = A and address2 = B.Call it and see the output. It must be nonzero. If it is, then call transferFrom with address B where owner = A, buyer = some other address , numTokens = approved token number | |
Apr 14, 2020 at 8:38 | comment | added | Hackeerrrr | Tokens are subtracted from owner 'A'. Approve means token owner(in this case 'A') allows someone else (in this case 'B') to transfer his token by someone else | |
Apr 14, 2020 at 8:25 | comment | added | WR10 | I changed mappings to public, approved 1000, called allowed - returned 1000 but transferFrom failed. | |
Apr 14, 2020 at 7:55 | comment | added | WR10 | I am fresh in this whole thing so let me clear. I am testing and calling all these functions from remix IDE as owner 'A', I guess. If transferFrom where owner was 'A', buyer was 'C' are called by 'B' from which address are substracted tokens? | |
Apr 14, 2020 at 5:56 | history | answered | Hackeerrrr | CC BY-SA 4.0 |