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?

Mindful
  • 393
  • 1
  • 4
  • 12

1 Answers1

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?

Aniket
  • 3,545
  • 2
  • 20
  • 42