Brad Lucas

Programming, Clojure and other interests
August 17, 2017

Send Eth From Geth Console

A log of a session showing how to check account balances and then send ETH. In this example I'm running a geth console on a local node and I want to send 10 ETH to two different accounts.

First, I list the accounts and then see how much ETH I have in the default account.

> personal.listAccounts

> web3.fromWei(eth.getBalance(eth.coinbase)); 

Before attempting to send I need to unlock the account. This prompts you for your password.

> personal.unlockAccount(eth.coinbase)

Then I send 1 ETH to each account.

> eth.sendTransaction({from:eth.coinbase, to:"0xd60e64afb753583941e1ab42f836ced0d23af2db", value: web3.toWei(1, "ether")})

> eth.sendTransaction({from:eth.coinbase, to:"0xf0c7452279d382dc41f7fb9fb59203bcb5a4239a", value: web3.toWei(1, "ether")})

Followed by another 9 to each account.

> eth.sendTransaction({from:eth.coinbase, to:"0xf0c7452279d382dc41f7fb9fb59203bcb5a4239a", value: web3.toWei(9, "ether")})
> eth.sendTransaction({from:eth.coinbase, to:"0xd60e64afb753583941e1ab42f836ced0d23af2db", value: web3.toWei(9, "ether")})

You can use the transaction hash returned from each sendTransaction to verify the transaction over on Etherscan. If you developing and trying things out on the testnet use this Etherscan/Ropsten.

Tags: geth ethereum