feat: add Somnia (5031/0x13a7) multicall and spot-price support - #9665
Open
maxime-oe wants to merge 2 commits into
Open
feat: add Somnia (5031/0x13a7) multicall and spot-price support#9665maxime-oe wants to merge 2 commits into
maxime-oe wants to merge 2 commits into
Conversation
Adds Somnia to the two Multicall3 contract-address maps (assets-controllers/src/multicall.ts and assets-controller's MulticallClient.ts), using its official documented MultiCallV3 deployment (0x5e44F178E8cF9B2F5409B6f18ce936aB817C5a11, per docs.somnia.network/developer/smart-contracts) rather than the canonical CREATE2 deterministic-deployer address, which is not deployed on Somnia. Adds Somnia to SPOT_PRICES_SUPPORT_INFO in codefi-v2.ts with its dedicated slip44:111115031 identifier (no real SLIP-44 registry entry, not ETH-native, so not slip44:60). The public price API doesn't serve this yet since it depends on va-mmcx-price-api's own Somnia PR deploying first -- SPOT_PRICES_SUPPORT_INFO lookups fail gracefully (entry filtered out, no price shown) rather than throwing, so this is safe to stage ahead of that deploy landing. Changelog PR links use a PR_NUMBER placeholder -- fill in with the real PR number once opened.
PR #9665 is now open; replace the PR_NUMBER placeholder in both CHANGELOG.md entries with the real number/link.
maxime-oe
marked this pull request as ready for review
July 27, 2026 14:00
maxime-oe
added a commit
that referenced
this pull request
Jul 28, 2026
The prior commit changed packages/assets-controllers/src/token-prices-service/codefi-v2.ts but never added the required CHANGELOG entry -- references/phase-3-core-clients.md (base-network-enablement skill) lists package changelogs as required evidence for Core changes. PR_NUMBER is a placeholder to be filled in once the PR opens, matching the Somnia precedent (PR #9665). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.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.
Adds Somnia to the two Multicall3 contract-address maps (assets-controllers/src/multicall.ts and
assets-controller's MulticallClient.ts), using its official documented MultiCallV3 deployment (0x5e44F178E8cF9B2F5409B6f18ce936aB817C5a11, per docs.somnia.network/developer/smart-contracts) rather than the canonical CREATE2 deterministic-deployer address, which is not deployed on Somnia.
Adds Somnia to SPOT_PRICES_SUPPORT_INFO in codefi-v2.ts with its dedicated slip44:111115031 identifier (no real SLIP-44 registry entry, not ETH-native, so not slip44:60). The public price API doesn't serve this yet since it depends on va-mmcx-price-api's own Somnia PR deploying first -- SPOT_PRICES_SUPPORT_INFO lookups fail gracefully (entry filtered out, no price shown) rather than throwing, so this is safe to stage ahead of that deploy landing.
Explanation
References
Checklist
Note
Low Risk
Additive per-chain configuration only; no auth or shared logic changes. Spot prices may be absent until the backend supports Somnia, with graceful omission expected.
Overview
Adds Somnia mainnet (chain
5031/0x13a7) so batched balance reads and spot-price lookups can target that network.Multicall support is wired in both
packages/assets-controllers/src/multicall.tsandpackages/assets-controller/.../MulticallClient.tswith Somnia’s documented MultiCallV3 deployment (0x5e44F178E8cF9B2F5409B6f18ce936aB817C5a11) instead of the usual canonical Multicall3 CREATE2 address.SPOT_PRICES_SUPPORT_INFOincodefi-v2.tsgains'0x13a7': 'eip155:5031/slip44:111115031'for native SOMI. Until the price API serves that asset, lookups should degrade without breaking callers.Unreleased changelog entries document the change in
@metamask/assets-controllersand@metamask/assets-controller.Reviewed by Cursor Bugbot for commit 51d85df. Bugbot is set up for automated code reviews on this repo. Configure here.