feat: add chainId 138 (DeFi Oracle Meta Mainnet)#5
Open
defiQUG wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds DeFi Oracle Meta Mainnet (
chainId138, DefiLlamadfio_meta_main) to the staticCHAINSregistry.src/config/chains/chain138.rswith public RPChttps://rpc.d-bis.orgDODOApprove0xEA5Be91d0A1EdA6a2efc80f7211c30584508D56DERC20V3Factory0x8Df0298a9CB839e89eA7d32918076a70467FBACEWETH0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2Closes #3.
Why
v0.4.0 rejects
--chain-id 138inresolve_token()before any RPC call, even when--rpc-urlis set. Registering chain 138 unlockstoken info,risk token, and related on-chain commands.Note:
swap quotestill requires DODO route-service support forchainId=138(contract-request#31).README follow-up (separate PR welcome)
Current README says "For unsupported chain IDs, pass
--rpc-urlmanually", but--rpc-urlonly overrides the RPC endpoint — it does not bypassUnsupportedChain. Consider clarifying that wording.Verify
Canonical routing tokens: cUSDT
0x93E66202A11B1772E55407B32B44e5Cd8eda7f22, cUSDC0xf22258f57794CC8E06237084b353Ab30fFfa640b.Test plan
cargo test config::chains(7 passed)token infoon chain 138 with public RPCswap quotecUSDT→cUSDC on chain 138Made with Cursor