Networks
Add XGR network in MetaMask (Mobile)
Install MetaMask first: metamask.io (official download).
On iPhone/Android, MetaMask does not inject a wallet provider into Safari/Chrome. Adding a network only works inside the MetaMask in-app browser.
- Recommended: Open the MetaMask app first and unlock it (log in).
- Return to this page and tap “Add to MetaMask”.
- Wait a few seconds until MetaMask asks to open this site in its in-app browser. Confirm.
- When the XGR network add dialog appears, verify the network name/RPC and confirm.
If you prefer not to unlock first: tap “Add to MetaMask” once, unlock MetaMask when it opens, then return here and tap “Add to MetaMask” again.
Testnet
Connection details
- RPC URL
- https://rpc.testnet.xgr.network
- Chain ID
- 0x757
- Currency
- XGRt
- Explorer
- explorer.testnet.xgr.network
- Faucet
- Request test XGR
- Gas price
- 1000 Gwei(constant)
ethers.js
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider("https://rpc.testnet.xgr.network");
const block = await provider.getBlockNumber();