Skip to content

Commit 7d2bbae

Browse files
authored
chore: Add/Update Plasma and Rootstock native currencies (#7601)
## Explanation <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## 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](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Token price service updates** > > - Add Rootstock (`0x1e`) native token address to `chainIdToNativeTokenAddress` and CAIP mapping in `SPOT_PRICES_SUPPORT_INFO` > - Update Plasma (`0x2611`) native token address to `0xeeee…` in `chainIdToNativeTokenAddress` and `SPOT_PRICES_SUPPORT_INFO` > > **Docs** > > - Update `CHANGELOG.md` to reflect Rootstock addition and Plasma mapping change > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9af353a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 28f70ae commit 7d2bbae

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/assets-controllers/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Add Rootstock (0x1e) mapping to eip155:30/erc20:0x542fda317318ebf1d3deaf76e0b632741a7e677d for RBTC ([#7601](https://github.com/MetaMask/core/pull/7601))
13+
1014
### Changed
1115

1216
- Bump `@metamask/transaction-controller` from `^62.8.0` to `^62.9.0` ([#7602](https://github.com/MetaMask/core/pull/7602))
17+
- Update Plasma (0x2611) mapping to eip155:9745/erc20:0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee for XPL ([#7601](https://github.com/MetaMask/core/pull/7601))
1318

1419
## [95.1.0]
1520

packages/assets-controllers/src/token-prices-service/codefi-v2.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ const chainIdToNativeTokenAddress: Record<Hex, Hex> = {
223223
'0x1388': '0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000', // Mantle
224224
'0x64': '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d', // Gnosis
225225
'0x10b3e': '0xf2b51cc1850fed939658317a22d73d3482767591', // MapleStory Universe (MSU aka Henesys)
226+
'0x1e': '0x542fda317318ebf1d3deaf76e0b632741a7e677d', // Rootstock Mainnet - Native symbol: RBTC
227+
'0x2611': '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', // Plasma mainnet - native symbol: XPL
226228
};
227229

228230
/**
@@ -242,6 +244,7 @@ export const SPOT_PRICES_SUPPORT_INFO = {
242244
'0x1': 'eip155:1/slip44:60', // Ethereum Mainnet - Native symbol: ETH
243245
'0xa': 'eip155:10/slip44:60', // OP Mainnet - Native symbol: ETH
244246
'0x19': 'eip155:25/slip44:394', // Cronos Mainnet - Native symbol: CRO
247+
'0x1e': 'eip155:30/slip44:137', // Rootstock Mainnet - Native symbol: RBTC
245248
'0x2a': 'eip155:42/erc20:0x0000000000000000000000000000000000000000', // Lukso - native symbol: LYX
246249
'0x32': 'eip155:50/erc20:0x0000000000000000000000000000000000000000', // xdc-network - native symbol: XDC
247250
'0x38': 'eip155:56/slip44:714', // BNB Smart Chain Mainnet - Native symbol: BNB
@@ -278,7 +281,7 @@ export const SPOT_PRICES_SUPPORT_INFO = {
278281
'0x10e6': 'eip155:4326/erc20:0x0000000000000000000000000000000000000000', // MegaETH Mainnet - Native symbol: ETH
279282
'0x1388': 'eip155:5000/erc20:0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000', // Mantle - Native symbol: MNT
280283
'0x2105': 'eip155:8453/slip44:60', // Base - Native symbol: ETH
281-
'0x2611': 'eip155:9745/erc20:0x0000000000000000000000000000000000000000', // Plasma mainnet - native symbol: XPL
284+
'0x2611': 'eip155:9745/erc20:0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', // Plasma mainnet - native symbol: XPL
282285
'0x2710': 'eip155:10000/slip44:145', // Smart Bitcoin Cash - Native symbol: BCH
283286
'0x8173': 'eip155:33139/erc20:0x0000000000000000000000000000000000000000', // Apechain Mainnet - Native symbol: APE
284287
'0xa3c3': 'eip155:41923/erc20:0x0000000000000000000000000000000000000000', // EDU Chain - Native symbol: EDU

0 commit comments

Comments
 (0)