We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If we try to estimate gas for a contract deployment with a payable constructor, the web3 module reverts instead of returning a proper gas value.
We have a simple contract:
pragma solidity ^0.8.24; contract PayableConstructor { constructor() payable {} }
The bytecode is:
0x6080604052603e80600f5f395ff3fe60806040525f80fdfea2646970667358221220a38ca427a091f1d38af455b9ec034fe31be0290310c3e2888017a1fce83553d464736f6c634300081a0033
{ "value":1000000, "estimate": true, "from":"0x6e5d3858f53fc66727188690946631bde0466b1a", "data":"0x6080604052603e80600f5f395ff3fe60806040525f80fdfea2646970667358221220a38ca427a091f1d38af455b9ec034fe31be0290310c3e2888017a1fce83553d464736f6c634300081a0033" }
it reverts with a:
{ "_status": { "messages": [ { "message": "Bad Request", "detail": "to field must not be empty", "data": "" } ] } }
{ "estimate": true, "from":"0x6e5d3858f53fc66727188690946631bde0466b1a", "data":"0x6080604052603e80600f5f395ff3fe60806040525f80fdfea2646970667358221220a38ca427a091f1d38af455b9ec034fe31be0290310c3e2888017a1fce83553d464736f6c634300081a0033" }
then we get a expected result:
{ "result": "0x000000000000e228" }
I also tried passing "to" as a null or empty string but it failed again.
No response
testnet
None
The text was updated successfully, but these errors were encountered:
kselveliev
Successfully merging a pull request may close this issue.
Description
If we try to estimate gas for a contract deployment with a payable constructor, the web3 module reverts instead of returning a proper gas value.
Steps to reproduce
We have a simple contract:
The bytecode is:
it reverts with a:
then we get a expected result:
I also tried passing "to" as a null or empty string but it failed again.
Additional context
No response
Hedera network
No response
Version
testnet
Operating system
None
The text was updated successfully, but these errors were encountered: