0

I got following result from getBalance check: truffle(default)> web3.eth.getBalance('xxxxxxxxxxxxxxx')

Can anyone explain what does it means and where the value of ether: BigNumber { s: 1, e: 0, c: [ 0 ] }?

0

You need to convert the BigNumber into a string to have a readable value

web3.eth.getBalance('xxxxxxxxxxxxxxx').toString()

the output value would be in wei.

You can use web3.fromWei(number, unit) to convert it in another unit (eg. ether). ref

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.