From ad99f5589c28d1d6ee13718ea2a4bec274315493 Mon Sep 17 00:00:00 2001 From: Maxime OUAIRY Date: Mon, 3 Aug 2026 12:02:18 +0200 Subject: [PATCH 1/3] feat: add 0G (16661/0x4115) multicall and spot-price support Adds 0G to the two Multicall3 contract-address maps (assets-controllers/src/multicall.ts and assets-controller's MulticallClient.ts), using the canonical mds1/multicall3 deployment (0xcA11bde05977b3631167028862bE2a173976CA11) -- live-verified this session against the primary RPC and both fallbacks, byte-identical bytecode across all three, unlike Somnia which needed a non-canonical chain-specific deployment. Adds 0G to SPOT_PRICES_SUPPORT_INFO in codefi-v2.ts with its dedicated slip44:1111116661 identifier (no real SLIP-44 registry entry, not ETH-native, so not slip44:60) -- matching chain-input.yaml's Phase 0 native-asset convention. Changelog PR links use a PR_NUMBER placeholder -- fill in with the real PR number once opened. Base network enablement (0G p3_1 -- core's price + multicall wiring, one Base-enablement PR per the skill's core exception). --- packages/assets-controller/CHANGELOG.md | 4 ++++ .../data-sources/evm-rpc-services/clients/MulticallClient.ts | 3 +++ packages/assets-controllers/CHANGELOG.md | 4 ++++ packages/assets-controllers/src/multicall.ts | 3 +++ .../assets-controllers/src/token-prices-service/codefi-v2.ts | 1 + 5 files changed, 15 insertions(+) diff --git a/packages/assets-controller/CHANGELOG.md b/packages/assets-controller/CHANGELOG.md index 9aa1bbe851f..b115c6c36b1 100644 --- a/packages/assets-controller/CHANGELOG.md +++ b/packages/assets-controller/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add 0G (`16661`/`0x4115`) in `MulticallClient` ([#PR_NUMBER](https://github.com/MetaMask/core/pull/PR_NUMBER)) + ### Changed - Bump `@metamask/phishing-controller` from `^17.3.0` to `^17.3.1` ([#9746](https://github.com/MetaMask/core/pull/9746)) diff --git a/packages/assets-controller/src/data-sources/evm-rpc-services/clients/MulticallClient.ts b/packages/assets-controller/src/data-sources/evm-rpc-services/clients/MulticallClient.ts index d33a3de9e8d..cf5614dcd69 100644 --- a/packages/assets-controller/src/data-sources/evm-rpc-services/clients/MulticallClient.ts +++ b/packages/assets-controller/src/data-sources/evm-rpc-services/clients/MulticallClient.ts @@ -378,6 +378,9 @@ const MULTICALL3_ADDRESS_BY_CHAIN: Record = { '0x1237': '0xcA11bde05977b3631167028862bE2a173976CA11', // Somnia (5031), MultiCallV3 per docs.somnia.network/developer/smart-contracts '0x13a7': '0x5e44F178E8cF9B2F5409B6f18ce936aB817C5a11', + // 0G (16661), canonical mds1/multicall3 deployment, live-verified + // (matching bytecode across primary + both fallback RPCs) + '0x4115': '0xcA11bde05977b3631167028862bE2a173976CA11', }; // ============================================================================= diff --git a/packages/assets-controllers/CHANGELOG.md b/packages/assets-controllers/CHANGELOG.md index 7541bc350d4..244b9f8e0ff 100644 --- a/packages/assets-controllers/CHANGELOG.md +++ b/packages/assets-controllers/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add 0G (`16661`/`0x4115`) entries in `multicall.ts` and `codefi-v2.ts` ([#PR_NUMBER](https://github.com/MetaMask/core/pull/PR_NUMBER)) + ### Changed - Bump `@metamask/phishing-controller` from `^17.3.0` to `^17.3.1` ([#9746](https://github.com/MetaMask/core/pull/9746)) diff --git a/packages/assets-controllers/src/multicall.ts b/packages/assets-controllers/src/multicall.ts index 44cb774d146..f5a6a9b19f6 100644 --- a/packages/assets-controllers/src/multicall.ts +++ b/packages/assets-controllers/src/multicall.ts @@ -321,6 +321,9 @@ const MULTICALL_CONTRACT_BY_CHAINID = { '0x1237': '0xcA11bde05977b3631167028862bE2a173976CA11', // Somnia (5031), MultiCallV3 per docs.somnia.network/developer/smart-contracts '0x13a7': '0x5e44F178E8cF9B2F5409B6f18ce936aB817C5a11', + // 0G (16661), canonical mds1/multicall3 deployment, live-verified + // (matching bytecode across primary + both fallback RPCs) + '0x4115': '0xcA11bde05977b3631167028862bE2a173976CA11', } as Record; const multicallAbi = [ diff --git a/packages/assets-controllers/src/token-prices-service/codefi-v2.ts b/packages/assets-controllers/src/token-prices-service/codefi-v2.ts index cd74cc5743f..bc87132fe43 100644 --- a/packages/assets-controllers/src/token-prices-service/codefi-v2.ts +++ b/packages/assets-controllers/src/token-prices-service/codefi-v2.ts @@ -324,6 +324,7 @@ export const SPOT_PRICES_SUPPORT_INFO = { '0x15f900': 'eip155:1440000/erc20:0x0000000000000000000000000000000000000000', // xrpl-evm - native symbol: XRP '0x4e454152': 'eip155:1313161554/slip44:60', // Aurora Mainnet (Ethereum L2 on NEAR) - Native symbol: ETH '0x63564c40': 'eip155:1666600000/slip44:1023', // Harmony Mainnet Shard 0 - Native symbol: ONE + '0x4115': 'eip155:16661/slip44:1111116661', // 0G Chain - Native symbol: 0G } as const; // MISSING CHAINS WITH NO NATIVE ASSET PRICES From 16fbe3d30758ea92c7535abf4b93f25685ef6c47 Mon Sep 17 00:00:00 2001 From: Maxime OUAIRY Date: Mon, 3 Aug 2026 14:26:51 +0200 Subject: [PATCH 2/3] chore: fill in real PR number in changelog entry PR #9760 is now open; replace the PR_NUMBER placeholder with the real number/link, matching the Arc/Somnia precedent (commits b204ff4d2f, 51d85df7ee). --- packages/assets-controller/CHANGELOG.md | 2 +- packages/assets-controllers/CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/assets-controller/CHANGELOG.md b/packages/assets-controller/CHANGELOG.md index b115c6c36b1..df7e8013eb0 100644 --- a/packages/assets-controller/CHANGELOG.md +++ b/packages/assets-controller/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Add 0G (`16661`/`0x4115`) in `MulticallClient` ([#PR_NUMBER](https://github.com/MetaMask/core/pull/PR_NUMBER)) +- Add 0G (`16661`/`0x4115`) in `MulticallClient` ([#9760](https://github.com/MetaMask/core/pull/9760)) ### Changed diff --git a/packages/assets-controllers/CHANGELOG.md b/packages/assets-controllers/CHANGELOG.md index 244b9f8e0ff..f413df1336e 100644 --- a/packages/assets-controllers/CHANGELOG.md +++ b/packages/assets-controllers/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Add 0G (`16661`/`0x4115`) entries in `multicall.ts` and `codefi-v2.ts` ([#PR_NUMBER](https://github.com/MetaMask/core/pull/PR_NUMBER)) +- Add 0G (`16661`/`0x4115`) entries in `multicall.ts` and `codefi-v2.ts` ([#9760](https://github.com/MetaMask/core/pull/9760)) ### Changed From b6e89253d9adb291d7c6d5fc8bc2657893f1d20e Mon Sep 17 00:00:00 2001 From: Maxime OUAIRY Date: Mon, 3 Aug 2026 14:36:16 +0200 Subject: [PATCH 3/3] revert: drop 0G from assets-controller's MulticallClient assets-controller (singular) changes are not required and are not expected to ever be required for a plain Base enablement's Multicall wiring -- only assets-controllers (plural)'s multicall.ts matters. Base network enablement skill updated accordingly. --- packages/assets-controller/CHANGELOG.md | 4 ---- .../data-sources/evm-rpc-services/clients/MulticallClient.ts | 3 --- 2 files changed, 7 deletions(-) diff --git a/packages/assets-controller/CHANGELOG.md b/packages/assets-controller/CHANGELOG.md index df7e8013eb0..9aa1bbe851f 100644 --- a/packages/assets-controller/CHANGELOG.md +++ b/packages/assets-controller/CHANGELOG.md @@ -7,10 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Added - -- Add 0G (`16661`/`0x4115`) in `MulticallClient` ([#9760](https://github.com/MetaMask/core/pull/9760)) - ### Changed - Bump `@metamask/phishing-controller` from `^17.3.0` to `^17.3.1` ([#9746](https://github.com/MetaMask/core/pull/9746)) diff --git a/packages/assets-controller/src/data-sources/evm-rpc-services/clients/MulticallClient.ts b/packages/assets-controller/src/data-sources/evm-rpc-services/clients/MulticallClient.ts index cf5614dcd69..d33a3de9e8d 100644 --- a/packages/assets-controller/src/data-sources/evm-rpc-services/clients/MulticallClient.ts +++ b/packages/assets-controller/src/data-sources/evm-rpc-services/clients/MulticallClient.ts @@ -378,9 +378,6 @@ const MULTICALL3_ADDRESS_BY_CHAIN: Record = { '0x1237': '0xcA11bde05977b3631167028862bE2a173976CA11', // Somnia (5031), MultiCallV3 per docs.somnia.network/developer/smart-contracts '0x13a7': '0x5e44F178E8cF9B2F5409B6f18ce936aB817C5a11', - // 0G (16661), canonical mds1/multicall3 deployment, live-verified - // (matching bytecode across primary + both fallback RPCs) - '0x4115': '0xcA11bde05977b3631167028862bE2a173976CA11', }; // =============================================================================