Commit 640cdf6
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
0 commit comments