Invalid hex string in json-rpc-provider #2579
Replies: 8 comments
-
I just started having this same issue too, only slightly different hex string value:
It also is preventing me from interacting with any of my contracts. I had a test suite of known-working tests that now all fail with this same error message. I have reinstalled NodeJS and all of my dependencies from scratch but was unable to resolve the issue. |
Beta Was this translation helpful? Give feedback.
-
@c194 are you on hardhat as well? I might try truffle to see if it makes a difference. |
Beta Was this translation helpful? Give feedback.
-
@Augustinio Yes - in my case, I had set |
Beta Was this translation helpful? Give feedback.
-
same problem here
Reinstall not helping
|
Beta Was this translation helpful? Give feedback.
-
OMG, i am fiugured out. Solved by replacing |
Beta Was this translation helpful? Give feedback.
-
I don’t think ethers does any maths on values, so it shouldn’t be overflowing anything. I do recall hardhat does some math to accommodate intrinsic gas costs or something like that? |
Beta Was this translation helpful? Give feedback.
-
That sounds like a possible source for this error. We are disabling that functionality by default pretty soon. More info: NomicFoundation/hardhat#2159 |
Beta Was this translation helpful? Give feedback.
-
Solved by replacing gasPrice property in network configuration (hardhat.config.js) by gasLimit. This means documentation on BNB Test net (https://docs.bnbchain.org/docs/BSCtestnet) is misleading and caused this error. By default settings should be working. It was giving error while deploying the contract, and when changed the gasPrice to gasLimit (which make sense too) issue got resolved and contract got deployed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Whenever I try to call a method from a deployed contract I get the following error:
Reproduction steps
It happens on all contracts I dfeploy. Including on both Ganache and Rinkeby. Although it does not always happen on Rinkeby (there's times that it works fine).
Environment:
Node v17.1
Windows 10
Ganache 2.5.4
Package:
Search Terms
Hexlify, invalid_argument, negative hex string, json-rpc-provider
Beta Was this translation helpful? Give feedback.
All reactions