Files
proxmox/docs/04-configuration/CHAIN2138_WALLET_CONFIG_VALIDATION.md
defiQUG b8613905bd
Some checks failed
Deploy to Phoenix / validate (push) Failing after 15s
Deploy to Phoenix / deploy (push) Has been skipped
chore: sync workspace — configs, docs, scripts, CI, pnpm, submodules
- Submodule pins: dbis_core, cross-chain-pmm-lps, mcp-proxmox (local, push may be pending), metamask-integration, smom-dbis-138
- Atomic swap + cross-chain-pmm-lops-publish, deploy-portal workflow, phoenix deploy-targets, routing/aggregator matrices
- Docs, token-lists, forge proxy, phoenix API, runbooks, verify scripts

Made-with: Cursor
2026-04-21 22:01:33 -07:00

79 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Chain 2138 Wallet & SDK Config (DeFi Oracle Meta Testnet)
**Last Updated:** 2026-03-27
**Document Version:** 1.0
**Status:** Active Documentation
---
**Purpose:** Wallet and SDK settings for **DeFi Oracle Meta Testnet** (chain ID **2138**).
**RPC (public, chainlist):** `https://rpc.public-2138.defi-oracle.io`
**WS (chainlist):** `wss://rpc.public-2138.defi-oracle.io`
**Explorer (chainlist):** `https://public-2138.defi-oracle.io`
**Chain ID:** 2138 (`0x85a`)
**CAIP-2:** `eip155:2138`
Use LAN or staging RPC in place of the public URLs when testing privately.
---
## 1. MetaMask (custom network)
| Field | Value |
|-------|--------|
| **Network name** | DeFi Oracle Meta Testnet |
| **RPC URL** | `https://rpc.public-2138.defi-oracle.io` (or your node) |
| **Chain ID** | `2138` |
| **Currency symbol** | tETH |
| **Block explorer** | `https://public-2138.defi-oracle.io` |
**JSON** (programmatic add): `docs/04-configuration/metamask/METAMASK_NETWORK_CONFIG_2138.json`.
---
## 2. ethers.js (v6 example)
```javascript
const chain2138Testnet = {
chainId: 2138,
name: "DeFi Oracle Meta Testnet",
nativeCurrency: { name: "testEther", symbol: "tETH", decimals: 18 },
rpcUrls: {
default: { http: ["https://rpc.public-2138.defi-oracle.io"] },
},
blockExplorers: {
default: { name: "Quorum Explorer", url: "https://public-2138.defi-oracle.io" },
},
};
import { JsonRpcProvider } from "ethers";
const provider = new JsonRpcProvider("https://rpc.public-2138.defi-oracle.io");
const chainId = await provider.getNetwork().then((n) => Number(n.chainId)); // 2138
```
---
## 3. Frontend DApp (Vite)
- Enable the chain in Wagmi: `VITE_ENABLE_CHAIN2138=true` or `1`
- Optional overrides: `VITE_RPC_URL_2138`, `VITE_EXPLORER_URL_2138`
- Trustless bridge L2 side: `VITE_TRUSTLESS_L2_CHAIN_ID=2138` plus lockbox/token env vars (see `smom-dbis-138/frontend-dapp/.env.example`)
---
## 4. Quick verification
```bash
curl -s -X POST https://rpc.public-2138.defi-oracle.io -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
# Expected: result "0x85a"
```
---
## 5. References
- **Testnet runbook**: `docs/testnet/DEFI_ORACLE_META_TESTNET_2138_RUNBOOK.md`
- **Mainnet (138) wallet doc**: `docs/04-configuration/CHAIN138_WALLET_CONFIG_VALIDATION.md`
- **Chain list (this repo)**: `pr-workspace/chains/_data/chains/eip155-2138.json`