Skip to content

Commit 640cdf6

Browse files
feat: add ARC mainnet account/asset detection (MetaMask#9006)
## 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? --> This PR adds Arc mainnet account API client-side support. Account API endpoints that seem to be already working on Arc: v4 MultiAccount - https://accounts.api.cx.metamask.io/v4/multiaccount/balances?accountAddresses=eip155%3A0%3A0x13b7e6EBcd40777099E4c45d407745aB2de1D1F8&networks=5042 V1 account relationship - https://accounts.api.cx.metamask.io/v1/networks/5042/accounts/0x13b7e6ebcd40777099e4c45d407745ab2de1d1f8/relationships/0x80e3d8E7CA14C83432b8Cd860D0c21A97973509C V1 Account tx history -https://accounts.api.cx.metamask.io/v1/accounts/0x13b7e6EBcd40777099E4c45d407745aB2de1D1F8/transactions?networks=5042 ## 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/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Additive allowlist entries only; no changes to balance, auth, or detection logic beyond enabling Arc alongside existing networks. > > **Overview** > Adds **Arc mainnet** (chain `5042` / `0x13b2`) to the assets-controllers network allowlists so clients can use Accounts API v4 balances and token detection on Arc. > > `SupportedTokenDetectionNetworks` gains an `Arc` entry in `assetsUtil.ts`, and `SUPPORTED_NETWORKS_ACCOUNTS_API_V4` in `constants.ts` includes `0x13b2`. The unreleased changelog records both additions. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1c7d0ec. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: gabrieledm <gabriele.delmonte-ext@consensys.net> Co-authored-by: Gabriele Del Monte <37625739+gabrieledm@users.noreply.github.com>
1 parent 90658f7 commit 640cdf6

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

packages/assets-controllers/CHANGELOG.md

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

88
## [Unreleased]
99

10+
### Added
11+
12+
- Add `ARC` support ([#9006](https://github.com/MetaMask/core/pull/9006))
13+
- Add `ARC` in `SupportedTokenDetectionNetworks`
14+
- Add `ARC` in `SUPPORTED_NETWORKS_ACCOUNTS_API_V4`
15+
1016
### Changed
1117

1218
- Bump `@metamask/transaction-controller` from `^67.0.0` to `^67.1.0` ([#9066](https://github.com/MetaMask/core/pull/9066))

packages/assets-controllers/src/assetsUtil.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ export enum SupportedTokenDetectionNetworks {
160160
Sei = '0x531', // decimal: 1329
161161
MonadMainnet = '0x8f', // decimal: 143
162162
Hyperevm = '0x3e7', // decimal: 999
163+
Arc = '0x13b2', // decimal: 5042
163164
}
164165

165166
/**

packages/assets-controllers/src/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const SUPPORTED_NETWORKS_ACCOUNTS_API_V4 = [
2020
'0x531', // 1329
2121
'0x8f', // 143
2222
'0x3e7', // 999 HyperEVM
23+
'0x13b2', // 5042 Arc
2324
];
2425

2526
/** Lowercase ERC-20 address for MetaMask USD (mUSD), same contract on listed chains. */

0 commit comments

Comments
 (0)