---
eip: 3044
label: EIP-3044
title: Adds `baseFee` to `eth_getBlockByNumber`
status: Stagnant
type: Standards Track
category: Interface
created: 2020-10-14
requires: 1474, 1559
official: https://eips.ethereum.org/EIPS/eip-3044
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3044.md
canonical: https://eips.huatuo.xyz/eip-3044/
lang: en
tldr: "A stagnant JSON-RPC proposal to include each block's EIP-1559 base fee in the `eth_getBlockByNumber` response, the idea behind today's `baseFeePerGas` field."
tags: [json-rpc, base-fee, interface, eip-1559, stagnant]
---

# EIP-3044: Adds `baseFee` to `eth_getBlockByNumber`

> Add basefee field to ethgetBlockByNumber RPC endpoint response.

**TL;DR:** A stagnant JSON-RPC proposal to include each block's EIP-1559 base fee in the `eth_getBlockByNumber` response, the idea behind today's `baseFeePerGas` field.

## What problem does it solve?

[EIP-1559](/eip-1559/) added a protocol-computed base fee per gas to every block header. Wallets and gas estimators need that number to choose sensible `maxFeePerGas` values, but the standard JSON-RPC block object ([EIP-1474](/eip-1474/)) had no field for it.

EIP-3044 proposed the simplest fix: add the base fee to the existing `eth_getBlockByNumber` result rather than create a new endpoint.

## How it works

- Parameters of `eth_getBlockByNumber` are unchanged.
- For blocks **on or after** the EIP-1559 fork, the result object **must** include the base fee as a hex `Quantity`.
- For blocks **before** the fork, the field **must not** be present, so older responses are unchanged and existing clients are not broken.
- The field is purely informational and has no consensus effect.

The proposal names the field `baseFee`. When clients actually shipped EIP-1559 in the London upgrade, the field that appeared in block objects is named **`baseFeePerGas`**, and it is returned by `eth_getBlockByHash` as well.

## Sample code

Request and an abridged response as clients return it today:

```sh
curl -s -X POST -H 'content-type: application/json' "$RPC_URL" --data '{
  "jsonrpc": "2.0", "id": 1,
  "method": "eth_getBlockByNumber",
  "params": ["latest", false]
}'
```

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "number": "0x1b4",
    "gasLimit": "0x1c9c380",
    "gasUsed": "0x9f759",
    "baseFeePerGas": "0x7",
    "transactions": []
  }
}
```

Reading it with ethers v6:

```ts
const block = await provider.getBlock("latest");
console.log(block?.baseFeePerGas); // bigint in wei, null for pre-London blocks
```

## Things to know

- Status is **Stagnant**. The proposal itself was never finalized, but the behaviour it describes — an extra base-fee field, absent on pre-London blocks — is what clients implemented, under the name `baseFeePerGas`.
- Do not code against a `baseFee` key; use `baseFeePerGas`.
- Inside contracts, the current block's base fee is available via the `BASEFEE` opcode from [EIP-3198](/eip-3198/).
- `eth_feeHistory` is the usual way to fetch base fees for a range of blocks at once.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-3044
