How to read the ETH value and other token values from an account?

0 votes

Let's say I've created an Ethereum account using this code:

web3.eth.accounts.create();
> {
    address: "0xb8CE9ab6943e0eCED004cDe8e3bBed6568B2Fa01",
    privateKey: "0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709",
    signTransaction: function(tx){...},
    sign: function(data){...},
    encrypt: function(password){...}
}

How do I connect (unlock) to that account later and see all the ETH and other tokens it contains?

Oct 22, 2018 in Blockchain by digger
• 27,620 points
22 views

1 answer to this question.

0 votes

You can do this

eth.accounts shows you all known accounts. To unlock and see balance of the first one:

> personal.lockAccount(eth.accounts[0])
> eth.getBalance(eth.accounts[0])
answered Oct 22, 2018 by Omkar
• 67,120 points

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer

How to prevent the smart contract from being modified and deployed in the blockchain network?

To expand on Matthew's answer, each state ...READ MORE

answered Jul 5, 2018 in Blockchain by ariaholic
• 7,320 points
39 views
0 votes
1 answer
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
105 views
0 votes
1 answer
0 votes
1 answer

UnhandledPromiseRejectionWarning: Insufficient funds error in Ethereum: NodeJS web3

sendSignedTransaction returns a promiEvent onto which you can chain then and catch: web3.eth.sendSignedTransaction('0x' + ...READ MORE

answered Oct 15, 2018 in Blockchain by Omkar
• 67,120 points
126 views
0 votes
1 answer
0 votes
1 answer

Hyperledger: How to update values from an asset?

This should work: return getAssetRegistry('org.rytle.Route').then(function(ar) { ...READ MORE

answered Nov 6, 2018 in Blockchain by Omkar
• 67,120 points
228 views