Skip to main content

Documentation Index

Fetch the complete documentation index at: https://base-a060aa97-mux-base-docs-codex-moly1dzt.mintlify.app/llms.txt

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

Base exposes an EVM-compatible JSON-RPC API through two RPC tiers:
  • Standard RPC for normal Ethereum-compatible reads, writes, logs, and debugging against sealed blocks and standard pending state.
  • Flashblocks RPC for apps that need preconfirmed state and transaction signals before the next L2 block seals.
Most apps should start with Standard RPC. Use Flashblocks RPC when faster state reads, transaction feedback, or realtime subscriptions materially improve the user experience.

Choose an RPC Tier

If your app needs to…Use…Notes
Read confirmed chain stateStandard RPC with "latest"Default choice for balances, contract reads, blocks, receipts, and logs.
Submit transactionsStandard or Flashblocks RPCeth_sendRawTransaction broadcasts the signed transaction; confirmation behavior depends on how you read it back.
Read preconfirmed stateFlashblocks RPC with "pending"Useful for balances, storage, eth_call, gas estimation, pending logs, and block reads before the L2 block seals.
Track a transaction before it sealsFlashblocks RPC by hash, base_transactionStatus, or subscriptionsPreconfirmed transaction and receipt responses are strong signals, not finality guarantees.
Operate RPC or node infrastructureFlashblocks RPC plus the raw Flashblocks stream when neededThe raw stream is infrastructure-oriented. Apps should usually use RPC methods and subscriptions.
For many app reads, the practical change is switching to a Flashblocks endpoint and using the "pending" block tag.

What is the Flashblocks Tier?

Flashblocks are sub-block preconfirmations produced while Base is building the next L2 block. Standard L2 blocks seal about every 2 seconds. Flashblocks expose the block-in-progress at about 200ms resolution, so apps can read sequencer-ordered state before the full L2 block is sealed. On Standard RPC, "pending" follows normal Ethereum JSON-RPC behavior and reflects pending transaction pool state. On Flashblocks RPC, "pending" reflects the current preconfirmed block-in-progress. Methods such as eth_getBalance, eth_getStorageAt, eth_call, and eth_estimateGas can use that preconfirmed state.
Preconfirmed responses are reorg-able until the full L2 block seals. For finality stages and the Flashblock reorg SLO, see Transaction Finality.

Common Tasks

Read state

Use eth_call, eth_getBalance, eth_getStorageAt, eth_getCode, and eth_getTransactionCount. Add "pending" on Flashblocks RPC to read preconfirmed state.

Send transactions

Broadcast signed transactions with eth_sendRawTransaction, then choose Standard or Flashblocks reads depending on the confirmation signal your app needs.

Track confirmations

Use transaction and receipt lookups for sealed data. On Flashblocks RPC, by-hash lookups can also return preconfirmed cache data before the L2 block seals.

Stream realtime data

Use WebSocket subscriptions such as eth_subscribe, newFlashblockTransactions, pendingLogs, and newFlashblocks when polling is too slow.

Simulate preconfirmed bundles

Use eth_simulateV1 to simulate bundles against preconfirmed state on Flashblocks endpoints.

Debug execution

Use debug methods for local development, transaction traces, and block replay. Availability and rate limits vary by provider.

Endpoint URLs

Most readers can use their provider’s Base endpoint directly. Expand this section when you need the public Base RPC URLs, chain IDs, explorers, or Flashblocks endpoint URLs.
NetworkChain IDStandard RPCStandard WSSFlashblocks RPCFlashblocks WSSExplorer
Base Mainnet8453https://mainnet.base.orgwss://mainnet.base.orghttps://mainnet-preconf.base.orgwss://mainnet-preconf.base.orgBaseScan
Base Sepolia84532https://sepolia.base.orgwss://sepolia.base.orghttps://sepolia-preconf.base.orgwss://sepolia-preconf.base.orgBaseScan Sepolia
Public RPC and Flashblocks RPC endpoints are rate-limited and are not suitable for production traffic. For production systems, use a node provider or run your own Base node. For more explorer options, see the block explorer catalog.

API Surfaces

Ethereum JSON-RPC API

Core Ethereum protocol methods for account queries, contract calls, block and transaction data, gas estimation, log filtering, transaction submission, and WebSocket subscriptions. These methods work on both Standard and Flashblocks endpoints.

State and contract reads

eth_call, eth_getBalance, eth_getStorageAt, eth_getCode, eth_getTransactionCount

Blocks and transactions

eth_getBlockByNumber, eth_getBlockByHash, transaction count methods, transaction lookups, receipts

