0

Real simple question, actually... I have this contract :

https://ropsten.etherscan.io/address/0x5a7c68255698d64f07C38D6DF3d5bea073328da1

I'm trying to send tokens around some accounts, but they keep failing. I cannot figure out if i'm using the wrong addresses or if the amount is wrong.

How do I go about debugging this? (I use Web3, nodejs )

1

Try using the transfer() function directly, not transferFrom().

transferFrom() should be used when there are tokens approved for your account.

| improve this answer | |
  • Thanks, this indeed was the problem. What is a use-case for TransferFrom though? – nizzle Mar 15 '18 at 11:41
  • 1
    transferFrom() is used when somebody else approved an allowance for you and you spend their tokens. But the tokens are always in their posession. They can approve multiple accounts to spend their tokens. – Daniel Luca CleanUnicorn Mar 15 '18 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.