When i used web3.toAscii
I received the following error :
I think the reason is my web3 version i.e. '1.0.0-beta.34'
If so, is there any alternative command for web3 version 1 for the following command ?
transaction = web3.eth.getTransaction('0x0c485e0f155f7f216d06e70ef85b684392c9b190c2f7c0af67ec1b56d6945498')
input = web3.toAscii(transaction.input)
console.log(input)
I also used following command :
web3.utils.hexToAscii(0x0c485e0f155f7f216d06e70ef85b684392c9b190c2f7c0af67ec1b56d6945498)
However, I receive the following error :
That mean its input cannot be a transaction hash.
Best Answer
The equivalent should be web3.utils.hexToAscii