Skip to main content

Documentation Index

Fetch the complete documentation index at: https://base-a060aa97-roethke-refactor-docs-icp.mintlify.app/llms.txt

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

Base exposes a single, fully EVM-compatible JSON-RPC API across two performance tiers. You can move from 2-second block confirmations to 200ms pre-confirmations by switching one URL and one block tag.

Networks

NetworkChain IDTypeArchive
Mainnet8453ProductionYes
Sepolia84532TestnetYes

Endpoints

TierHTTPWSS
Standardhttps://mainnet.base.orgwss://mainnet.base.org
Flashblockshttps://mainnet-preconf.base.orgwss://mainnet-preconf.base.org
The public endpoints above are rate-limited and not suitable for production traffic. For production use, connect through a node provider.

What is the Flashblocks Tier?

Flashblocks endpoints are fully EVM-equivalent; every standard eth_ method works identically. The difference is in what the pending block tag returns:
  • On Standard endpoints, pending reflects the transaction pool (unmined state).
  • On Flashblocks endpoints, pending reflects the current pre-confirmed block in progress, updated every ~200ms with new batches of sequencer-ordered transactions.
Calls like eth_getBalance, eth_getStorageAt, and eth_call run against real sequencer state up to 1.8 seconds before the block seals, with sub-second latency.

API Reference

Ethereum JSON-RPC API

Core Ethereum protocol methods for account queries, block and transaction data, gas estimation, and log filtering. All methods work on both Standard and Flashblocks endpoints.
Methods marked ✓ support the "pending" block tag on Flashblocks endpoints.
MethodDescriptionFlashblocks pending
eth_blockNumberCurrent block number
eth_getBalanceAccount ETH balance
eth_getTransactionCountAccount nonce / tx count
eth_getCodeDeployed contract bytecode
eth_getStorageAtContract storage slot value
eth_callExecute read-only call
eth_getBlockByNumberBlock data by number
eth_getBlockByHashBlock data by hash
eth_getBlockReceiptsAll receipts for a block
eth_getBlockTransactionCountByNumberTx count by block number
eth_getBlockTransactionCountByHashTx count by block hash
eth_getTransactionByHashTransaction data by hash
eth_getTransactionByBlockHashAndIndexTx by block hash and index
eth_getTransactionByBlockNumberAndIndexTx by block number and index
eth_getTransactionReceiptReceipt for a mined tx
eth_sendRawTransactionSubmit signed transaction
eth_gasPriceCurrent gas price
eth_maxPriorityFeePerGasMax priority fee estimate
eth_feeHistoryHistorical base fee and rewards
eth_estimateGasEstimate gas for a tx
eth_getLogsQuery event logs by filter
eth_chainIdNetwork chain ID
eth_syncingNode sync status
net_versionNetwork version ID
web3_clientVersionClient version string
eth_subscribeSubscribe to events (WSS)
eth_unsubscribeCancel a subscription (WSS)

Flashblocks API

Pre-confirmation methods for sub-second transaction signals on Base. These methods are only available on Flashblocks endpoints and enable reading state, simulating bundles, and streaming events up to ~1.8 seconds before a block seals.
MethodDescription
eth_simulateV1Simulate transaction bundles against pre-confirmed state
base_transactionStatusCheck if a transaction has been received by the mempool
newFlashblockTransactionsSubscribe to individual pre-confirmed transactions
pendingLogsSubscribe to filtered logs from pre-confirmed transactions
newFlashblocksSubscribe to full Flashblock payload stream

Debug API

Development and debugging utilities for deep transaction inspection and block replay. Debug methods replay transactions and are computationally expensive — availability and rate limits vary by node provider.
MethodDescription
debug_traceTransactionFull EVM execution trace for a transaction
debug_traceBlockByHashEVM traces for all transactions in a block by hash
debug_traceBlockByNumberEVM traces for all transactions in a block by number

Request & Response Format

All requests are HTTP POST with Content-Type: application/json.
FieldTypeDescription
jsonrpcstringAlways "2.0"
methodstringThe RPC method name
paramsarrayMethod parameters in order
idnumber | stringIdentifier echoed back in the response
Request:
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": ["0x742d35Cc6634C0532925a3b8D4C9dD0b4f3BaEa", "pending"],
  "id": 1
}
Success response:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1a055690d9db80000"
}
Error response:
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32602,
    "message": "Invalid params"
  }
}

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 message)

Block Parameters

ValueStandardFlashblocks
"latest"Most recently sealed blockMost recently sealed block
"pending"Unmined transaction pool stateCurrent Flashblock in progress (~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

Rollup Node API

The rollup node exposes one additional RPC method not part of the standard Ethereum JSON-RPC API. It is used internally by the fault proof system to retrieve L2 output roots.

optimism_outputAtBlock

Returns an output root and associated metadata for a given L2 block number. The output root is a 32-byte commitment used by the fault proof proposer to anchor disputed L2 state on L1. Parameters
NameTypeDescription
blockNumberQUANTITY, 64 bitsL2 integer block number
Returns
NameTypeDescription
versionDATA, 32 BytesOutput root version number, beginning with 0
outputRootDATA, 32 BytesThe output root
blockRefObjectL2 block reference — hash, number, parentHash, timestamp, l1origin, sequenceNumber
withdrawalStorageRootDATA, 32 BytesStorage root of the L2ToL1MessagePasser contract
stateRootDATA, 32 BytesThe state root
syncStatusObjectSnapshot of the rollup driver sync state across L1 and L2 heads