Summary
Gnosis Chain is an EVM-compatible network with chain ID 100 and xDAI as its native currency. Public RPC endpoints like https://rpc.gnosischain.com work for light testing, but production apps need reliable, scalable infrastructure. This article lists common Gnosis RPC endpoints, explains how to evaluate them, and shows how to connect with ethers.js, viem, and MetaMask.
Quick recommendation: how to pick a Gnosis RPC endpoint
If you are prototyping or testing a wallet connection, a public Gnosis RPC endpoint such as https://rpc.gnosischain.com or https://gnosis.api.onfinality.io/public is enough. For a production dApp, indexer, or trading bot, you need more than a URL: you need throughput guarantees, WebSocket support, archive data, and a provider that can absorb traffic spikes without rate limiting your users.
Before you commit to an endpoint, ask these questions:
- What methods do you need? Basic
eth_callandeth_getBalancework on most public endpoints. Trace and debug methods usually require a dedicated or archive node. - Do you need WebSocket? If your app subscribes to pending transactions or new blocks, check that the provider offers a stable WSS URL.
- What is your request volume? Public endpoints are shared and can throttle you. Estimate your peak requests per second and compare with provider limits.
- Do you need historical state? Archive nodes let you query state at any past block. If your app needs this, a managed provider with archive support is safer.
For a production setup, consider a managed RPC provider like OnFinality. You get dedicated throughput, multiple endpoints, and support for the methods your app relies on. Check the supported networks page to see if Gnosis is covered.
Gnosis chain settings at a glance
Gnosis Chain is an EVM-compatible network that uses a proof-of-stake consensus. Here are the key settings you need for wallets and dApps:
| Setting | Value |
|---|---|
| Chain ID | 100 (0x64) |
| Native currency | xDAI (XDAI) |
| Symbol | XDAI |
| Decimals | 18 |
| Block explorer | https://gnosisscan.io |
| Public RPC (official) | https://rpc.gnosischain.com |
| Public RPC (OnFinality) | https://gnosis.api.onfinality.io/public |
| WebSocket (official) | wss://rpc.gnosischain.com/wss |
These values are consistent with the chain configuration used by most wallets and tools. When you add Gnosis to MetaMask or another wallet, you will need the chain ID, currency symbol, and an RPC URL.
Where to find a reliable Gnosis RPC list
Several community-maintained lists exist, such as ChainList and RPC Node List. They show public endpoints with latency and status, but they are not a substitute for evaluating a provider yourself. A public list can help you discover options, but it does not tell you about rate limits, data freshness, or the provider's operational practices.
For a production decision, use the official Gnosis documentation as a starting point. It lists professional RPC providers that the Gnosis team recommends. You can also check the OnFinality Gnosis network page for managed endpoint options.
Public Gnosis RPC endpoints: what to expect
Public endpoints are free and easy to use, but they come with tradeoffs. Here are some commonly listed public Gnosis RPC URLs:
https://rpc.gnosischain.com– official Gnosis starter RPChttps://gnosis.api.onfinality.io/public– OnFinality public endpointhttps://rpc.ankr.com/gnosis– Ankr public endpointhttps://gnosis.drpc.org– dRPC public endpointhttps://public.1rpc.io/gnosis– 1RPC public endpoint
These endpoints are fine for development, but they are shared. If your app makes many requests, you may hit rate limits or experience slower responses during peak times. For production, you should use a managed provider that offers SLAs and dedicated resources.
How to connect to Gnosis with ethers.js
Here is a simple example using ethers.js v6 to connect to Gnosis and check the chain ID:
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider("https://gnosis.api.onfinality.io/public");
async function main() {
const network = await provider.getNetwork();
console.log("Chain ID:", network.chainId); // 100n
const blockNumber = await provider.getBlockNumber();
console.log("Latest block:", blockNumber);
}
main().catch(console.error);
Replace the URL with any endpoint from your provider. For WebSocket subscriptions, use a WSS URL:
import { ethers } from "ethers";
const provider = new ethers.WebSocketProvider("wss://rpc.gnosischain.com/wss");
provider.on("block", (blockNumber) => {
console.log("New block:", blockNumber);
});
Adding Gnosis to MetaMask
To add Gnosis to MetaMask, use the network settings below:
- Network Name: Gnosis
- New RPC URL:
https://gnosis.api.onfinality.io/public - Chain ID: 100
- Currency Symbol: XDAI
- Block Explorer URL:
https://gnosisscan.io
You can also use the ChainList website to add the network with one click, but verify the RPC URL and chain ID before confirming.
Public vs managed Gnosis RPC: what to compare
When you evaluate a Gnosis RPC provider, compare these factors:
| Factor | Public endpoint | Managed provider (e.g., OnFinality) |
|---|---|---|
| Cost | Free | Usage-based or subscription |
| Rate limits | Often strict | Configurable, higher limits |
| Reliability | Best-effort | SLAs and monitoring |
| WebSocket | Sometimes available | Usually included |
| Archive data | Rarely | Often available |
| Trace/debug methods | Usually not | Available on dedicated nodes |
| Support | Community | Dedicated support |
For a production app, the choice is clear: use a managed provider. The cost is justified by the reliability and features you get.
Using viem with Gnosis
If you prefer viem, here is how to create a public client:
import { createPublicClient, http } from "viem";
import { gnosis } from "viem/chains";
const client = createPublicClient({
chain: gnosis,
transport: http("https://gnosis.api.onfinality.io/public"),
});
const blockNumber = await client.getBlockNumber();
console.log("Latest block:", blockNumber);
Viem includes Gnosis in its chain definitions, so you do not need to define the chain manually.
Common pitfalls when using Gnosis RPC
- Using the wrong chain ID: Always use 100, not 1 or 56. A mismatch will cause transactions to fail.
- Ignoring rate limits: Public endpoints can throttle you. Monitor your request volume and switch to a managed provider if you hit limits.
- Assuming archive support: Many public endpoints only serve recent state. If you need historical data, confirm archive support.
- Using HTTP for subscriptions: WebSocket is required for real-time events. HTTP polling is inefficient and can miss events.
- Not testing failover: If your app depends on a single RPC URL, you have a single point of failure. Use multiple endpoints or a provider with built-in failover.
Key Takeaways
- Gnosis Chain uses chain ID 100 and xDAI as its native currency.
- Public RPC endpoints are fine for development, but production apps need managed infrastructure.
- Evaluate providers on rate limits, WebSocket support, archive data, and reliability.
- Use the official Gnosis docs and provider lists as a starting point, but verify endpoints yourself.
- OnFinality offers managed Gnosis RPC with scalable infrastructure. See RPC pricing and supported networks.
Frequently Asked Questions
What is the RPC URL for Gnosis Mainnet?
A common public RPC URL is https://rpc.gnosischain.com. OnFinality also provides a public endpoint at https://gnosis.api.onfinality.io/public. For production, use a managed provider.
What is the chain ID for Gnosis?
The chain ID is 100 (0x64).
What is the native currency of Gnosis?
The native currency is xDAI, with symbol XDAI and 18 decimals.
How do I add Gnosis to MetaMask?
Use the network settings: RPC URL https://gnosis.api.onfinality.io/public, chain ID 100, symbol XDAI, and explorer https://gnosisscan.io.
Does OnFinality support Gnosis?
Yes, OnFinality provides Gnosis RPC endpoints. Visit the Gnosis network page for details.