In truffle console I am executing the following statement,
result = token.balanceOf(accounts[1])
This statement returns the following output.
<BN: 8ac7230489e80000>
As suggested here, I am trying to use toNumber()
and toString
. But I am getting the following error.
result = token.balanceOf(accounts[1])
result.toString()
output: '[object Promise]'
result.toNumber()
TypeError: result.toNumber is not a function
Help me to fix this thiis.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…