X Layer Mainnet
RPC EndpointsChain ID: 0xc4 · OKB
Other X Layer networks:Testnet
X Layer Mainnet uses OKB as its native currency. Chain ID: 196 (0xc4). Below are 2 public RPC endpoints you can use to connect wallets, dApps, and developer tools to X Layer Mainnet.
Connect to X Layer Mainnet with ethers.js
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider("https://rpc.xlayer.tech");
const network = await provider.getNetwork();
console.log(network.chainId); // 196nX Layer Mainnet — common questions
What is the RPC URL for X Layer Mainnet?
There are 2 public RPC endpoints for X Layer Mainnet, including https://rpc.xlayer.tech. See the full list in the table above.
What is the Chain ID for X Layer Mainnet?
The Chain ID for X Layer Mainnet is 196 (0xc4 in hexadecimal).
What is the native currency of X Layer Mainnet?
The native currency of X Layer Mainnet is OKB.
How do I add X Layer Mainnet to MetaMask?
Use the "Add to Wallet" button on this page to add X Layer Mainnet to MetaMask automatically, or follow our step-by-step guide for X Layer.