Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

web3.toAscii is not a function

I'm try to convert the Bytes32 data to a string in Ethereum (Smart Contract), by using web3.toAscii. However, it throws me an error (web3.toAscii is not a function). Just wondering if this a known issue or a bug in web3 API?

like image 245
DavidB Avatar asked Dec 11 '25 16:12

DavidB


1 Answers

Yes, the beta version of web3 doesn't support web3.toAscii, just use web3.utils.toAscii

like image 195
byal Avatar answered Dec 14 '25 14:12

byal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!