X Layer logo

X Layer Testnet

RPC Endpoints

Chain ID: 0xc3 · OKB

Other X Layer networks:Mainnet
How to add X Layer to MetaMask or other wallets

X Layer Testnet uses OKB as its native currency. Chain ID: 195 (0xc3). Below are 2 public RPC endpoints you can use to connect wallets, dApps, and developer tools to X Layer Testnet.

StatusRPC EndpointChain IDCurrencyExplorerWallet
Checking
https://testrpc.xlayer.tech
0xc3OKBExplorer
Checking
https://xlayertestrpc.okx.com
0xc3OKBExplorer

Connect to X Layer Testnet with ethers.js

import { ethers } from "ethers";

const provider = new ethers.JsonRpcProvider("https://testrpc.xlayer.tech");

const network = await provider.getNetwork();
console.log(network.chainId); // 195n

X Layer Testnet — common questions

What is the RPC URL for X Layer Testnet?
There are 2 public RPC endpoints for X Layer Testnet, including https://testrpc.xlayer.tech. See the full list in the table above.
What is the Chain ID for X Layer Testnet?
The Chain ID for X Layer Testnet is 195 (0xc3 in hexadecimal).
What is the native currency of X Layer Testnet?
The native currency of X Layer Testnet is OKB.
How do I add X Layer Testnet to MetaMask?
Use the "Add to Wallet" button on this page to add X Layer Testnet to MetaMask automatically, or follow our step-by-step guide for X Layer.