Skip to content

feat(network): register Gravity Mainnet (L1) so its logos render - #45436

Queued
Richard1048576 wants to merge 1 commit into
MetaMask:mainfrom
Richard1048576:feat/gravity-l1-logos
Queued

feat(network): register Gravity Mainnet (L1) so its logos render#45436
Richard1048576 wants to merge 1 commit into
MetaMask:mainfrom
Richard1048576:feat/gravity-l1-logos

Conversation

@Richard1048576

@Richard1048576 Richard1048576 commented Aug 12, 2026

Copy link
Copy Markdown

Description

Gravity Mainnet (L1, chainId 127001 / 0x1f019) currently renders a blank network logo and a blank token logo in MetaMask.

MetaMask already ships Gravity Alpha Mainnet (0x659) and Gravity Alpha Sepolia (0x34c1) with logos, and the brand asset ./images/gravity.svg is already in this repo — Gravity L1 is simply not registered in the image maps, so it falls back to a letter placeholder.

This PR registers the chain ID and wires it into the existing maps:

Map Effect
CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP network logo
CHAIN_ID_TOKEN_IMAGE_MAP native token logo
NETWORK_TO_NAME_MAP display name
CHAIN_ID_TO_CURRENCY_SYMBOL_MAP native currency G

Config only — no new assets, no new files. The existing gravity.svg is reused.

FEATURED_RPCS is deliberately untouched. Popular-network placement is a separate commercial discussion and is explicitly not part of this change.

Not a duplicate of the existing Gravity entries

Gravity L1 (0x1f019) is a different chain from Gravity Alpha Mainnet (0x659), which is an Arbitrum Nitro rollup being deprecated. Different layer, different chain ID. The new constant is GRAVITY (vs. the existing GRAVITY_ALPHA_*), so there is no name or identifier collision.

Network details

Field Value
Name Gravity
Chain ID 127001 (0x1f019)
Native currency G, 18 decimals
RPC https://mainnet-rpc.gravity.xyz
Explorer https://mainnet-explorer.gravity.xyz

Chain metadata is registered upstream: ethereum-lists/chains eip155-127001.json

Changelog

CHANGELOG entry: Added the network and token logos for Gravity Mainnet (L1)

Related issues

Fixes: n/a — supersedes #43536, which additionally added a FEATURED_RPCS entry. That part has been dropped here so this PR is purely the logo registration.

Manual testing steps

  1. Add Gravity Mainnet as a custom network: RPC https://mainnet-rpc.gravity.xyz, chain ID 127001, symbol G, explorer https://mainnet-explorer.gravity.xyz.
  2. Switch to it.
  3. The network avatar in the network picker shows the Gravity logo instead of a letter placeholder.
  4. The native G token in the asset list shows the Gravity logo.

Screenshots/Recordings

Before

Network avatar and native token both render as a grey letter placeholder.

After

Both render gravity.svg, matching how Gravity Alpha Mainnet already appears today.

Pre-merge author checklist

  • I have followed MetaMask Contributor Docs and MetaMask Extension Coding Standards.
  • I have completed the PR template to the best of my ability
  • I have included tests if applicable — none needed; this adds entries to existing constant maps
  • I have documented my code using JSDoc format if applicable
  • I have applied the right labels on the PR (not required for external contributors)

Note

Low Risk
Config-only constant map updates with no RPC, auth, or runtime logic changes; reuses an existing image asset.

Overview
Registers Gravity Mainnet (L1) (0x1f019) so network and native-token logos render instead of letter placeholders.

Adds the chain ID and wires it into the display name, currency (G), and image maps, reusing the existing gravity.svg already used by Gravity Alpha. Does not add a FEATURED_RPCS entry.

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

Gravity Mainnet (L1, chainId 127001 / 0x1f019) currently shows a blank network
logo and a blank token logo. MetaMask already ships Gravity Alpha Mainnet
(0x659) and Gravity Alpha Sepolia (0x34c1) with logos, and the brand asset
./images/gravity.svg is already in the repo — L1 is simply not registered in
the image maps, so it falls back to a letter placeholder.

This registers the chain ID and wires it into the existing maps:
- CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP  (network logo)
- CHAIN_ID_TOKEN_IMAGE_MAP           (native token logo)
- NETWORK_TO_NAME_MAP                (display name)
- CHAIN_ID_TO_CURRENCY_SYMBOL_MAP    (native currency G)

Gravity L1 is a separate chain from Gravity Alpha Mainnet (0x659), which is
an Arbitrum Nitro rollup being deprecated. The new constant is GRAVITY, so
there is no collision with the existing GRAVITY_ALPHA_* constants.

Config only — the icon asset is reused, no new files. FEATURED_RPCS is
deliberately untouched: popular-network placement is a separate commercial
discussion and is not part of this change.

Chain metadata is registered upstream at
https://github.com/ethereum-lists/chains/blob/master/_data/chains/eip155-127001.json

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamask-ci metamask-ci Bot added external-contributor INVALID-PR-TEMPLATE PR's body doesn't match template labels Aug 12, 2026
@Richard1048576

Copy link
Copy Markdown
Author

Built and verified locally on the branch.

Buildyarn build:dev (webpack 5.104.1, Node v24.13.1, yarn 4.14.1):

🦊 MetaMask – development (webpack 5.104.1) compiled successfully in 57552 ms

The change reaches the bundle0x1f019 is present in 2 emitted chunks, so the new map entries are not dead-code-eliminated:

$ grep -rl '0x1f019' dist/chrome/*.js
3299.ccb89e3fa31933a18b4c.js
js-shared_c.df40797a57d0d9f6d341.js

The reused asset shipsdist/chrome/images/gravity.svg is present in the build output (no new asset was added; this is the same file Gravity Alpha Mainnet already uses).

Unit testsshared/constants/network.test.ts:

PASS shared/constants/network.test.ts
Test Suites: 1 passed, 1 total
Tests:       10 passed, 10 total
✅ No console baseline violations.

I'll add before/after screenshots of the network picker and the asset list shortly. Happy to run anything else that would help review.

@Richard1048576

Richard1048576 commented Aug 12, 2026

Copy link
Copy Markdown
Author

Verified end-to-end with a local dev build of this branch loaded into Chrome as an unpacked extension.

After adding Gravity Mainnet as a custom network (RPC https://mainnet-rpc.gravity.xyz, chain ID 127001, symbol G), the network now renders the Gravity brand logo in the network list instead of the grey letter placeholder it showed before this change:
image

For reference, the same entry before this change rendered as a plain letter "G" placeholder, which is what users see on Gravity L1 in the released extension today, while Gravity Alpha Mainnet (0x659) renders correctly using the very same gravity.svg asset.

Build details, for completeness:

  • yarn build:dev, webpack 5.104.1, Node v24.13.1, yarn 4.14.1 — compiled successfully
  • 0x1f019 is present in the emitted chunks, so the new map entries are not dead-code-eliminated
  • dist/chrome/images/gravity.svg ships with the build (no new asset added — this is the file Gravity Alpha Mainnet already uses)
  • shared/constants/network.test.ts — 10/10 passing, no console baseline violations

@Richard1048576

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@maxime-oe
maxime-oe added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
@maxime-oe
maxime-oe added this pull request to the merge queue Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor INVALID-PR-TEMPLATE PR's body doesn't match template

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants