# Chain 138 – Wallet & SDK Config Validation **Last Updated:** 2026-01-31 **Document Version:** 1.0 **Status:** Active Documentation --- **Purpose**: Validated configs for MetaMask, ethers.js, and Ledger (Chain 138 – Defi Oracle Meta Mainnet). **RPC**: `https://rpc-http-pub.d-bis.org`, `https://rpc.d-bis.org`, `https://rpc2.d-bis.org`, `https://rpc.defi-oracle.io` **WS**: `wss://rpc-ws-pub.d-bis.org`, `wss://rpc.d-bis.org`, `wss://ws.rpc.d-bis.org`, `wss://ws.rpc2.d-bis.org`, `wss://wss.defi-oracle.io` **Chain ID**: 138 (`0x8a`) --- ## 1. MetaMask (custom network) Use **Settings → Networks → Add network** (or “Add a network manually”) with: | Field | Value | |-------|--------| | **Network name** | Defi Oracle Meta Mainnet | | **RPC URL** | `https://rpc-http-pub.d-bis.org`, `https://rpc.d-bis.org`, `https://rpc2.d-bis.org`, or `https://rpc.defi-oracle.io` | | **Chain ID** | `138` | | **Currency symbol** | ETH | | **Block explorer** | `https://explorer.d-bis.org` | **JSON** (for programmatic add or import): see `docs/04-configuration/metamask/METAMASK_NETWORK_CONFIG.json`. Validated: chainId `0x8a`, RPC URLs return `eth_chainId` → `0x8a`. --- ## 2. ethers.js (v5 / v6) ```javascript // Chain 138 – Defi Oracle Meta Mainnet const chain138 = { chainId: 138, name: "Defi Oracle Meta Mainnet", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://rpc-http-pub.d-bis.org", "https://rpc.d-bis.org", "https://rpc2.d-bis.org", "https://rpc.defi-oracle.io"] }, webSocket: ["wss://rpc-ws-pub.d-bis.org", "wss://rpc.d-bis.org", "wss://ws.rpc.d-bis.org", "wss://ws.rpc2.d-bis.org", "wss://wss.defi-oracle.io"] }, blockExplorers: { default: { name: "Blockscout", url: "https://explorer.d-bis.org" } } }; // ethers v6 import { JsonRpcProvider } from "ethers"; const provider = new JsonRpcProvider("https://rpc-http-pub.d-bis.org"); const chainId = await provider.getNetwork().then(n => Number(n.chainId)); // 138 // ethers v6 WebSocket import { WebSocketProvider } from "ethers"; const wsProvider = new WebSocketProvider("wss://rpc-ws-pub.d-bis.org"); ``` Validated: HTTP RPC returns chainId 138; WS endpoints route to same backend (VMID 2201). --- ## 3. Ledger (Chain 138) Chain 138 is a custom chain. In Ledger Live / Ledger-compatible apps: - **Network**: Add custom Ethereum-compatible network. - **RPC**: `https://rpc-http-pub.d-bis.org`, `https://rpc.d-bis.org`, `https://rpc2.d-bis.org`, or `https://rpc.defi-oracle.io` - **Chain ID**: `138` - **Explorer**: `https://explorer.d-bis.org` Ledger does not pre-list Chain 138; use “Add custom network” (or equivalent) with the values above. **SLIP-44**: Chain 138 uses `slip44: 60` (ETH derivation path) in chain list; Ledger uses standard ETH path for EVM chains. Validated: No collision with mainnet (1) or common testnets; chain list entry in `pr-workspace/chains/_data/chains/eip155-138.json` is correct for submission to chainlist.org / Ledger discovery if/when supported. --- ## 4. Quick verification ```bash # HTTP RPC curl -s -X POST https://rpc-http-pub.d-bis.org -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' # Expected: {"jsonrpc":"2.0","id":1,"result":"0x8a"} # From LAN (if Split DNS or --resolve used) curl -sk --resolve rpc-http-pub.d-bis.org:443:192.168.11.167 \ https://rpc-http-pub.d-bis.org \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' ``` --- ## 5. References - **RPC verification**: `docs/04-configuration/RPC_CHAIN138_VERIFICATION.md` - **MetaMask network JSON**: `docs/04-configuration/metamask/METAMASK_NETWORK_CONFIG.json` - **Chain list (chainlist.org)**: `pr-workspace/chains/_data/chains/eip155-138.json` - **Token list (chain 138)**: `token-lists/chainlists/chain-138.json` - **Testnet (2138) wallet doc**: `docs/04-configuration/CHAIN2138_WALLET_CONFIG_VALIDATION.md`