I am executing commands from a tutorial at:
I am executing the command:
> truffle(ganache)> balanceInEth = address =>
> web3.fromWei(getBalance(address).toString())
I am getting the message:
[Function: balanceInEth] truffle(ganache)> balanceInEth(victim.address) evalmachine.:0 balanceInEth = address => web3.fromWei(getBalance(address).toString()) ^
TypeError: web3.fromWei is not a function at balanceInEth (evalmachine.:0:32) at evalmachine.:0:1 at sigintHandlersWrap (vm.js:98:15) at ContextifyScript.Script.runInContext (vm.js:56:12) at runScript (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:465120:21)
Somebody please guide me.
Zulfi.
web3.utils.fromWei
.