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

fix: include base fee per gas for next block #7188

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Feb 20, 2024

closes #7084

This fixes the bug by creating a fee entry to the best block at launch:

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]]}'
{"jsonrpc":"2.0","id":1,"result":{"baseFeePerGas":["0x3b9aca00","0x342770c0"],"gasUsedRatio":[0.0],"oldestBlock":"0x0","reward":[["0x0","0x0"]]}}

The baseFeePerGas has two entries because this is supposed to also include the next block's base fee which can be derived from the current block

@mattsse mattsse requested a review from Evalir as a code owner February 20, 2024 13:34
@mattsse mattsse force-pushed the matt/include-base-fee-per-gas-for-next-block branch from 0111d77 to ca43c96 Compare February 20, 2024 13:34
@mattsse mattsse requested a review from DaniPopes February 20, 2024 13:35
@mattsse mattsse merged commit 746321a into foundry-rs:master Feb 20, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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