Skip to content

feat: add native SOMI + 5 ERC-20 tokens metadata for Somnia (eip155:5…#1880

Open
maxime-oe wants to merge 5 commits into
masterfrom
chain/somnia-p1_1
Open

feat: add native SOMI + 5 ERC-20 tokens metadata for Somnia (eip155:5…#1880
maxime-oe wants to merge 5 commits into
masterfrom
chain/somnia-p1_1

Conversation

@maxime-oe

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

Copy link
Copy Markdown
Contributor

…031)

Adds native slip44:60 (SOMI, distinct native token, not a plain-ETH chain) plus USDC.e, USDT, WETH, NIA, USDso ERC-20 metadata/icons. WSOMI already existed upstream and is untouched.

Addresses cross-verified live on-chain via eth_call symbol()/decimals() in this session; not just trusted from web/DeFiLlama search.

Icons: native SOMI and the 4 reused bridged-asset icons (USDC.e/USDT/ WETH) are real square+opaque SVGs (native from the official Somnia Notion brand kit, rebuilt to the network-icon padding convention; bridged assets reused from existing verified full-bleed-square icons elsewhere in this repo per references/phase-1-identity.md's icon sourcing strategy). NIA and USDso are real official/cross-verified PNGs (no clean SVG available for either).

Verified: npm test 100% pass (7071+14+18201+702), zero regressions.

Base network enablement test drill (chain/somnia-p1_1).


Note

Low Risk
Additive metadata and static icons only; no auth, APIs, or executable code paths affected.

Overview
Extends Somnia (eip155:5031) with registry entries for the native gas token SOMI (slip44:111115031) and five tokens: USDso, Stargate bridged USDC.e / USDT / WETH, and NIA.

Each asset gets a JSON metadata file (name, symbol, decimals, erc20 flag, logo path). New SVG icons are added for SOMI and the three Stargate bridged stable/ETH assets; USDso and NIA point at PNG logos per metadata. This is additive asset-list content only—no application or contract logic changes.

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

…031)

Adds native slip44:60 (SOMI, distinct native token, not a plain-ETH
chain) plus USDC.e, USDT, WETH, NIA, USDso ERC-20 metadata/icons.
WSOMI already existed upstream and is untouched.

Addresses cross-verified live on-chain via eth_call symbol()/decimals()
in this session; not just trusted from web/DeFiLlama search.

Icons: native SOMI and the 4 reused bridged-asset icons (USDC.e/USDT/
WETH) are real square+opaque SVGs (native from the official Somnia
Notion brand kit, rebuilt to the network-icon padding convention;
bridged assets reused from existing verified full-bleed-square icons
elsewhere in this repo per references/phase-1-identity.md's icon
sourcing strategy). NIA and USDso are real official/cross-verified PNGs
(no clean SVG available for either).

Verified: npm test 100% pass (7071+14+18201+702), zero regressions.

Base network enablement test drill (chain/somnia-p1_1).
@maxime-oe
maxime-oe requested review from a team and MRabenda as code owners July 24, 2026 05:57

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d3a9da0. Configure here.

"decimals": 6,
"erc20": true,
"logo": "./icons/eip155:5031/erc20:0x28bec7e30e6faee657a03e19bf1128aad7632a00.svg"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowercase addresses break metadata lookup

Medium Severity

The Stargate USDC.e and USDT assets use all-lowercase hex in their CAIP-19 metadata and icon filenames. This repo indexes assets by EIP-55 checksummed addresses, and documented wallet lookups use toChecksumAddress, so those keys will not match and icons or names may not resolve for these two tokens.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d3a9da0. Configure here.

slip44:60 is globally understood by real MetaMask backends (price-api,
and the external price-primitives.api.cx.metamask.io service) as "the
Ethereum coin", regardless of which chain's CAIP-19 namespace it's
referenced through. Somnia has no dedicated SLIP-44 registration --
coin type 60 was only reused locally as an identifier placeholder --
so filing SOMI's metadata under eip155:5031/slip44:60 set up any
consumer using this CAIP asset ID to silently receive Ethereum's price
(~$1861) instead of SOMI's real price (~$0.10). Confirmed live against
a running price-api instance.

Renamed to eip155:5031/erc20:0x0000000000000000000000000000000000000000,
matching the established precedent for chains with no dedicated
SLIP-44 registration (see Arc, eip155:5042, same pattern).

Verified: npm test - 7071/7071, 14/14, 18201/18201, 702/702 all
passing, zero regressions. asset:verify passes on the new CAIP id.

Base network enablement (chain/somnia-p1_1).
The previous commit renamed the files but the JSON's internal logo
reference still pointed at the old icons/.../slip44:60.svg path
instead of the renamed icons/.../erc20:0x0...svg file.

Base network enablement (chain/somnia-p1_1).
…nvention

New team convention for native-asset CAIP identifiers, in priority order:
1. erc20:<address> only if a real, verified, permanent contract exists that
   can fetch the native balance (checked against CoinGecko's own native
   token registration).
2. slip44:<coinType> from the real registry
   (github.com/satoshilabs/slips/blob/master/slip-0044.md) if registered.
3. slip44:60 if no registration exists AND the native genuinely is ETH.
4. slip44:11111<chainId> (a new MetaMask-invented, collision-free
   convention) if none of the above apply.

Somnia has no real balance-fetching contract for SOMI (the zero address
used previously was a placeholder, not a contract), no entry in the real
SLIP-44 registry (confirmed via live lookup against slip-0044.md), and its
native SOMI is not ETH -- so case 4 applies: slip44:111115031 (11111 +
chainId 5031). This also supersedes the erc20:0x0 fix from the previous
commit, which predates this convention being defined.

Verified: npm test - 7071/14/18201/702 all passing. asset:verify passes
on the new CAIP id.

Base network enablement (chain/somnia-p1_1).
Same stale-write issue as commit 9c0b261 -- the previous commit
captured the file before the logo path edit landed on disk.

Base network enablement (chain/somnia-p1_1).
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