Files
proxmox/docs/04-configuration/CHAIN138_WALLET_CONFIG_VALIDATION.md
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

3.8 KiB
Raw Blame History

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_chainId0x8a.


2. ethers.js (v5 / v6)

// 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

# 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