foundry icon indicating copy to clipboard operation
foundry copied to clipboard

baseFeePerGas field missing when eth_feeHistory is called and no blocks were created

Open tkstanczak opened this issue 1 year ago • 0 comments

Component

Anvil

Have you ensured that all of these are up to date?

  • [X] Foundry
  • [X] Foundryup

What version of Foundry are you on?

0.2.0

What command(s) is the bug in?

anvil

Operating System

Windows

Describe the bug

When calling eth_feeHistory the baseFeePerGas field is missing unless blocks were created in the current session.

REQUEST curl http://localhost:8545 -X POST -H "Content-Type: application/json" -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]]}'

RESPONSE {"jsonrpc":"2.0","id":1,"result":{"gasUsedRatio":[],"oldestBlock":"0x0","reward":[]}}

RESPONSE EXPECTED {"jsonrpc":"2.0","id":1,"result":{"baseFeePerGas":[], "gasUsedRatio":[],"oldestBlock":"0x0","reward":[]}}

tkstanczak avatar Feb 11 '24 19:02 tkstanczak