Fees and gas

eth_estimateGas, eth_gasPrice, eth_maxPriorityFeePerGas, eth_feeHistory

Logs and subscriptions

eth_getLogs, eth_subscribe, eth_unsubscribe

Flashblocks API

Flashblocks methods provide preconfirmation-specific capabilities on Flashblocks endpoints. Use them when your app needs sub-second transaction status, filtered pending logs, preconfirmed transaction streams, or bundle simulation.

Transaction status

Check whether a transaction has reached the mempool before it is sealed into an L2 block.

Pending logs

Subscribe to filtered logs from preconfirmed transactions.

New Flashblock transactions

Subscribe to individual preconfirmed transactions.

Flashblock stream

Subscribe to Flashblock payloads. Most apps should prefer higher-level RPC methods unless they need the raw payload shape.

Debug API

Debug methods replay transactions and blocks for development and incident analysis. They are computationally expensive, so availability and rate limits vary by node provider.

Trace a transaction

Inspect full EVM execution for a transaction.

Trace a block

Replay all transactions in a block by number or hash.

Flashblocks Behavior Matrix

The table below is the canonical behavior summary for pages that need exact Flashblocks semantics. Most app developers only need the decision table above; use this section when you are choosing method-level behavior or documenting provider expectations.
Use the Flashblocks endpoint with the "pending" block tag when you want preconfirmed state.
SurfaceStandard RPCFlashblocks RPC
State reads: eth_call, eth_getBalance, eth_getStorageAt, eth_getCode, eth_getTransactionCountEthereum JSON-RPC behavior against sealed blocks or standard pending state.With "pending", reflects the current Flashblock state.
Block reads: eth_getBlockByNumber, eth_getBlockReceipts, block transaction counts by numberEthereum JSON-RPC behavior against sealed blocks.With "pending", reflects the current Flashblock state.
eth_getBlockByHash and block transaction counts by hash do not use a "pending" tag because they identify an explicit block hash.
Transaction and receipt lookups by hash do not accept a "pending" parameter. Flashblocks behavior is selected by using a Flashblocks RPC endpoint.
MethodStandard RPCFlashblocks RPC
eth_getTransactionByHashReturns sealed transaction data, or null if not found.Can return preconfirmed transaction data from the Flashblocks cache before the L2 block seals.
eth_getTransactionReceiptReturns sealed receipt data, or null if not found.Can return preconfirmed receipt data from the Flashblocks cache before the L2 block seals.
Preconfirmed by-hash responses can be reorged before the full L2 block seals.
Flashblocks-only methods and subscriptions are available only on Flashblocks endpoints.
SurfaceBehavior
eth_simulateV1Simulates bundles against preconfirmed state.
base_transactionStatusChecks whether a transaction has reached the mempool.
newFlashblockTransactionsStreams individual preconfirmed transactions.
pendingLogsStreams filtered logs from preconfirmed transactions.
newFlashblocksStreams Flashblock payloads over WebSocket.
The raw Flashblocks WebSocket stream is intended for infrastructure and node operators, not normal application polling. Applications should usually use RPC methods, by-hash lookups, or Flashblocks subscriptions instead.Azul removes account balances and receipts from the raw WebSocket payload. Apps that need preconfirmed transaction or receipt data should use Flashblocks RPC behavior rather than depending on raw stream payload fields.

Request and Response Format

All JSON-RPC requests are HTTP POST requests with Content-Type: application/json. Every request includes the JSON-RPC version, method name, ordered parameters, and an ID that is echoed back in the response.
FieldTypeDescription
jsonrpcstringAlways "2.0"
methodstringThe RPC method name
paramsarrayMethod parameters in order
idnumber | stringIdentifier echoed back in the response
Successful responses include jsonrpc, id, and result. Error responses include jsonrpc, id, and an error object with a numeric code and human-readable message.

Error Codes

CodeNameDescription
-32700Parse errorInvalid JSON
-32600Invalid requestNot a valid JSON-RPC 2.0 object
-32601Method not foundMethod does not exist or is unavailable
-32602Invalid paramsInvalid method parameters
-32603Internal errorInternal JSON-RPC error
-32000Server errorNode-specific error. See the returned message for details.

Block Parameters

ValueStandard RPCFlashblocks RPC
"latest"Most recently sealed blockMost recently sealed block
"pending"Unmined transaction pool stateCurrent Flashblock in progress, at about 200ms resolution
"safe"Latest safe blockLatest safe block
"finalized"Latest finalized blockLatest finalized block
"earliest"Genesis blockGenesis block
"0x<n>"Specific block by numberSpecific block by number