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 Answer 1

1

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

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

2
  • Thanks, this indeed was the problem. What is a use-case for TransferFrom though?
    – nizzle
    Mar 15, 2018 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. Mar 15, 2018 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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