1

I've mined Ether and it has gone into a wallet that I created using geth. When I look online, people say to use eth.sendTransaction({from: 'address', to: 'address', value: web3.toWei(1, "ether")}), however I'm not sure how to use this command on Windows.

1

The line you mention comes from the JavaScript library web3.js. If you want to use geth you first need to sync it to the blockchain. For this do. the following:

  1. Start geth from the windows console
  2. wait about a minute, then start geth attach from a second windows console.
  3. on the second console, enter eth.syncing. As long as you see numbers here, the sync is still in progress. When the sync is finished, you see false.

When the sync is finished enter eth.sendTransaction(from, to, value) to send Ether. Note that prior to using this line, you need to unlock your account using personal.unlockAccount(address).

1
  • When I call eth.sendTransaction in that fashion, I get the following error: "Error: invalid address at web3.js:3930:15 at web3.js:3756:20 at web3.js:5025:28 at map (<native code>) at web3.js:5024:12 at web3.js:5050:18 at web3.js:5075:23 at <anonymous>:1:1" The syntax for sending a transaction looks like this: eth.sendTransaction({from:eth.accounts[0], to:"0x005080F78567F8001115F1eee835DD0151BEA476", value: web3.toWei(1, "ether")})
    – Ann Kilzer
    Aug 27 '19 at 2:53

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.