-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid bytes string given: 0x when using self hosted geth node #2509
Comments
I've tested it on different nodes with calling the balanceOf directly after the deployment and with a already deployed contract and couldn't reproduce this behavior. There is already an open issue in the infura repository (INFURA/infura#157) about this. I'will close this issue and will watch the issue of infura. @russanto I will test your issue asap. |
Hi @nivida this issue only occurs on GETH nodes and it is working fine with INFURA. By the way, have you tried the gist that I've provided? Upon testing the issue still persist on beta 50. Thanks |
I'm having this issue too.
|
Description
We always encounter this error
Invalid bytes string given: 0x
when performing using our self hosted geth node, but this error is not present when we are using Infura.Expected behavior
Using Infura the value of
bytes
onweb3-eth-abi.cjs.js
line66
is0x000000000000000000000000000000000000000000000000006a94d74f430000
and we're able to get the current balance of the erc20 tokenActual behavior
With our self hosted geth, the value of bytes we get is:
0x
which causes this errorInvalid bytes string given: 0x
Steps to reproduce the behavior
Use this gist which performs balance checking of the erc20 token https://gist.github.com/joeneldeasis/4b72f1923e3a4bdfc356148a79257ede then change the provider to your own Geth node which the error occurs, this code only works when you are using Infura.
Error Logs
Gists
Versions
The text was updated successfully, but these errors were encountered: