A function in my contract when called on the truffle develop command line gives output in BigNumber format. Here is what I wrote on the command line:
instance = contract.at('deployed address')
instance.getAge()
I tried instance.getAge().toNumber() but that throws an error saying that toNumber isn't defined. I checked How to convert BigNumber to Number in Truffle framework? however that doesnt seem to work on command line.
Similary outputs from functions returning bytes32 are in hex.I checked web3 return bytes32 string but web3.utils.toAscii(x) {x is any variable}
throws an error
"Cannot read property toAscii of undefined"
I read the stack related to that and that also didn't help.