Skip to content
BaseHub by wbnns Updated

Flashblocks API overview

Every public Base endpoint (mainnet.base.org / sepolia.base.org) is Flashblocks-enabled, serving the full set of standard Ethereum JSON-RPC methods plus a set of pre-confirmation-specific additions. Together they let you read state, simulate transactions, and stream events against sequencer-ordered data up to ~1.8 seconds before a block seals.

Every standard Ethereum JSON-RPC method accepts the "pending" block tag to resolve against pre-confirmed state instead of the transaction pool. See the RPC overview for endpoint URLs.

MethodDescription
eth_simulateV1Simulate transaction bundles against pre-confirmed state.
base_transactionStatusCheck whether a transaction has been received by the node mempool.

Over a WebSocket connection, eth_subscribe with newHeads emits a new event approximately every 200ms per Flashblock instead of every 2 seconds, and three additional subscription types become available. Note that the public Base endpoints are HTTP only — WebSocket subscriptions require a WebSocket-enabled node provider such as Alchemy or QuickNode.

SubscriptionDescription
newFlashblockTransactionsStream individual transactions as they are pre-confirmed (~200ms each).
pendingLogsStream filtered event logs from pre-confirmed transactions.
newFlashblocksStream full Flashblock payload objects from the sequencer.

The raw Flashblocks infrastructure stream is the upstream WebSocket feed consumed by Flashblocks-aware RPC nodes. It emits a new message approximately every 200ms as the sequencer pre-confirms transactions.

Applications should not connect directly to the infrastructure stream — these endpoints are reserved for node operators. App developers should use the WebSocket subscription methods above through a Flashblocks-aware RPC provider.

NetworkRaw stream URL
Mainnetwss://mainnet.flashblocks.base.org/ws
Sepoliawss://sepolia.flashblocks.base.org/ws

The root structure of each infrastructure stream message.

FieldTypeDescription
payload_idstringUnique identifier for the block being built. Remains consistent across all Flashblocks within a single full block.
indexnumberFlashblock index within the current block. Starts at 0 (system transactions only). User transactions begin at index 1. Typically reaches 9–10 per block, but may exceed 10 during sequencer timing drift.
baseBase ObjectBlock header properties. Only present when index is 0. See Base object.
diffDiff ObjectIncremental block state changes for this Flashblock. Present in every message. See Diff object.
metadataMetadata ObjectSupplemental data. Unstable — fields may change without notice. See Metadata object.

Contains full block header properties. Only present in the index: 0 message (the first Flashblock of each full block).

FieldTypeDescription
parent_hashstringHash of the parent block.
fee_recipientstringAddress receiving transaction fees (coinbase).
block_numberstringBlock number in hex.
gas_limitstringMaximum gas allowed in this block (hex).
timestampstringUnix timestamp of block creation (hex).
base_fee_per_gasstringEIP-1559 base fee per gas (hex).
prev_randaostringPrevious RANDAO value used for on-chain randomness.
extra_datastringArbitrary data field set by the sequencer.
parent_beacon_block_rootstringRoot of the parent beacon block (EIP-4788).

Contains the incremental block state changes for this specific Flashblock. Present in every message.

FieldTypeDescription
state_rootstringMerkle root of the state trie after applying this Flashblock’s transactions.
block_hashstringHash of the partial block at this Flashblock index. Changes with each Flashblock as more transactions are pre-confirmed.
gas_usedstringCumulative gas used up to and including this Flashblock (hex).
blob_gas_usedstringCumulative blob gas used (EIP-4844, hex).
transactionsstring[]Array of RLP-encoded transactions included in this Flashblock.
withdrawalsarrayValidator withdrawals (always empty on Base L2).
receipts_rootstringMerkle root of transaction receipts.
logs_bloomstringBloom filter for logs in this Flashblock.
withdrawals_rootstringMerkle root of withdrawals.

The metadata object is not stable. Fields may be added, modified, or removed without prior notice. Do not build production dependencies on it — use the diff object or query finalized block data via standard RPC instead.

As of client version v0.8.0, new_account_balances and receipts are no longer carried in metadata; block_number is the only field that remains.

FieldTypeDescription
block_numbernumberBlock number as a decimal integer.

metadata.receipts was dropped in v0.8.0; this schema is retained only as a reference for older node versions. On v0.8.0 and later, poll eth_getTransactionReceipt for receipt data, or subscribe to newFlashblockTransactions with full: true for a live stream of pre-confirmed transaction data including logs. Check the type field to determine the transaction type.

FieldTypeDescription
typestringTransaction type: 0x0 Legacy, 0x1 Access List, 0x2 EIP-1559, 0x7e Deposit (L1→L2).
statusstringTransaction status: 0x1 for success, 0x0 for failure.
cumulativeGasUsedstringTotal gas used in the block up to and including this transaction (hex).
logsLog[]Array of event logs emitted by the transaction. See Log object.
logsBloomstringBloom filter for the logs in this receipt.
transactionIndexstringIndex of the transaction within the block (hex).
FieldTypeDescription
addressstringContract address that emitted the event.
topicsstring[]Array of indexed event parameters. Topic 0 is typically the event signature hash.
datastringABI-encoded non-indexed event parameters.
blockHashstringHash of the block containing this log.
blockNumberstringBlock number in hex.
blockTimestampstringUnix timestamp of the block as a hex string. OP Stack extension to the standard Ethereum log schema.
transactionHashstringHash of the transaction that emitted this log.
transactionIndexstringIndex of the transaction in the block (hex).
logIndexstringLog’s index position within the block (hex).
removedbooleantrue if the log was removed due to a chain reorg.

Index 0 — includes the base object (block header):

{
"payload_id": "0x03997352d799c31a",
"index": 0,
"base": {
"parent_hash": "0x9edc29b8b0a1e31d28616e40c16132ad0d58faa8bb952595b557526bdb9a960a",
"fee_recipient": "0x4200000000000000000000000000000000000011",
"block_number": "0x158a0e9",
"gas_limit": "0x3938700",
"timestamp": "0x67bf8332",
"base_fee_per_gas": "0xfa",
"parent_beacon_block_root": "0x15b9e7c8ac4cbe92dafc849ed30a23e91624bbe5cbe199c0ccea3f7de7fc6d49"
},
"diff": {
"state_root": "0x208fd63edc0681161105f27d03daf9f8c726d8c94e584a3c0696c98291c24333",
"block_hash": "0x5c330e55a190f82ea486b61e5b12e27dfb4fb3cecfc5746886ef38ca1281bce8",
"gas_used": "0xab3f",
"transactions": ["0x7ef8f8a0b4afc0b7ce10e150801bbaf08ac33fecb0f38311793abccb022120d321c6d276..."],
"withdrawals": []
},
"metadata": {
"block_number": 22585577
}
}

Index 1–N (diff only) — no base object:

{
"payload_id": "0x03997352d799c31a",
"index": 4,
"diff": {
"state_root": "0x7a8f45038665072f382730e689f4a1561835c9987fca8942fa95872fb9367eaa",
"block_hash": "0x9b32f7a14cbd1efc8c2c5cad5eb718ec9e0c5da92c3ba7080f8d4c49d660c332",
"gas_used": "0x1234f",
"transactions": ["0x02f90133...", "0x02f90196..."],
"withdrawals": []
},
"metadata": {
"block_number": 22585577
}
}