Can someone please provide a step by step guide to how to get my current ether balance from my geth wallet, to my new wallet? Super guide for dummies would be awesome.
I'm clearly no good at using the cmd prompt and I don't want to lose that ether.
Thank you!
0 ·
Comments
This is all from an Ubuntu perspective, so if you’re using Windows, you’ll need to adjust a bit.
A couple things to keep in mind:
Your address is associated with a keystore that is on your machine. The keystore in combination with your password will allow you to unlock your account so that you can send transactions.
From what I can tell, this whole deal works with units called wei instead of ether, which you might find surprising since we are ethmining. You will probably want to use ether as a unit since we can understand it more. There are functions to convert from wei to ether (web3.fromWei) and from ether to wei (web3.toWei) which I’ll use below.
You need to be careful when you do cut and paste with anything that uses “ and ‘ because they don’t always come across the same way. For some reason, my computer likes to change them to different versions of apostrophes and such. Whenever I cut and paste, I go back and re-type the “ so that it comes out.
You need to unlock your account before you can actually send anything out.
I generally use geth attach to send ETH out, but there are other ways as well. You need to have geth running in another terminal window already.
From Ubuntu prompt:~$ geth account list
This tells you your accounts, presumably you have just one, but you can have several if you want.
Below is a transfer I made:
:~$ geth attach
Welcome to the Geth JavaScript console!
It will list a few lines of information, including your account number here. If your account number which is called coinbase. If that is what you expect, then you are all set.
This will give you your balance (in units of ether)
> web3.fromWei(eth.getBalance(eth.coinbase),"ether")
1.35822727
First I try to send, but it says that the account is not unlocked.
> eth.sendTransaction({from: eth.coinbase, to: "0x8F3e5B7c30BA103e4d1a78312B7c53eeAD726e01", value: web3.toWei(1.00, "ether")})
Error: authentication needed: password or unlock
at web3.js:3104:20
at web3.js:6191:15
at web3.js:5004:36
at :1:1
This command unlocks the account. It prompts for the password which you type in without seeing it. The true means that it accepted the password. If you fail, try it again, but be more careful.
> personal.unlockAccount("e451e767bed70ba82dccaeaabc38d3258cce5b8f")
Unlock account e451e767bed70ba82dccaeaabc38d3258cce5b8f
Passphrase:
True
This time the transfer will work and it gives you a long transaction number that you can track to see the transfer go through.
> eth.sendTransaction({from: eth.coinbase, to: "0x8F3e5B7c30BA103e4d1a78312B7c53eeAD726e01", value: web3.toWei(1.00, "ether")})
"0x6f1cbb8fcda869b7a90f4072a14f4................4fe226d4cfc5cdd510"
Feel free to message if you run into problems.
I always tried geth console (but this doesnt work in a second ubuntu-console).
Now i have one more question: When i unlock the account, how long will it be unlocked? Will ich be locked later automatically? And can somebody else access my account while it is unlocked?
@SchließMuskelKater I had the same question about it being unlocked. What I did was opened a new wallet, in my case Exodus and transfered my entire balance to that wallet. Then I pointed my miner at the Exodus wallet and have stopped using my Geth wallet altogether.
Good luck!
And another question that didn't figured out yet: I created with geth account new my first account on my mining-computer but i would like to manage this account also on my notebook. How do i exactly import it to geth on my notebook? (didn't understood it in this documentation https://github.com/ethereum/go-ethereum/wiki/Managing-your-accounts )
Thanks in advance!
And to re-lock your account, simply exit out of Geth console and the account is locked again.