Replies: 1 comment
-
Resolved by #329. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The problem
The issue #326 and the post reported that hardhat failed to deploy upgradeable contract to xdc blockchain. Below is the error message:
I found the user is using @openzeppelin/hardhat-upgrades v2 and ethers v6. The problem was gone after downgrade to @openzeppelin/hardhat-upgrades v1 and ethers v5. So the user closed this issue.
There are same issues on hardhat:
Further research
The error
too many arguments, want at most 1
is reported by the functionparsePositionalArguments
in file rpc/json.go:I debugged the input parameter
rawArgs
in my development environment, found is error is triggered by an extra field "pending" inrawArgs
array:rawArgs
has a field "pending":rawArgs
has no field "pending":So it is that xdc blockchain can't handle the extra field "pending".
More tests
From the output of hardhat, it's
estimateGas
trigger the error. The following tests showed that the method eth_estimateGas does not support "pending", but the method eth_call support "pending".1. test eth_estimateGas with field "pending"
request:
respond with error:
2. test eth_estimateGas without field "pending"
request:
works fine:
3. test eth_call with field "pending"
request:
works fine:
Conclusion
We must enhance the method eth_estimateGas first, make it support "pending". Then we can continue to test the latest @openzeppelin/hardhat-upgrades and ethers.
Beta Was this translation helpful? Give feedback.
All reactions