Skip to content

feat: add chainId 138 (DeFi Oracle Meta Mainnet)#5

Open
defiQUG wants to merge 1 commit into
DODOEX:mainfrom
defiQUG:feat/chain138-defi-oracle-meta
Open

feat: add chainId 138 (DeFi Oracle Meta Mainnet)#5
defiQUG wants to merge 1 commit into
DODOEX:mainfrom
defiQUG:feat/chain138-defi-oracle-meta

Conversation

@defiQUG
Copy link
Copy Markdown

@defiQUG defiQUG commented Jun 5, 2026

Summary

Adds DeFi Oracle Meta Mainnet (chainId 138, DefiLlama dfio_meta_main) to the static CHAINS registry.

  • New src/config/chains/chain138.rs with public RPC https://rpc.d-bis.org
  • Live on-chain contracts on chain 138:
    • DODOApprove 0xEA5Be91d0A1EdA6a2efc80f7211c30584508D56D
    • ERC20V3Factory 0x8Df0298a9CB839e89eA7d32918076a70467FBACE
    • WETH 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

Closes #3.

Why

v0.4.0 rejects --chain-id 138 in resolve_token() before any RPC call, even when --rpc-url is set. Registering chain 138 unlocks token info, risk token, and related on-chain commands.

Note: swap quote still requires DODO route-service support for chainId=138 (contract-request#31).

README follow-up (separate PR welcome)

Current README says "For unsupported chain IDs, pass --rpc-url manually", but --rpc-url only overrides the RPC endpoint — it does not bypass UnsupportedChain. Consider clarifying that wording.

Verify

chainpilot --json --chain-id 138 --rpc-url https://rpc.d-bis.org \
  token info 0x93E66202A11B1772E55407B32B44e5Cd8eda7f22

Canonical routing tokens: cUSDT 0x93E66202A11B1772E55407B32B44e5Cd8eda7f22, cUSDC 0xf22258f57794CC8E06237084b353Ab30fFfa640b.

Test plan

  • cargo test config::chains (7 passed)
  • Maintainer: token info on chain 138 with public RPC
  • After route API lands: swap quote cUSDT→cUSDC on chain 138

Made with Cursor

Register DeFi Oracle Meta Mainnet (chain 138, DefiLlama dfio_meta_main) in the
static chain config so token info, swap, and risk commands can resolve chain 138
when paired with --rpc-url.

Includes live DODOApprove and ERC20V3Factory addresses deployed on chain 138.
Swap quotes still require DODO route-service support for chainId 138.

Closes DODOEX#3

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add chainId 138 (DeFi Oracle Meta Mainnet)

1 participant