See Flashblocks for an overview of Flashblocks and how to integrate it into your app. For the standard Base node RPC reference, see the JSON-RPC API Reference.
Endpoints
Connect to a Flashblocks-aware endpoint to access preconfirmed data:| Network | HTTP RPC | WebSocket (WSS) |
|---|---|---|
| Mainnet | https://mainnet-preconf.base.org | wss://mainnet-preconf.base.org |
| Sepolia | https://sepolia-preconf.base.org | wss://sepolia-preconf.base.org |
Standard Methods with Flashblocks Behavior
The following standard JSON-RPC methods return preconfirmed data when called with the"pending" block tag against a Flashblocks-aware endpoint. This gives your application real-time state up to 200ms before the next full block is sealed.
eth_getBlockByNumber
When called with"pending", returns the current Flashblock — the block actively being built with preconfirmed transactions.
Parameters
Use
"pending" to retrieve the latest Flashblock. Also accepts "latest", "safe", "finalized", or a specific block number.If
true, returns full transaction objects. If false, returns only transaction hashes.Returns
A block object reflecting the current preconfirmed state. See eth_getBlockByNumber for full field descriptions.
eth_getTransactionReceipt
Returns the receipt for a preconfirmed transaction before it is included in a finalized block.Parameters
The 32-byte transaction hash.
Returns
A transaction receipt object for the preconfirmed transaction, or
null if not found. See eth_getTransactionReceipt for full field descriptions.eth_getBalance
Returns the ETH balance of an address in the latest preconfirmed Flashblock state.Parameters
The 20-byte address to query.
Use
"pending" to query preconfirmed state.Returns
The balance in wei as a hexadecimal string.
eth_getTransactionCount
Returns the account nonce in the latest preconfirmed Flashblock state. Use"pending" to account for transactions that are preconfirmed but not yet in a sealed block.
Parameters
The 20-byte account address.
Use
"pending" to include preconfirmed transactions in the nonce count.Returns
The transaction count (nonce) as a hexadecimal integer.
eth_getTransactionByHash
Returns a preconfirmed transaction before it is included in a finalized block.Parameters
The 32-byte transaction hash.
Returns
A transaction object, or
null if not found. See eth_getTransactionByHash for full field descriptions.eth_call
Executes a contract call against the latest preconfirmed Flashblock state.Parameters
Use
"pending" to execute the call against preconfirmed state.Returns
Hex-encoded return data from the contract call.
eth_estimateGas
Estimates gas for a transaction against the latest preconfirmed Flashblock state.Parameters
The transaction object. See eth_estimateGas for field details.
Use
"pending" to estimate against preconfirmed state.Returns
Estimated gas as a hexadecimal integer.
eth_getLogs
Returns logs from preconfirmed Flashblock data by setting"toBlock" to "pending".
Parameters
The log filter object.
Returns
An array of log objects. See eth_getLogs for full field descriptions.
Flashblocks-Specific Methods
eth_simulateV1
Simulates one or more transaction bundles against the current preconfirmed Flashblock state. Supports state overrides, multi-block simulation, and optional transfer tracing.Parameters
The simulation configuration.
Use
"pending" to simulate against the current Flashblock state.Returns
Array of simulated block results, one per entry in
blockStateCalls.base_transactionStatus Beta
Checks whether a specific transaction is present in the node’s mempool. Use this to confirm that a submitted transaction has been received before it appears in a Flashblock.Requires base/base minimum client version v0.3.0.
Parameters
The 32-byte transaction hash to query.
Returns
Transaction status object.
WebSocket Subscription Methods
Flashblocks-aware nodes expose specializedeth_subscribe subscription types for real-time streaming of preconfirmed data at ~200ms intervals — well before a full block is sealed.
The Flashblocks-specific subscription types (
newFlashblockTransactions, pendingLogs, newFlashblocks) require base/base minimum client version v0.3.1.Flashblocks Subscription Types
In addition to the standard subscription types (newHeads, logs, newPendingTransactions), Flashblocks-aware nodes support:
| Subscription | Description | Response format |
|---|---|---|
newFlashblockTransactions | Streams transactions as they are preconfirmed into Flashblocks | One transaction per message |
pendingLogs | Streams logs matching a filter as they are preconfirmed | One log per message |
newFlashblocks | Streams full block state updates for each new Flashblock | Block state object per Flashblock |
newFlashblockTransactions
Subscribe to receive each transaction as it is preconfirmed. Passtrue as the second parameter to receive full transaction and log data in each message.
Parameters
Must be
"newFlashblockTransactions".Optional. If
true, each notification includes the full transaction object and associated logs. If false or omitted, notifications contain minimal transaction data.Returns
Hex-encoded subscription ID.
pendingLogs
Subscribe to receive logs from preconfirmed transactions matching an optional filter. Useful for monitoring contract events with sub-block latency.Parameters
Must be
"pendingLogs".Optional log filter.
Returns
Hex-encoded subscription ID.
newFlashblocks
Subscribe to receive full block state updates as each Flashblock is built. Each message contains the accumulated preconfirmed state for the block in progress.Parameters
Must be
"newFlashblocks".Returns
Hex-encoded subscription ID.
eth_unsubscribe
Cancels a Flashblocks subscription. Works identically to the standard eth_unsubscribe.Parameters
The hex-encoded subscription ID returned by
eth_subscribe.Returns
true if successfully cancelled, false if the subscription ID was not found.