Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.base.org/llms.txt

Use this file to discover all available pages before exploring further.

Subscribe via eth_subscribe to receive each transaction as it is pre-confirmed into a Flashblock. Pass true as the second parameter to receive full transaction and receipt data.
This subscription requires a WebSocket-enabled RPC endpoint. The public Base endpoints (mainnet.base.org, sepolia.base.org) are HTTP only. Use a node provider such as Alchemy or QuickNode that offers WebSocket support for Base.
Requires base/base minimum client version v0.8.0.
Each subscription emits one item per WebSocket message. Events arrive approximately every 200ms. If your handler performs heavy processing per event, throttle or debounce it to avoid blocking.

Parameters

subscriptionType
string
required
Must be "newFlashblockTransactions".
full
boolean
If true, each notification includes the full transaction object with receipt fields embedded. Defaults to false (transaction hash only).

Returns

result
string
Hex-encoded subscription ID returned on subscribe.

Notifications

Each notification is a standard eth_subscription message. The params.result field depends on the full parameter: full: falseresult is the transaction hash:
"0xe26de91f9037e903eefe70b28f613019253da603e67e0dbfe2f656dce5444311"
full: trueresult is a transaction object with receipt fields embedded directly (no nested receipt sub-object). Verified live against base/v0.9.0:
type
string
Transaction type: 0x0 Legacy, 0x2 EIP-1559, 0x7e Deposit.
chainId
string
Chain ID (hex).
nonce
string
Sender nonce (hex).
gas
string
Gas limit (hex).
maxFeePerGas
string
EIP-1559 max fee per gas (hex).
maxPriorityFeePerGas
string
EIP-1559 max priority fee per gas (hex).
to
string
Recipient address.
value
string
ETH value transferred (hex).
accessList
array
EIP-2930 access list.
input
string
Transaction input data (hex).
r
string
Signature r component.
s
string
Signature s component.
yParity
string
Signature parity (hex).
v
string
Signature v value (hex).
hash
string
Transaction hash.
blockHash
null
Always null — transaction is pre-confirmed, not yet in a finalized block.
blockNumber
string
Block number (hex) of the in-progress Flashblock.
transactionIndex
string
Index within the block (hex).
from
string
Sender address.
gasPrice
string
Effective gas price (hex).
gasUsed
string
Gas used by this transaction (hex). Note: changed from integer to hex string in v0.8.0.
status
string
0x1 for success, 0x0 for failure.
cumulativeGasUsed
string
Total gas used in the block up to and including this transaction (hex).
contractAddress
string | null
Address of the created contract, or null.
logsBloom
string
Bloom filter of logs (hex).
logs
array
Array of log objects emitted by this transaction.
gasUsed is a hex string (e.g. "0x26132"), not an integer. This changed in v0.8.0 — update any parsers that expect a numeric value.

Example

{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newFlashblockTransactions"]}