Skip to content

feat: add Somnia (5031/0x13a7) multicall and spot-price support - #9665

Open
maxime-oe wants to merge 2 commits into
mainfrom
chain/somnia-p3_1
Open

feat: add Somnia (5031/0x13a7) multicall and spot-price support#9665
maxime-oe wants to merge 2 commits into
mainfrom
chain/somnia-p3_1

Conversation

@maxime-oe

@maxime-oe maxime-oe commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

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.ts and packages/assets-controller/.../MulticallClient.ts with Somnia’s documented MultiCallV3 deployment (0x5e44F178E8cF9B2F5409B6f18ce936aB817C5a11) instead of the usual canonical Multicall3 CREATE2 address.

SPOT_PRICES_SUPPORT_INFO in codefi-v2.ts gains '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-controllers and @metamask/assets-controller.

Reviewed by Cursor Bugbot for commit 51d85df. Bugbot is set up for automated code reviews on this repo. Configure here.

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
maxime-oe marked this pull request as ready for review July 27, 2026 14:00
@maxime-oe
maxime-oe requested review from a team as code owners 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>
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