Skip to content
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

eth_estimateGas requires data parameter, which is not required by spec #5352

Open
AlexeyKrasnoperov opened this issue Feb 27, 2025 · 0 comments · May be fixed by #5357
Open

eth_estimateGas requires data parameter, which is not required by spec #5352

AlexeyKrasnoperov opened this issue Feb 27, 2025 · 0 comments · May be fixed by #5357
Assignees
Labels
Type: Bug Something isn't working

Comments

@AlexeyKrasnoperov
Copy link
Member

AlexeyKrasnoperov commented Feb 27, 2025

Describe the bug

eth_estimateGas, when called with parameters
[{"to":"0x0000000000000000000000000000000000000000"}],"id":1}
is throwing an error missing field 'data'.

data is not a required param, according to the documentation: https://www.quicknode.com/docs/ethereum/eth_estimateGas

To reproduce

  1. Run forest locally
  2. Make a request
curl 'http://localhost:2345/' \
> -H 'Content-Type: application/json' \
> --data-raw '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{"to":"0x0000000000000000000000000000000000000000"}],"id":1}'
  1. See error

Log output

{
   "jsonrpc":"2.0",
   "id":1,
   "error":{
      "code":-32602,
      "message":"JSON-RPC error:\n\tcode: -32602\n\tmessage: error deserializing parameter\n\tdata: {\"error\":\"missing field `data`\",\"index\":0,\"name\":\"tx\",\"type\":\"forest::lotus_json::LotusJson<forest::rpc::methods::eth::types::EthCallMessage>\"}\n"
   }
}

Expected behaviour

eth_estimateGas should not require a data parameter.

Environment (please complete the following information):

  • OS: not relevant
  • Branch/commit: main
  • Hardware: not relevant
@AlexeyKrasnoperov AlexeyKrasnoperov added the Type: Bug Something isn't working label Feb 27, 2025
@AlexeyKrasnoperov AlexeyKrasnoperov changed the title eth_estimateGas fails with error eth_estimateGas requires data parameter, which is not required by spec Feb 27, 2025
@hanabi1224 hanabi1224 self-assigned this Feb 27, 2025
@hanabi1224 hanabi1224 linked a pull request Feb 27, 2025 that will close this issue
4 tasks
@LesnyRumcajs LesnyRumcajs moved this from New to Ready in Forest Backlog 🌲 Feb 27, 2025
@LesnyRumcajs LesnyRumcajs moved this from Ready to In review in Forest Backlog 🌲 Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
Status: In review
Development

Successfully merging a pull request may close this issue.

2 participants