---
eip: 3046
label: EIP-3046
title: Adds `baseFee` to `eth_getUncleByBlockNumberAndIndex`
status: Stagnant
type: Standards Track
category: Interface
created: 2020-10-14
requires: 1474, 1559
official: https://eips.ethereum.org/EIPS/eip-3046
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3046.md
canonical: https://eips.huatuo.xyz/eip-3046/
lang: en
tldr: Proposed adding the EIP-1559 base fee to the uncle blocks returned by eth_getUncleByBlockNumberAndIndex, so RPC clients see it for every post-London header.
tags: [json-rpc, base-fee, uncles, interface, api]
---

# EIP-3046: Adds `baseFee` to `eth_getUncleByBlockNumberAndIndex`

> Add basefee field to ethgetUncleByBlockNumberAndIndex RPC endpoint response.

**TL;DR:** Proposed adding the EIP-1559 base fee to the uncle blocks returned by eth_getUncleByBlockNumberAndIndex, so RPC clients see it for every post-London header.

## What problem does it solve?

[EIP-1559](/eip-1559/) added a **base fee per gas** to every block header. Tools that estimate gas prices or analyze fee history need that value for any block they look at, including *uncle* (ommer) blocks: valid blocks that were mined but not included in the canonical chain under proof-of-work.

The JSON-RPC method `eth_getUncleByBlockNumberAndIndex` (specified in [EIP-1474](/eip-1474/)) returns an uncle's header fields. Without an explicit rule, clients might or might not include the new field. EIP-3046 makes it explicit.

## How it works

The change is a single new field in the response:

- For uncles whose block number is **on or after** the EIP-1559 fork block, the `result` object **must** include `baseFee` (a hex `Quantity`).
- For uncles **before** the fork, it **must not** include `baseFee`.
- Request parameters are unchanged: a block number (or tag) and an uncle index.

Adding a field rather than a new endpoint was chosen as the simplest change for clients to adopt, and omitting it on old blocks keeps responses for historical data unchanged.

## Sample code

Request:

```json
{
  "jsonrpc": "2.0",
  "id": 1559,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": ["<post-London block number>", "0x0"]
}
```

Response for a post-1559 uncle, as proposed (other header fields abbreviated):

```json
{
  "jsonrpc": "2.0",
  "id": 1559,
  "result": {
    "number": "0x…",
    "hash": "0x…",
    "parentHash": "0x…",
    "gasLimit": "0x…",
    "gasUsed": "0x…",
    "baseFee": "0x7",
    "uncles": []
  }
}
```

The same call from TypeScript:

```ts
const uncle = await provider.send("eth_getUncleByBlockNumberAndIndex", [blockTag, "0x0"]);
// Deployed clients name the field baseFeePerGas; this EIP proposed baseFee.
const baseFee = BigInt(uncle?.baseFeePerGas ?? uncle?.baseFee ?? 0);
```

## Things to know

- Status is **Stagnant**. Sibling proposals made the same change for other methods: [EIP-3041](/eip-3041/) (`eth_getBlockByHash`), [EIP-3044](/eip-3044/) (`eth_getBlockByNumber`) and [EIP-3045](/eip-3045/) (`eth_getUncleByBlockHashAndIndex`).
- The field name proposed here, `baseFee`, is **not** what clients shipped. Ethereum JSON-RPC (as used by Geth and others) returns `baseFeePerGas` in block and header objects. Code against the actual client behavior, not this EIP's example.
- Uncles no longer occur after the Merge (proof-of-stake has no ommers), so this method only returns data for historical proof-of-work blocks.
- Inside contracts, the current block's base fee is available via the `BASEFEE` opcode from [EIP-3198](/eip-3198/).


---

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