Skip to content

feat(assets-controllers): enable token detection for DeFi Oracle Meta (138)#9297

Open
defiQUG wants to merge 1 commit into
MetaMask:mainfrom
defiQUG:feat/chain138-token-detection-0x8a
Open

feat(assets-controllers): enable token detection for DeFi Oracle Meta (138)#9297
defiQUG wants to merge 1 commit into
MetaMask:mainfrom
defiQUG:feat/chain138-token-detection-0x8a

Conversation

@defiQUG

@defiQUG defiQUG commented Jun 28, 2026

Copy link
Copy Markdown

Summary

Add DeFi Oracle Meta Mainnet (chain 138 / 0x8a) to MetaMask token detection allowlists so mobile and extension users can use Autodetect tokens on Chain 138.

Mirrors recent network additions such as ARC (#9006) and HyperEVM (#7790): enum entry + Accounts API v4 list. Does not replace hosted Tokens API registration (token.api.cx.metamask.io).

Chain metadata is already on Chainlist: https://github.com/ethereum-lists/chains/blob/master/_data/chains/eip155-138.json

Changes

1. packages/assets-controllers/src/assetsUtil.ts

Add to SupportedTokenDetectionNetworks:

DefiOracleMeta = '0x8a', // decimal: 138 — DeFi Oracle Meta Mainnet

2. packages/assets-controllers/src/constants.ts

Add to SUPPORTED_NETWORKS_ACCOUNTS_API_V4:

'0x8a', // 138 DeFi Oracle Meta Mainnet

3. packages/assets-controllers/src/assetsUtil.test.ts

it('returns true for DeFi Oracle Meta Mainnet (138)', () => {
  expect(
    assetsUtil.isTokenDetectionSupportedForNetwork('0x8a'),
  ).toBe(true);
});

Not in scope for v1: SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID — modern chains (e.g. Monad) rely on Accounts API v4; ARC/HyperEVM PRs did not require a balance-checker deploy.

Token list (for MetaMask Tokens API ops)

URL Role
https://tokens.d-bis.org/lists/dbis-138.tokenlist.json Pinned Uniswap-schema list
https://explorer.d-bis.org/token-aggregation/api/v1/report/token-list?chainId=138&wallet=1 Wallet-eligible subset
https://explorer.d-bis.org/token-aggregation/api/v1/config/metamask?chainId=138 EIP-747 + tokenDetection metadata

Why

  • Chain 138 is a live EVM mainnet (public RPC https://rpc-http-pub.d-bis.org, explorer https://explorer.d-bis.org).
  • Mobile currently shows: “Token detection is not available on this network yet.”
  • DBIS operates explorer-side detection (Blockscout index + EIP-747) until upstream gates clear; native autodetect requires this client allowlist and Tokens API ingestion.

Relationship to other DBIS PRs

  • #9118 — Price API / native ETH spot fallback only; does not enable token detection.
  • Tokens API email (separate Consensys track) — register eip155:138 on token.api.cx.metamask.io.

Test plan

  • yarn test packages/assets-controllers/src/assetsUtil.test.ts
  • isTokenDetectionSupportedForNetwork('0x8a')true
  • isTokenListSupportedForNetwork('0x8a')true
  • SUPPORTED_NETWORKS_ACCOUNTS_API_V4 includes '0x8a'

References

Made with Cursor

… (138)

Add chain 0x8a to SupportedTokenDetectionNetworks and
SUPPORTED_NETWORKS_ACCOUNTS_API_V4 so MetaMask extension and mobile
can autodetect tokens on DeFi Oracle Meta Mainnet.

Mirrors recent ARC and HyperEVM network additions.

Co-authored-by: Cursor <cursoragent@cursor.com>
@defiQUG defiQUG requested a review from a team as a code owner June 28, 2026 00:53
@defiQUG

defiQUG commented Jun 28, 2026

Copy link
Copy Markdown
Author

Operator note (2026-06-28): Companion to MetaMask/core #9118 (Price API client fallback).

  • Tokens API registration email sent to support@codefi-data.zendesk.com (2026-06-28).
  • Chainlist merged: eip155-138.json
  • Operator token lists live: https://tokens.d-bis.org/lists/dbis-138.tokenlist.json

Hosted token.api.cx.metamask.io ingestion is a separate Consensys track; this PR enables the client-side allowlist gate only.

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.

1 participant