feat: add native SOMI + 5 ERC-20 tokens metadata for Somnia (eip155:5…#1880
Open
maxime-oe wants to merge 5 commits into
Open
feat: add native SOMI + 5 ERC-20 tokens metadata for Somnia (eip155:5…#1880maxime-oe wants to merge 5 commits into
maxime-oe wants to merge 5 commits into
Conversation
…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).
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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" | ||
| } |
There was a problem hiding this comment.
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)
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).
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.


…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,
erc20flag, 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.