Logo
New RPC users get 35% off their first monthView the offer
RPC Assistant

Base RPC URL, Chain ID & Public Endpoint Setup

Summary

Base mainnet uses chain ID 8453 (0x2105) and the OnFinality public RPC endpoint https://base.api.onfinality.io/public. Use this URL for read-only testing, wallet setup, and initial dApp connections. For production traffic, authenticate with an OnFinality endpoint from the Base Hub and verify archive or Trace availability for your plan. Configure wallets with the Base explorer https://basescan.org and network name Base Mainnet. Example curl, ethers, and viem snippets are provided below, including wallet settings and code examples. Public endpoints are convenient but may be rate-limited and are not a substitute for a production RPC plan. Start with the public endpoint to validate your application flow, then move to a dedicated or authenticated endpoint before handling real users. For testnet work, use Base Sepolia chain ID 84532 and the endpoint https://base-sepolia.api.onfinality.io/public; testnet explorer is https://sepolia.basescan.org. See /networks/base for full Base network details and /rpc-assistant/rpc-providers-supporting-base-rpc for a provider comparison workflow.

Key Takeaways

  • Base mainnet chain ID is 8453 (0x2105); the OnFinality public endpoint is https://base.api.onfinality.io/public.
  • Wallet setup requires the RPC URL, chain ID 8453, ETH symbol, and Base explorer https://basescan.org.
  • Public endpoints are for prototyping and testing; production traffic needs an authenticated OnFinality endpoint.
  • Move from public to production using the Base Hub and the provider comparison guide.

Base mainnet RPC URL and chain ID 8453

Base is an OP Stack Layer 2 with EVM-compatible JSON-RPC. The OnFinality public endpoint for Base mainnet is https://base.api.onfinality.io/public. Use it for quick reads, wallet setup, and prototyping. The network uses chain ID 8453 (0x2105) and ETH as the native currency.

Archive and Trace node types appear in the current Base network configuration, but availability may vary by plan. Confirm your plan includes the data access you need before relying on it in production. Full network details are on the Base network page.

CriterionWhat to checkWhy it matters
Network NameBase MainnetUse this name when adding the network to wallets.
Chain ID8453 (0x2105)Identifies Base mainnet; mismatches cause transaction failures.
Native CurrencyETHGas fees and balances are denominated in Ether.
Block Explorerhttps://basescan.orgVerify transactions and contracts on Base mainnet.
Public RPC Endpointhttps://base.api.onfinality.io/publicFree endpoint for testing and prototyping.
Testnet Chain ID84532Base Sepolia testnet has a separate chain ID.
Testnet RPC Endpointhttps://base-sepolia.api.onfinality.io/publicPublic endpoint for Base Sepolia development.
Testnet Explorerhttps://sepolia.basescan.orgVerify testnet transactions and contracts.

Wallet configuration and Base explorer

To add Base to MetaMask or another EVM wallet, provide the network name, RPC URL, chain ID, currency symbol, and explorer. Use https://basescan.org for mainnet transactions and contract verification.

Below is a wallet_addEthereumChain-compatible JSON structure. Replace the RPC URL with your authenticated OnFinality endpoint when you move beyond public testing.

