Base - Ethereum L2 Documentation
Complete guide to Base L2 integration with Dwellir RPC. Learn how to build on Base, access JSON-RPC methods, and optimize your dApp performance.
Base RPC endpoint: endpoint URLs, plans and pricing.
Base RPC
With Dwellir, you get access to our global Base network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.
Get your API keyBase RPC plans and rate limits
- Free plan: 20 responses per second, up to 100,000 responses a day.
- Plans: $49/mo, $299/mo, $999/mo with 25M, 150M, and 500M included responses. Overages billed at $5/$3/$2 per million responses respectively.
- Paid rate limits: 100 to 5,000 responses per second (bursts from 500 to 10,000), no daily limit.
- Billing: 1 response = 1 API credit on every shared plan, over HTTPS or WebSocket (WSS) where Base supports it.
Details: Pricing · Rate limits · Authentication · Archive nodes
Why Build on Base?
Base is Coinbase's Ethereum Layer 2 solution, designed to bring the next billion users onchain. Built on Optimism's OP Stack, Base offers:
Lightning Fast Performance
- 200ms blocks - A complete canonical block every 200ms since the Denim upgrade
- 10-100x lower costs than Ethereum mainnet
- EIP-4844 enabled - Leveraging blob data for even lower fees
Enterprise Security
- Backed by Coinbase - Institutional-grade infrastructure
- Ethereum security - Inherits L1 security guarantees
- Battle-tested - Built on proven Optimism technology
Massive Ecosystem
- 1M+ weekly active users - Rapidly growing user base
- $2B+ TVL - Strong DeFi ecosystem
- Major integrations - Circle USDC, Chainlink, The Graph
Quick Start with Base
Connect to Base in seconds with Dwellir's optimized endpoints:
curl -sS -X POST https://api-base-mainnet-archive.n.dwellir.com/<your-api-key> \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'Installation & Setup
Network Information
| Parameter | Value | Details |
|---|---|---|
| Chain ID | 8453 | Mainnet |
| Block Time | 200ms | Canonical blocks since Denim |
| Gas Token | ETH | Native token |
| RPC Standard | Ethereum | JSON-RPC 2.0 |
API Reference
Base supports the full Ethereum JSON-RPC API specification plus Base-specific methods.
Denim and 200ms blocks
Base activated the Denim upgrade on Base Sepolia on October 21, 2026, and on Base Mainnet on November 5, 2026. Base now produces one complete canonical block every 200ms. Each block has its own number, hash, state root, and receipts.
A 200ms block is not finality. Every block still moves through the unsafe, safe, and finalized states, so keep your confirmation policy and reorg handling.
Check two assumptions in existing code:
- Block counts:
block.numberadvances 10 times faster than before Denim. Audit deadlines and cooldowns that count blocks. - Timestamps:
timestampstays in whole seconds. Block and header responses add an optionaltimestampMsfield. Mined transactions and logs add an optionalblockTimestampMsfield. Handle both when absent.
Flashblocks history
From July 2025 until Denim, Flashblocks streamed 200ms preconfirmations inside 2-second canonical blocks. Denim retired them. Flashblocks subscriptions no longer deliver notifications, and preconfirmed state has no direct replacement.
If your code still uses a Flashblocks interface, replace it:
| Flashblocks interface | Use now |
|---|---|
newFlashblocks | newHeads |
pendingLogs | logs |
newFlashblockTransactions | newHeads, then fetch each canonical block |
"pending" reads | "latest". Base still accepts "pending", but it resolves to the latest canonical block. |
| Preconfirmed receipts | eth_getTransactionReceipt once the transaction is in a canonical block |
The Base Denim migration guide explains each change. Base publishes the full migration table.
Common Integration Patterns
Transaction Monitoring
Monitor pending and confirmed transactions efficiently:
// Watch for transaction confirmation
async function waitForTransaction(txHash) {
const receipt = await provider.waitForTransaction(txHash, 1);
// L2 specific: Check L1 data availability
if (receipt.l1Fee) {
console.log('L1 data cost:', receipt.l1Fee);
}
return receipt;
}Gas Optimization
Optimize gas costs on Base L2:
// Estimate L2 execution gas
const l2Gas = await provider.estimateGas(tx);
// Get current L1 data fee (Base specific)
const l1DataFee = await provider.send('eth_estimateL1Fee', [tx]);
// Total cost = L2 execution + L1 data posting
const totalCost = l2Gas + BigInt(l1DataFee);Event Filtering
Efficiently query contract events:
// Query events with automatic retry and pagination
async function getEvents(contract, eventName, fromBlock = 0) {
const filter = contract.filters[eventName]();
const events = [];
const batchSize = 2000; // Base recommended batch size
for (let i = fromBlock; i <= currentBlock; i += batchSize) {
const batch = await contract.queryFilter(
filter,
i,
Math.min(i + batchSize - 1, currentBlock)
);
events.push(...batch);
}
return events;
}eth_coinbase
Check the legacy eth_coinbase compatibility method on Avalanche. Public endpoints may return an address, `unimplemented`, or another unsupported-method response depending on the client.
eth_blockNumber
Get the current block height on Base. Essential for syncing dApps, monitoring transaction confirmations, and blockchain state tracking.