2

I'm simply trying to transfer ETHER to a smart contract deployed on testrpc:

web3.eth.sendTransaction({to: "0xdbf5c15f21ae03f0e33c9058d3823d4e74a35be3", value: web3.toWei(100, "ether")});

Quering information from the contract works fine. Thus the address should be alright. However whenever I execute sendTransaction, I get this error:

Error message in console

Any suggestions what I can try to make this work?

2

Either add from:eth.coinbase, before to: in your sendTransaction command or run web3.eth.defaultAccount = web3.eth.coinbase on your client terminal.

See this : Cannot perform write functions in smart contract - invalid address?

|improve this answer|||||
  • Thx a lot. Now it works! – Mindful Apr 27 '17 at 9:04

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.