You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue arises when using the Foundry toolchain and running the forge script command on Moonbeam. The system returns an "EIP-3855 is not supported in one or more of the RPCs used" error.
This issue is related to fee estimation for EIP-1559. Foundry uses the eth_feeHistory method to calculate the gas fee, and it sends the following request: {"method":"eth_feeHistory","params":[10,"latest",[20.0]],"id":1,"jsonrpc":"2.0"}
While this works fine with Ethereum nodes, on a Moonbeam node, it returns the following error:
"code": -32602,
"message": "Invalid params",
"data": "invalid type: integer `10`, expected a (both 0x-prefixed or not) hex string or byte array containing between (0; 32] bytes at line 2 column 10"
Essentially, Foundry expects the node to accept an integer as an argument, but Moonbeam (and some other chains) does not. The issue is not specific to Moonbeam alone.
To reproduce the issue, you can try the following curl commands:
A quick fix for this issue is to add the --legacy flag when running the forge script command with Foundry. This will disable the use of eth_feeHistory and instead use the legacy fee estimation method, which should work with both Ethereum and Moonbeam nodes.
But according to Ethereum's API doc, the first parameter should be a hex string instead of a integer.
Would you consider fixing it please?
The text was updated successfully, but these errors were encountered:
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (ba399ae 2024-04-30T13:37:57.271979000Z)
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
The issue arises when using the Foundry toolchain and running the forge script command on Moonbeam. The system returns an "EIP-3855 is not supported in one or more of the RPCs used" error.
This issue is related to fee estimation for EIP-1559. Foundry uses the eth_feeHistory method to calculate the gas fee, and it sends the following request:
{"method":"eth_feeHistory","params":[10,"latest",[20.0]],"id":1,"jsonrpc":"2.0"}
While this works fine with Ethereum nodes, on a Moonbeam node, it returns the following error:
Essentially, Foundry expects the node to accept an integer as an argument, but Moonbeam (and some other chains) does not. The issue is not specific to Moonbeam alone.
To reproduce the issue, you can try the following curl commands:
A quick fix for this issue is to add the --legacy flag when running the forge script command with Foundry. This will disable the use of eth_feeHistory and instead use the legacy fee estimation method, which should work with both Ethereum and Moonbeam nodes.
But according to Ethereum's API doc, the first parameter should be a hex string instead of a integer.
Would you consider fixing it please?
The text was updated successfully, but these errors were encountered: