Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: 'eth_call'
sidebarTitle: 'eth_call'
description: 'Executes a message call without creating a transaction. Use pending on a Flashblocks endpoint to simulate against pre-confirmed state.'
description: 'Executes a message call without creating a transaction. Use pending to simulate against pre-confirmed state.'
---

Executes a message call immediately without broadcasting a transaction to the network. No gas is consumed on-chain. Used to read contract state or simulate calls.

<Tip>
**Flashblocks:** Query `https://mainnet-preconf.base.org` with `"pending"` to simulate against the current pre-confirmed block state, updated every ~200ms.
**Flashblocks:** Query `https://mainnet.base.org` with `"pending"` to simulate against the current pre-confirmed block state, updated every ~200ms.
</Tip>

<Note>
Expand Down Expand Up @@ -48,7 +48,7 @@ Executes a message call immediately without broadcasting a transaction to the ne
</ParamField>

<ParamField body="block" type="string" required>
Block number in hex, or `"latest"`, `"pending"`, `"safe"`, `"finalized"`, `"earliest"`. Use `"pending"` on a Flashblocks endpoint to call against pre-confirmed state.
Block number in hex, or `"latest"`, `"pending"`, `"safe"`, `"finalized"`, `"earliest"`. Use `"pending"` to call against pre-confirmed state.
</ParamField>

## Returns
Expand Down Expand Up @@ -85,7 +85,7 @@ curl https://mainnet.base.org \
```

```bash Flashblocks (pending, ~200ms)
curl https://mainnet-preconf.base.org \
curl https://mainnet.base.org \
-X POST \
-H "Content-Type: application/json" \
-d '{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: 'eth_estimateGas'
sidebarTitle: 'eth_estimateGas'
description: 'Estimates the gas required for a transaction. Use pending on a Flashblocks endpoint to estimate against pre-confirmed state.'
description: 'Estimates the gas required for a transaction. Use pending to estimate against pre-confirmed state.'
---

Returns an estimate of how much gas is required to execute a transaction. The estimate may be larger than the gas actually used at execution time.

<Tip>
**Flashblocks:** Query `https://mainnet-preconf.base.org` with `"pending"` to estimate gas against the current pre-confirmed state, useful when a transaction depends on a prior pre-confirmed one.
**Flashblocks:** Query `https://mainnet.base.org` with `"pending"` to estimate gas against the current pre-confirmed state, useful when a transaction depends on a prior pre-confirmed one.
</Tip>

## Parameters
Expand Down Expand Up @@ -44,7 +44,7 @@ Returns an estimate of how much gas is required to execute a transaction. The es
</ParamField>

<ParamField body="block" type="string">
Block to estimate against. Optional; defaults to `"latest"`. Use `"pending"` on a Flashblocks endpoint to estimate against pre-confirmed state.
Block to estimate against. Optional; defaults to `"latest"`. Use `"pending"` to estimate against pre-confirmed state.
</ParamField>

## Returns
Expand Down Expand Up @@ -79,7 +79,7 @@ curl https://mainnet.base.org \
```

```bash Flashblocks (pending state)
curl https://mainnet-preconf.base.org \
curl https://mainnet.base.org \
-X POST \
-H "Content-Type: application/json" \
-d '{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ Returns historical gas information for a range of blocks, including base fees an
<ResponseField name="result" type="object">
<Expandable title="Fee history fields">
<ResponseField name="oldestBlock" type="string">The oldest block number in the result set (hex).</ResponseField>
<ResponseField name="baseFeePerGas" type="array">Array of base fees per gas for each block, plus one extra for the next pending block.</ResponseField>
<ResponseField name="gasUsedRatio" type="array">Array of gas used / gas limit ratios for each block (0.0 to 1.0).</ResponseField>
<ResponseField name="baseFeePerGas" type="array">Array of base fees per gas for each block, plus one extra entry for the next pending block. Length = `blockCount + 1`.</ResponseField>
<ResponseField name="gasUsedRatio" type="array">Array of gas used / gas limit ratios for each block (0.0 to 1.0). Length = `blockCount`.</ResponseField>
<ResponseField name="baseFeePerBlobGas" type="array">Array of base fees per blob gas for each block, plus one extra for the next pending block (EIP-4844). Always `"0x1"` on Base currently. Length = `blockCount + 1`.</ResponseField>
<ResponseField name="blobGasUsedRatio" type="array">Array of blob gas used ratios for each block (0.0 to 1.0). Used to adjust the blob base fee (EIP-4844). Length = `blockCount`.</ResponseField>
<ResponseField name="reward" type="array">2D array of priority fee percentiles per block, matching the requested percentile values.</ResponseField>
</Expandable>
</ResponseField>
Expand All @@ -48,12 +50,33 @@ Returns historical gas information for a range of blocks, including base fees an
"jsonrpc": "2.0",
"id": 1,
"result": {
"oldestBlock": "0x158a0e0",
"baseFeePerGas": ["0xf5", "0xf7", "0xfa", "0xfc", "0xf8", "0xf5", "0xf2", "0xf0", "0xef", "0xf1", "0xf3"],
"gasUsedRatio": [0.45, 0.62, 0.38, 0.71, 0.55, 0.49, 0.43, 0.37, 0.52, 0.64],
"baseFeePerBlobGas": [
"0x1",
"0x1",
"0x1",
"0x1",
"0x3"
],
"baseFeePerGas": [
"0x4c4b40",
"0x4c4b40",
"0x4c4b40",
"0x4c4b40",
"0x4c4b40"
],
"blobGasUsedRatio": [0, 0, 0, 0],
"gasUsedRatio": [
0.1180706525,
0.1370935325,
0.120803475,
0.0968808
],
"oldestBlock": "0x2c31b05",
"reward": [
["0x1", "0x1", "0x2"],
["0x1", "0x1", "0x1"]
["0xf4240", "0x2191c0"],
["0xf4240", "0x186a00"],
["0x7a138", "0x4c4b40"],
["0xf4240", "0x4c4b40"]
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ No parameters.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xfa"
"result": "0x5b8d80"
}
```
</CodeGroup>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: 'eth_getBalance'
sidebarTitle: 'eth_getBalance'
description: 'Returns the ETH balance of an account at a given block. Use the pending tag on a Flashblocks endpoint for 200ms pre-confirmed balances.'
description: 'Returns the ETH balance of an account at a given block. Use the pending tag for 200ms pre-confirmed balances.'
---

Returns the ETH balance of an address at a given block.

<Tip>
**Flashblocks:** Query `https://mainnet-preconf.base.org` with `"pending"` to read balances updated every ~200ms — before the block seals.
**Flashblocks:** Query `https://mainnet.base.org` with `"pending"` to read balances updated every ~200ms — before the block seals.
</Tip>

## Parameters
Expand All @@ -17,7 +17,7 @@ Returns the ETH balance of an address at a given block.
</ParamField>

<ParamField body="block" type="string" required>
Block number in hex, or `"latest"`, `"pending"`, `"safe"`, `"finalized"`, `"earliest"`. Use `"pending"` on a Flashblocks endpoint for pre-confirmed balance.
Block number in hex, or `"latest"`, `"pending"`, `"safe"`, `"finalized"`, `"earliest"`. Use `"pending"` for pre-confirmed balance.
</ParamField>

## Returns
Expand All @@ -42,7 +42,7 @@ curl https://mainnet.base.org \
```

```bash Flashblocks (pending, ~200ms)
curl https://mainnet-preconf.base.org \
curl https://mainnet.base.org \
-X POST \
-H "Content-Type: application/json" \
-d '{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Returns information about a block by its hash.
## Returns

<ResponseField name="result" type="object | null">
A block object, or `null` if no block was found. See [`eth_getBlockByNumber`](/base-chain/api-reference/ethereum-json-rpc-api/eth_getBlockByNumber) for the full field list.
A block object, or `null` if no block was found. The response shape is identical to [`eth_getBlockByNumber`](/base-chain/api-reference/ethereum-json-rpc-api/eth_getBlockByNumber) — see that page for the full field list.
</ResponseField>

## Example
Expand All @@ -39,13 +39,35 @@ Returns information about a block by its hash.
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x158a0e9",
"hash": "0x5c330e55a190f82ea486b61e5b12e27dfb4fb3cecfc5746886ef38ca1281bce8",
"parentHash": "0x9edc29b8b0a1e31d28616e40c16132ad0d58faa8bb952595b557526bdb9a960a",
"timestamp": "0x67bf8332",
"gasLimit": "0x3938700",
"gasUsed": "0xab3f",
"transactions": ["0x7ef8f8a0..."]
"baseFeePerGas": "0x4c4b40",
"blobGasUsed": "0x5384cc",
"difficulty": "0x0",
"excessBlobGas": "0x0",
"extraData": "0x01000000640000000500000000004c4b40",
"gasLimit": "0x17d78400",
"gasUsed": "0x2155bc7",
"hash": "0x491bca01d4bc076d60833dbd973fe031a74e7ae31866bf70d077619e09edb6ff",
"logsBloom": "0xb765d5b0...",
"miner": "0x4200000000000000000000000000000000000011",
"mixHash": "0x47aecef0e1afa26b8e1f428e9a8696cf53d85c62587d8c2cea079c715cd29626",
"nonce": "0x0000000000000000",
"number": "0x2c31b0b",
"parentBeaconBlockRoot": "0x15b9e7c8ac4cbe92dafc849ed30a23e91624bbe5cbe199c0ccea3f7de7fc6d49",
"parentHash": "0x89f4c9e23a2f706f0afa9ca8f770c4b7dcbcb73ba7e9b1c29c4a8c1b90c31d24",
"receiptsRoot": "0x5a428d77344334537d7adaf85a45eb6d7977bc807a68c669f36cb043600da6d2",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1bb3b",
"stateRoot": "0x1b1525af0cdd504147b89f2a7ce1838ccb70c5439c45ce55522c2e2529801e87",
"timestamp": "0x6a1092f9",
"transactions": [
"0x03c8f106f18ad94190e763e21b584c5825b2f4c61f1274c0e8abe65b4476cd51",
"..."
],
"transactionsRoot": "0x6b9c9fcbdf98a8f4d38a3c16d099e9f0c7b7b474c2f5e044af7c91949c04a234",
"uncles": [],
"withdrawals": [],
"withdrawalsRoot": "0x57f4414a70a4af5e1a97b5fd8b8c6c870c00e8d9dbc0fde0059ce46e2cd28e5b"
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ description: 'Returns block information by number. On Flashblocks endpoints, the
Returns information about a block by its number.

<Tip>
**Flashblocks:** Query `https://mainnet-preconf.base.org` with `"pending"` to fetch the live Flashblock in progress — a real block object updated every ~200ms with new pre-confirmed transactions. The response shape is identical; the block is simply not yet sealed.
**Flashblocks:** Query `https://mainnet.base.org` with `"pending"` to fetch the live Flashblock in progress — a real block object updated every ~200ms with new pre-confirmed transactions. The response shape is identical; the block is simply not yet sealed.
</Tip>

## Parameters

<ParamField body="block" type="string" required>
Block number in hex, or `"latest"`, `"pending"`, `"safe"`, `"finalized"`, `"earliest"`. Use `"pending"` on a Flashblocks endpoint to get the in-progress block.
Block number in hex, or `"latest"`, `"pending"`, `"safe"`, `"finalized"`, `"earliest"`. Use `"pending"` to get the in-progress block.
</ParamField>

<ParamField body="fullTransactions" type="boolean" required>
Expand All @@ -37,7 +37,7 @@ Returns information about a block by its number.
<ResponseField name="receiptsRoot" type="string">Root of the receipts trie.</ResponseField>
<ResponseField name="miner" type="string">Address of the fee recipient (coinbase).</ResponseField>
<ResponseField name="difficulty" type="string">Always `"0x0"` on Base (PoS).</ResponseField>
<ResponseField name="totalDifficulty" type="string">Always `"0x0"` on Base (PoS).</ResponseField>
<ResponseField name="mixHash" type="string">Present in all blocks; repurposed for PoS consensus (bytes32 hex).</ResponseField>
<ResponseField name="extraData" type="string">Arbitrary data field set by the sequencer.</ResponseField>
<ResponseField name="size" type="string">Block size in bytes (hex).</ResponseField>
<ResponseField name="gasLimit" type="string">Maximum gas allowed in this block (hex).</ResponseField>
Expand All @@ -46,6 +46,7 @@ Returns information about a block by its number.
<ResponseField name="transactions" type="array">Array of transaction hashes or full transaction objects.</ResponseField>
<ResponseField name="uncles" type="array">Always `[]` on Base.</ResponseField>
<ResponseField name="withdrawals" type="array">Always `[]` on Base.</ResponseField>
<ResponseField name="withdrawalsRoot" type="string">Merkle root of the withdrawals list (EIP-4895, bytes32 hex).</ResponseField>
<ResponseField name="baseFeePerGas" type="string">EIP-1559 base fee per gas (hex).</ResponseField>
<ResponseField name="blobGasUsed" type="string">Total blob gas used (EIP-4844, hex).</ResponseField>
<ResponseField name="excessBlobGas" type="string">Excess blob gas for blob fee calculation (EIP-4844, hex).</ResponseField>
Expand All @@ -56,7 +57,7 @@ Returns information about a block by its number.

## Flashblock-Specific Response Fields

When querying `"pending"` on a Flashblocks endpoint, the response is a live snapshot of the block being built. A few fields behave differently:
When querying `"pending"`, the response is a live snapshot of the block being built. A few fields behave differently:

| Field | Standard `latest` | Flashblocks `pending` |
| --- | --- | --- |
Expand All @@ -82,7 +83,7 @@ curl https://mainnet.base.org \
```

```bash Flashblocks (pending, live at ~200ms)
curl https://mainnet-preconf.base.org \
curl https://mainnet.base.org \
-X POST \
-H "Content-Type: application/json" \
-d '{
Expand All @@ -98,16 +99,35 @@ curl https://mainnet-preconf.base.org \
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x158a0e9",
"hash": "0x5c330e55a190f82ea486b61e5b12e27dfb4fb3cecfc5746886ef38ca1281bce8",
"parentHash": "0x9edc29b8b0a1e31d28616e40c16132ad0d58faa8bb952595b557526bdb9a960a",
"timestamp": "0x67bf8332",
"gasLimit": "0x3938700",
"gasUsed": "0xab3f",
"baseFeePerGas": "0xfa",
"transactions": ["0x7ef8f8a0..."],
"baseFeePerGas": "0x4c4b40",
"blobGasUsed": "0x5384cc",
"difficulty": "0x0",
"excessBlobGas": "0x0",
"extraData": "0x01000000640000000500000000004c4b40",
"gasLimit": "0x17d78400",
"gasUsed": "0x2155bc7",
"hash": "0x491bca01d4bc076d60833dbd973fe031a74e7ae31866bf70d077619e09edb6ff",
"logsBloom": "0xb765d5b0...",
"miner": "0x4200000000000000000000000000000000000011",
"mixHash": "0x47aecef0e1afa26b8e1f428e9a8696cf53d85c62587d8c2cea079c715cd29626",
"nonce": "0x0000000000000000",
"number": "0x2c31b0b",
"parentBeaconBlockRoot": "0x15b9e7c8ac4cbe92dafc849ed30a23e91624bbe5cbe199c0ccea3f7de7fc6d49",
"parentHash": "0x89f4c9e23a2f706f0afa9ca8f770c4b7dcbcb73ba7e9b1c29c4a8c1b90c31d24",
"receiptsRoot": "0x5a428d77344334537d7adaf85a45eb6d7977bc807a68c669f36cb043600da6d2",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1bb3b",
"stateRoot": "0x1b1525af0cdd504147b89f2a7ce1838ccb70c5439c45ce55522c2e2529801e87",
"timestamp": "0x6a1092f9",
"transactions": [
"0x03c8f106f18ad94190e763e21b584c5825b2f4c61f1274c0e8abe65b4476cd51",
"..."
],
"transactionsRoot": "0x6b9c9fcbdf98a8f4d38a3c16d099e9f0c7b7b474c2f5e044af7c91949c04a234",
"uncles": [],
"withdrawals": [],
"miner": "0x4200000000000000000000000000000000000011"
"withdrawalsRoot": "0x57f4414a70a4af5e1a97b5fd8b8c6c870c00e8d9dbc0fde0059ce46e2cd28e5b"
}
}
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
---
title: 'eth_getBlockReceipts'
sidebarTitle: 'eth_getBlockReceipts'
description: 'Returns all transaction receipts for a block. Use pending on a Flashblocks endpoint for pre-confirmed receipts.'
description: 'Returns all transaction receipts for a block. Use pending for pre-confirmed receipts.'
---

Returns all transaction receipts for a given block.

<Warning>
This method returns HTTP 403 on the public Base RPC endpoints (`mainnet.base.org`, `sepolia.base.org`). It requires a dedicated or third-party RPC provider. See the [node providers page](/base-chain/network-information/node-providers) for options.
</Warning>

<Tip>
**Flashblocks:** Query `https://mainnet-preconf.base.org` with `"pending"` to get receipts for all pre-confirmed transactions in the current Flashblock.
**Flashblocks:** Query `https://mainnet.base.org` with `"pending"` to get receipts for all pre-confirmed transactions in the current Flashblock.
</Tip>

## Parameters
Expand All @@ -32,7 +36,7 @@ curl https://mainnet.base.org \
```

```bash Flashblocks (pending)
curl https://mainnet-preconf.base.org \
curl https://mainnet.base.org \
-X POST -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["pending"],"id":1}'
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: 'Returns the number of transactions in a block by block number.'
Returns the number of transactions in a block matching the given block number.

<Tip>
**Flashblocks:** Query `https://mainnet-preconf.base.org` with `"pending"` to get the count of pre-confirmed transactions in the current Flashblock.
**Flashblocks:** Query `https://mainnet.base.org` with `"pending"` to get the count of pre-confirmed transactions in the current Flashblock.
</Tip>

## Parameters
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: 'eth_getCode'
sidebarTitle: 'eth_getCode'
description: 'Returns the contract bytecode at an address. Use pending on a Flashblocks endpoint to detect newly deployed contracts before block finalization.'
description: 'Returns the contract bytecode at an address. Use pending to detect newly deployed contracts before block finalization.'
---

Returns the compiled bytecode at a given address. Returns `"0x"` for externally owned accounts (EOAs).

<Tip>
**Flashblocks:** Query `https://mainnet-preconf.base.org` with `"pending"` to detect contract deployments before the block seals.
**Flashblocks:** Query `https://mainnet.base.org` with `"pending"` to detect contract deployments before the block seals.
</Tip>

## Parameters
Expand Down Expand Up @@ -42,7 +42,7 @@ curl https://mainnet.base.org \
```

```bash Flashblocks (pending, ~200ms)
curl https://mainnet-preconf.base.org \
curl https://mainnet.base.org \
-X POST \
-H "Content-Type: application/json" \
-d '{
Expand Down
Loading
Loading