[Ethereum] MIST – How to send all coins in account

accountsbalancesethermist

Mist shows that I have 1 ETH in my account. When I check etherscan see exactly 0.99895 ether in my account….

I would like to send all 0.99895 ether to another address. When I try to send exactly that amount, I get an error saying not enough funds.

MIST also shows me "0.00105 ETHER FEE". When I deduct that from the total (try to send 0.99790) it also tell me not enough funds.

How on earth do I sent this entire amount? Thanks!

Best Answer

In order to send Ether, you need to pay a transaction fee of 21k gas (more if you are sending to or from a contract-based wallet).

Mist rounds some Ether values, so it is very difficult to send exactly the amount in your wallet. To send roughly the amount you want, just lower the transaction value by 0.0001 ETH or so, or reduce the transaction fee by sliding the "select fee" slider left.

If you really want precision, you can use the command line client that is packaged with Mist. Open up your command line, and cd into the ./resources/node/geth/ directory. Then run

./geth --exec "eth.sendTransaction({from:'0xADDRESS',to:'0xRECIPIENT',value:eth.getBalance('0xADDRESS')-21000*50000000000-1,gas:21000,gasPrice:50000000000})" --unlock '0xADDRESS' console

Replace both instances of ADDRESS and RECIPIENT with your address and the recipient's address respectively. Leave the quotation marks.