``json { "chainId": "0x2105", "chainName": "Base Mainnet", "nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 }, "rpcUrls": ["https://base.api.onfinality.io/public"], "blockExplorerUrls": ["https://basescan.org"] } ``

Connection examples: curl, ethers, viem

Start with the public endpoint for read-only calls. For authenticated traffic, replace YOUR_ENDPOINT with the endpoint shown in your OnFinality Base Hub. The examples below use https://base.api.onfinality.io/public for quick testing.

curl example: ```bash curl https://base.api.onfinality.io/public \ -X POST \ -H "Content-Type: application/json" \ --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' ```

ethers.js v6 example: ``javascript import { ethers } from "ethers"; // Public endpoint for prototyping const publicProvider = new ethers.JsonRpcProvider( "https://base.api.onfinality.io/public" ); // Authenticated production endpoint // Replace YOUR_ENDPOINT with your OnFinality Base Hub endpoint // const provider = new ethers.JsonRpcProvider( // "https://base.api.onfinality.io/YOUR_ENDPOINT" // ); ``

viem example: ``typescript import { createPublicClient, http } from "viem"; import { base } from "viem/chains"; // Public endpoint const client = createPublicClient({ chain: base, transport: http("https://base.api.onfinality.io/public"), }); // Authentication placeholder: // transport: http("https://base.api.onfinality.io/YOUR_ENDPOINT") ``

  • Use eth_chainId to confirm the endpoint returns 0x2105.
  • For production, replace the public URL with your authenticated endpoint from the Base Hub.

Public endpoint limitations and safe production testing

Public endpoints are shared, free, and useful for early development. They are not designed for sustained production traffic. Rate limits, timeouts, and connectivity issues can occur, and transport capabilities such as WebSocket or archive data may be restricted.

Treat public endpoints as a staging tool. Test contract calls, wallet flows, indexing logic, and error handling before moving to a production plan.

  • Do not use a public endpoint for revenue-critical transactions or high-frequency writes.
  • Confirm WebSocket support before building subscription features; public Base endpoints are typically HTTP-only.
  • Check archive and Trace access for your plan if you need historical state or transaction traces.
  • Keep testnet and mainnet environments separate using /rpc-assistant/base-sepolia-rpc for Base Sepolia.

Request errors, retries, and common issues

When a request fails, check the JSON-RPC error code and your network configuration. Public endpoints may return HTTP 429 for rate limiting. Retry with backoff for transient failures, but avoid retrying non-idempotent writes without careful nonce management.

CriterionWhat to checkWhy it matters
Wrong chain ID or network mismatchWallet or client configured for another chainVerify chain ID 8453 (0x2105) and RPC URL
HTTP 429 or rate limit errorPublic endpoint request volume exceededReduce request rate, add backoff, or move to an authenticated endpoint
Timeout or connection resetShared endpoint under load or network issueRetry with exponential backoff; switch to production endpoint for sustained traffic
nonce too lowTransaction nonce mismatch after retriesUse eth_getTransactionCount with pending block and manage nonces carefully
insufficient fundsWallet balance too low for gasFund wallet with ETH on Base mainnet; use test ETH on Sepolia for testing

Production upgrade path: Base Hub and provider comparison

When public testing is complete, create an authenticated endpoint in the OnFinality Base Hub. Replace the public URL with your plan endpoint in wallet config and application code. Verify archive and Trace support if required.

Choosing a production provider should be based on workload requirements, not a single endpoint URL. Use the provider comparison guide to evaluate method coverage, rate limits, archive data, trace support, WebSocket availability, pricing, and support.

  • Review the Base network page for current endpoint details and plan types.
  • Test your production candidate with realistic traffic before migrating.
  • Separate high-volume backend jobs from user-facing RPC traffic.
  • Keep testnet infrastructure ready for releases with Base Sepolia RPC.

Frequently Asked Questions

What is the Base RPC URL for OnFinality?

The public Base mainnet endpoint is https://base.api.onfinality.io/public. For production use, create an authenticated endpoint in the OnFinality Base Hub and replace YOUR_ENDPOINT in your connection string.

What is the Base chain ID?

Base mainnet chain ID is 8453 (0x2105). Base Sepolia testnet uses chain ID 84532.

Is the public Base endpoint free to use?

Yes, the public endpoint is available without an API key for testing and prototyping. It may be rate-limited and is not recommended for sustained production workloads.

Can I use WebSocket with the OnFinality Base public endpoint?

Public Base endpoints are typically HTTP-only. WebSocket support depends on your plan and should be verified in the Base Hub before building subscription features.

How do I move from public to a production Base RPC endpoint?

Create an authenticated endpoint in the OnFinality Base Hub, replace the public URL in your code and wallet settings, and verify archive or Trace support if needed. Use the provider comparison guide at /rpc-assistant/rpc-providers-supporting-base-rpc to evaluate requirements.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started