0% found this document useful (0 votes)
49 views

Sending Ether To Other Account

This document outlines steps to send Ether between accounts in Ethereum. It shows how to check the balance of an account in Wei and Ether, list all accounts, unlock an account, create a transaction to send 4 Ether from the first account to the second, and check that the second account's balance increased after mining the transaction.

Uploaded by

fintech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Sending Ether To Other Account

This document outlines steps to send Ether between accounts in Ethereum. It shows how to check the balance of an account in Wei and Ether, list all accounts, unlock an account, create a transaction to send 4 Ether from the first account to the second, and check that the second account's balance increased after mining the transaction.

Uploaded by

fintech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

4.

Sending Ether to other account


1. Getting Balance in Wei
>eth.getBalance(eth.coinbase)

2. Getting Balance in eth

>web3.fromWei(eth.getBalance(eth.coinbase), "ether")

3. check th balance in account1


>eth.getBalance(eth.accounts[1])

4. Print the list of accounts


>eth.accounts

5. Create transaction to send 4 ether from account_0 to account_1

>personal.unlockAccount(eth.accounts[0])
>eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(4,"ether")})
>eth.getBalance(eth.accounts[1])
>miner.start(4)
>miner.stop()
>eth.getBalance(eth.accounts[1])

You might also like