Summary
Unichain is an Ethereum L2 built on the OP Stack, and its RPC API follows standard Ethereum JSON-RPC. The mainnet chain ID is 130, and the network uses ETH as its native currency. You can start with a public endpoint such as https://unichain.api.onfinality.io/public for testing, then move to a managed RPC API for production.
Before integrating Unichain, verify WebSocket support, archive data, and rate limits with your chosen provider. OnFinality offers public Unichain RPC access, managed API plans, and dedicated node options. Check the supported networks and pricing pages for the latest details.
Unichain RPC decision checklist
Before you point a wallet, indexer, or dApp at Unichain, confirm these details:
- Chain ID: mainnet is 130 (
0x82). Testnet IDs are different and should be confirmed against the Uniswap docs or Chainlist. - Endpoint type: public endpoints are fine for prototyping; production apps need a managed or dedicated RPC endpoint.
- WebSocket support: if you need
eth_subscribefor pending transactions or logs, verify the provider exposes awss://URL. - Archive data: historical state queries require an archive-capable node. Check whether the provider offers archive access.
- Rate limits: public endpoints may limit requests per second. Review the provider's usage policy before launch.
- Gas token and explorer: ETH is the gas token. Use the official explorer or Blockscout for verification.
After the checklist, keep this reference close: eth_chainId should return 0x82 on Unichain mainnet.
What is Unichain?
Unichain is an Ethereum Layer 2 rollup built by Uniswap Labs on the OP Stack. It is designed for DeFi workloads, with fast blocks, lower transaction costs, and easier access to cross-chain liquidity. Because it is part of the Superchain, it shares the same broad security model as other OP Stack chains and can interoperate with them over time.
For RPC consumers, the most relevant detail is that Unichain is EVM-compatible. It exposes the same JSON-RPC surface as Ethereum, Optimism, and Base. A contract that runs on Ethereum will behave the same way on Unichain, subject to the rollup's own fee market and block production. The network uses ETH as its native currency, so wallet configuration is simple: chain ID 130, symbol ETH, and an explorer URL.
Unichain's technical highlights include 1-second block times, with certain preconfirmation mechanisms available through Flashblocks. This makes it a good fit for applications where latency matters, such as aggregators, arbitrage bots, and DEX interfaces. The tradeoff is that these workloads also need an RPC provider that can keep up with frequent polling and WebSocket subscriptions.
Unichain chain settings
Use these values when adding Unichain to a wallet, subgraph, or dApp.
| Setting | Mainnet value |
|---|---|
| Network name | Unichain |
| Chain ID | 130 (0x82) |
| Currency symbol | ETH |
| Block time | 1 second |
| Block gas limit | 60,000,000 |
| Official explorer | https://uniscan.xyz |
| Blockscout explorer | https://unichain.blockscout.com |
| Official RPC | https://mainnet.unichain.org |
| OnFinality public RPC | https://unichain.api.onfinality.io/public |
| Public WebSocket example | wss://unichain-rpc.publicnode.com |
The hex chain ID is useful when configuring networks that expect hexadecimal values. Verify the network by calling eth_chainId and checking that the result is 0x82.
For testnet deployments, use the Uniswap developer docs to find the current Sepolia chain ID, RPC URL, and any test token details. Testnet settings can change during development, so do not hardcode them without checking first.
Public and managed Unichain RPC endpoints
You can start calling Unichain in minutes with a public RPC endpoint. These URLs are maintained by different providers and are useful for testing:
- https://unichain.api.onfinality.io/public — OnFinality's public Unichain endpoint
- https://mainnet.unichain.org — the official Unichain public endpoint
- https://unichain-rpc.publicnode.com — PublicNode HTTP endpoint
- wss://unichain-rpc.publicnode.com — PublicNode WebSocket endpoint
- https://unichain.drpc.org — dRPC HTTP endpoint
Public endpoints are shared by many users. They are a fast way to validate a script or run a hackathon demo, but they are not a reliable foundation for a production service. Usage limits, request latency, and data availability can vary.
A managed RPC API gives you a dedicated API key, configurable limits, and a consistent support path. OnFinality's API service provides Unichain RPC access alongside many other networks. If your workload needs isolated capacity, a dedicated node gives you your own instance rather than a shared endpoint.
Before committing to a provider, check the supported RPC networks page to see what is currently enabled for Unichain and what features are available, such as WebSocket, archive data, and trace methods.
Make your first Unichain RPC call
Start with eth_chainId to confirm the endpoint is pointing at Unichain.
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' https://unichain.api.onfinality.io/public
The response should be:
{"jsonrpc":"2.0","id":1,"result":"0x82"}
Next, get the latest block number:
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":2}' https://unichain.api.onfinality.io/public
The result is a hex-encoded block number. You can also read an account balance with eth_getBalance:
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x0000000000000000000000000000000000000000","latest"],"id":3}' https://unichain.api.onfinality.io/public
For larger applications, use a JavaScript library like viem to keep the code readable:
import { createPublicClient, http } from 'viem'
const client = createPublicClient({
transport: http('https://unichain.api.onfinality.io/public')
})
const chainId = await client.getChainId()
const blockNumber = await client.getBlockNumber()
console.log({ chainId, blockNumber })
These calls work with any Ethereum-compatible tool. The same pattern applies to eth_call, eth_sendRawTransaction, and eth_getLogs.
What to check when choosing an Unichain RPC provider
A single RPC URL is not a complete infrastructure decision. The table below gives a starting point for comparing providers.
| Criterion | What to check | Why it matters |
|---|---|---|
| Endpoint type | Public, managed, or dedicated | Public endpoints are suitable for prototyping; production workloads usually need a managed API or dedicated node |
| WebSocket support | Does the provider offer wss://? | Live data such as pending transactions and logs requires WebSocket subscriptions |
| Archive state | Are historical blocks and state retained? | Backtesting, analytics, and audit tooling depend on archive access |
| Rate limits | Request-per-second and daily compute limits | Shared endpoints can throttle traffic during peak usage |
| Data retention | How far back does log data extend? | Indexers need a consistent window of historical data |
| Support channel | Documentation, status page, and technical support | Downtime resolution speed affects user experience |
| Pricing model | Compute units, monthly plans, or per-request billing | Costs become unpredictable when traffic scales |
OnFinality's RPC pricing lists the current plans, and the supported RPC networks page shows the feature set for Unichain. If you are evaluating multiple providers, run the same JSON-RPC calls above on each endpoint and compare latency, error rates, and response shape.
Common Unichain RPC pitfalls and troubleshooting
Wallet shows the wrong network
Check that your wallet configuration uses chain ID 130. Calling eth_chainId should return 0x82. Most wallet errors come from mixing up testnet and mainnet chain IDs.
Requests fail at random
Shared public endpoints can reject requests when rate limits are hit. Retry with backoff, or switch to a managed RPC API before launch.
WebSocket connections drop
If you use eth_subscribe, make sure the provider supports WebSocket and that you are reconnecting with a backoff strategy. Do not try to reuse an HTTPS RPC URL for WebSocket subscriptions.
Transactions are stuck or dropped
On L2 networks, fee estimation can be different from Ethereum. Use eth_estimateGas before sending transactions, and monitor network conditions through a WebSocket subscription.
Nonce errors
When submitting transactions in parallel, use a local transaction manager and update the nonce after each confirmation. Common errors include "nonce too low" and "replacement transaction underpriced".
Historical data is missing
If your query returns nothing for older blocks, the node may not keep archive data. Choose a provider with archive support when you need historical state.
Incorrect block explorer in the app
Unichain has multiple explorers, including Uniscan and Blockscout. Use the correct explorer URL in your UI links so users land on the right transaction.
Key Takeaways
- Unichain is an OP Stack Ethereum L2 with standard Ethereum JSON-RPC support.
- Mainnet chain ID is 130 (
0x82), and the native currency is ETH. - Use a public RPC endpoint for quick tests, but plan to move to a managed API for production.
- Validate WebSocket support, archive data, rate limits, and provider pricing before committing.
- OnFinality offers a public Unichain RPC endpoint, managed RPC API access, and dedicated node options; see RPC pricing and supported RPC networks for current details.
Frequently Asked Questions
Does Unichain support Ethereum JSON-RPC?
Yes. Unichain supports the same core JSON-RPC methods as Ethereum, including eth_call, eth_getBalance, eth_getLogs, and eth_sendRawTransaction. OP Stack rollup methods are also available.
What is the RPC URL for Unichain mainnet?
There are several public options. One is https://unichain.api.onfinality.io/public, and another is https://mainnet.unichain.org. For production workloads, use a managed RPC API or dedicated node.
What chain ID is Unichain?
Unichain mainnet uses chain ID 130. In hexadecimal, this is 0x82. Testnet settings are different, so confirm them in the Uniswap developer documentation.
Can I call Unichain with viem or ethers.js?
Yes. Both libraries support Unichain because it is EVM-compatible. Get a provider with any Unichain RPC URL and start calling standard methods.
Do I need an API key to use Unichain RPC?
The public OnFinality endpoint accepts anonymous requests. Managed API products require a key and offer higher limits. See RPC pricing for current options.
How do I get Unichain testnet ETH?
Faucets and test token distribution change over time. Check the official Unichain developer documentation for the current testnet faucet or ask in the Uniswap developer community.