DEV Community

OnFinality
OnFinality

Posted on • Originally published at onfinality.io

Celo RPC Endpoint: Chain Settings, Faucet, and Debugging for Developers

Celo RPC Endpoint Decision Checklist

Before connecting your application to Celo, verify these points:

Criterion What to check Why it matters
Network selection Mainnet (Chain ID 42220) vs Testnet (Chain ID 11142220) Prevents cross-network transaction errors
Public vs private RPC Rate limits, reliability, and uptime SLAs Public endpoints throttle requests; production apps need dedicated infrastructure
Endpoint security HTTPS vs WS; credentials if using private node Avoids man-in-the-middle attacks and data leaks
Supported methods eth_call, eth_sendRawTransaction, eth_getLogs, etc. Ensure your dApp requirements are met
Archive data availability Historic state access for analytics or explorers Some methods require archive nodes

What Is Celo and Why Do You Need an RPC Endpoint?

Celo is a mobile-first, EVM-compatible blockchain focused on financial inclusion. It uses a proof-of-stake consensus and features stablecoins like cUSD and cEUR. To interact with Celo — read balances, send transactions, or query smart contracts — you need a Remote Procedure Call (RPC) endpoint. Celo RPC endpoints act as the gateway between your dApp and the blockchain. Whether you're building a DeFi app, a payment system, or an NFT marketplace, selecting the right RPC endpoint is critical for performance and reliability.

Celo Mainnet RPC Configuration

The official Celo mainnet RPC endpoint is:

https://forno.celo.org
wss://forno.celo.org/ws
Enter fullscreen mode Exit fullscreen mode

Chain details:

⚠️ Note: The public forno endpoint is rate-limited. For production workloads, use a dedicated RPC provider like OnFinality or other services that offer higher throughput and SLAs.

You can also add Celo mainnet to MetaMask using the following configuration:

{
  "chainId": "42220",
  "chainName": "Celo Mainnet",
  "rpcUrls": ["https://forno.celo.org"],
  "nativeCurrency": {
    "name": "CELO",
    "symbol": "CELO",
    "decimals": 18
  },
  "blockExplorerUrls": ["https://celoscan.io"]
}
Enter fullscreen mode Exit fullscreen mode

Celo Testnet (Sepolia) RPC Configuration

Celo’s developer testnet is now based on Ethereum Sepolia, replacing the deprecated Alfajores testnet. The testnet RPC endpoint is:

https://forno.celo-sepolia.celo-testnet.org
wss://forno.celo-sepolia.celo-testnet.org/ws
Enter fullscreen mode Exit fullscreen mode

Chain details:

MetaMask configuration:

{
  "chainId": "11142220",
  "chainName": "Celo Sepolia",
  "rpcUrls": ["https://forno.celo-sepolia.celo-testnet.org"],
  "nativeCurrency": {
    "name": "CELO",
    "symbol": "CELO",
    "decimals": 18
  },
  "blockExplorerUrls": ["https://celo-sepolia.blockscout.com"]
}
Enter fullscreen mode Exit fullscreen mode

Faucet for Testnet

To obtain testnet CELO, use the following faucets:

Debugging Common Celo RPC Issues

1. Rate Limiting

If you see 429 Too Many Requests or 403 Forbidden, you are hitting rate limits on public endpoints. Solutions:

  • Switch to a dedicated RPC provider.
  • Implement request batching and caching.
  • Use WebSocket connections for real-time updates.

2. Incorrect Chain ID

Ensure you are using chain ID 42220 for mainnet and 11142220 for testnet. Mismatched chain IDs cause transaction errors.

3. Block Height Discrepancies

If your node reports a different block height than explorers, your RPC endpoint may be behind. Use a provider with load balancing and failover to stay synced.

4. WebSocket Connection Drops

Stable WebSocket connections are essential for event listening. If drops occur, consider a provider with dedicated WebSocket support and reconnection logic.

How to Choose a Celo RPC Provider for Production

When selecting an RPC provider for your Celo dApp, evaluate the following:

  • Throughput and Limits: Public endpoints are shared and rate-limited. Dedicated nodes offer higher request limits.
  • Archive Support: If you need historical state, ensure the provider offers archive node access.
  • WebSocket Support: For real-time data, pick a provider with stable WebSocket endpoints.
  • Global Latency: Choose providers with points-of-presence (PoPs) near your user base to reduce latency.
  • Pricing Model: Some providers charge per request, others per compute unit. Understand your usage patterns.

OnFinality provides Celo RPC endpoints with high availability, WebSocket support, and flexible pricing. Check our pricing page for details.

Testing Your Celo RPC Connection

Use a simple curl command to verify your RPC endpoint is responsive:

curl -X POST https://forno.celo.org \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
Enter fullscreen mode Exit fullscreen mode

Expected response:

{"jsonrpc":"2.0","id":1,"result":"0x459fbe"}
Enter fullscreen mode Exit fullscreen mode

The result is the latest block number in hex. Convert to decimal to verify.

Key Takeaways

  • Celo mainnet uses chain ID 42220; testnet (Sepolia) uses 11142220.
  • Public endpoints like forno.celo.org are free but rate-limited.
  • For production dApps, choose a private RPC provider with SLAs.
  • Testnet faucets are available from Google Cloud and the Celo Foundation.
  • Always verify chain ID and endpoint availability before deployment.

FAQ

What is the Celo mainnet RPC URL?

The public endpoint is https://forno.celo.org. For dedicated access, use a provider like OnFinality.

How can I get Celo testnet tokens?

Use the Google Cloud Web3 faucet or the official Celo faucet at faucet.celo.org.

Does OnFinality support Celo?

Yes, OnFinality offers Celo mainnet RPC endpoints. See our supported networks for the full list.

What is the difference between Celo mainnet and Celo Sepolia?

Mainnet is the production network; Sepolia is a testnet using Ethereum Sepolia as its base layer, ideal for development.

How do I add Celo to MetaMask?

Use the chain configuration JSON provided above, or use ChainList to add it automatically.

Related resources

Originally published at OnFinality.

Top comments (0)