Skip to content

feat!: wire NetworkEnablementController to ConfigRegistryController - #9611

Merged
mikesposito merged 7 commits into
mainfrom
me/network-enablement-controller-dynamic-registry
Jul 23, 2026
Merged

feat!: wire NetworkEnablementController to ConfigRegistryController#9611
mikesposito merged 7 commits into
mainfrom
me/network-enablement-controller-dynamic-registry

Conversation

@mikesposito

@mikesposito mikesposito commented Jul 22, 2026

Copy link
Copy Markdown
Member

Explanation

NetworkEnablementController uses bundled constants to establish which networks are "popular". We want to keep using those constants as fallback, and change primary source to ConfigRegistryController.

References

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
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Changes which networks are treated as popular and auto-enabled, and requires clients to wire a new messenger action; misconfiguration or stale registry data could shift user-visible network filters.

Overview
Popular EVM network detection no longer relies only on bundled POPULAR_NETWORKS. NetworkEnablementController unions that list with EVM chains from ConfigRegistryController that are featured, active, and non-testnet, and uses the combined set for enableAllPopularNetworks, popular-networks mode, network-added handling, and listPopularEvmNetworks.

This is a breaking integration change: the controller messenger must expose ConfigRegistryController:getState, and the package adds @metamask/config-registry-controller as a dependency (README graph and tsconfig references updated). The standalone isPopularNetwork helper is removed in favor of the controller’s private #getPopularEvmChainIds / #getRegistryPopularEvmChainIds logic.

Tests are refactored to mock ConfigRegistryController:getState and cover registry-driven enablement and exclusion when registry entries are not “popular.”

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

@socket-security

socket-security Bot commented Jul 22, 2026

Copy link
Copy Markdown

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

Comment on lines -1477 to -1483
const { controller, messenger } = setupController();

// Mock the network configurations to include Bitcoin
jest
.spyOn(messenger, 'call')
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.mockImplementation((actionType: string, ..._args: unknown[]): any => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These mocks were a bit messy. Mocking the entire messenger.call method has two big drawbacks:

  1. Each new messenger call introduced breaks all of these test cases using this mocking pattern
  2. This test case is forced to mock all required messenger actions, even if it only needs one of them

Comment thread packages/network-enablement-controller/CHANGELOG.md Outdated
@mikesposito
mikesposito force-pushed the me/network-enablement-controller-dynamic-registry branch from 30eb4da to e61ffda Compare July 23, 2026 08:47
@mikesposito
mikesposito marked this pull request as ready for review July 23, 2026 08:48
@mikesposito
mikesposito requested review from a team as code owners July 23, 2026 08:48

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 e61ffda. Configure here.

@mikesposito

Copy link
Copy Markdown
Member Author

@metamaskbot publish-preview

@github-actions

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@7.5.5-preview-510706307
@metamask-previews/accounts-controller@39.0.5-preview-510706307
@metamask-previews/address-book-controller@7.1.2-preview-510706307
@metamask-previews/ai-controllers@0.8.0-preview-510706307
@metamask-previews/analytics-controller@1.2.1-preview-510706307
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-510706307
@metamask-previews/announcement-controller@8.1.0-preview-510706307
@metamask-previews/app-metadata-controller@2.0.1-preview-510706307
@metamask-previews/approval-controller@9.0.2-preview-510706307
@metamask-previews/assets-controller@11.1.1-preview-510706307
@metamask-previews/assets-controllers@110.0.0-preview-510706307
@metamask-previews/authenticated-user-storage@3.0.1-preview-510706307
@metamask-previews/base-controller@9.1.0-preview-510706307
@metamask-previews/base-data-service@0.1.3-preview-510706307
@metamask-previews/bitcoin-regtest-up@1.0.0-preview-510706307
@metamask-previews/bridge-controller@77.8.0-preview-510706307
@metamask-previews/bridge-status-controller@74.4.0-preview-510706307
@metamask-previews/build-utils@3.0.4-preview-510706307
@metamask-previews/chain-agnostic-permission@1.7.0-preview-510706307
@metamask-previews/chomp-api-service@4.0.0-preview-510706307
@metamask-previews/claims-controller@0.5.3-preview-510706307
@metamask-previews/client-controller@1.0.1-preview-510706307
@metamask-previews/client-utils@1.2.1-preview-510706307
@metamask-previews/compliance-controller@2.1.0-preview-510706307
@metamask-previews/composable-controller@12.0.1-preview-510706307
@metamask-previews/config-registry-controller@0.4.1-preview-510706307
@metamask-previews/connectivity-controller@0.3.0-preview-510706307
@metamask-previews/controller-utils@12.3.0-preview-510706307
@metamask-previews/core-backend@7.0.0-preview-510706307
@metamask-previews/delegation-controller@3.0.2-preview-510706307
@metamask-previews/earn-controller@12.2.2-preview-510706307
@metamask-previews/eip-5792-middleware@3.0.5-preview-510706307
@metamask-previews/eip-7702-internal-rpc-middleware@0.1.1-preview-510706307
@metamask-previews/eip1193-permission-middleware@2.0.1-preview-510706307
@metamask-previews/ens-controller@19.1.5-preview-510706307
@metamask-previews/eth-block-tracker@15.0.1-preview-510706307
@metamask-previews/eth-json-rpc-middleware@23.1.3-preview-510706307
@metamask-previews/eth-json-rpc-provider@6.0.1-preview-510706307
@metamask-previews/foundryup@1.0.1-preview-510706307
@metamask-previews/gas-fee-controller@26.2.4-preview-510706307
@metamask-previews/gator-permissions-controller@4.2.3-preview-510706307
@metamask-previews/geolocation-controller@0.1.3-preview-510706307
@metamask-previews/java-tron-up@1.0.0-preview-510706307
@metamask-previews/json-rpc-engine@10.5.0-preview-510706307
@metamask-previews/json-rpc-middleware-stream@8.0.8-preview-510706307
@metamask-previews/keyring-controller@27.1.0-preview-510706307
@metamask-previews/local-node-utils@1.0.0-preview-510706307
@metamask-previews/logging-controller@8.0.2-preview-510706307
@metamask-previews/message-manager@14.1.2-preview-510706307
@metamask-previews/messenger@2.0.0-preview-510706307
@metamask-previews/messenger-cli@0.2.0-preview-510706307
@metamask-previews/money-account-api-data-service@0.3.0-preview-510706307
@metamask-previews/money-account-balance-service@2.3.0-preview-510706307
@metamask-previews/money-account-controller@0.3.3-preview-510706307
@metamask-previews/money-account-upgrade-controller@3.0.0-preview-510706307
@metamask-previews/multichain-account-service@13.0.0-preview-510706307
@metamask-previews/multichain-api-middleware@4.0.1-preview-510706307
@metamask-previews/multichain-network-controller@3.2.1-preview-510706307
@metamask-previews/multichain-transactions-controller@7.1.1-preview-510706307
@metamask-previews/name-controller@9.1.2-preview-510706307
@metamask-previews/network-connection-banner-controller@0.1.0-preview-510706307
@metamask-previews/network-controller@34.0.0-preview-510706307
@metamask-previews/network-enablement-controller@5.6.0-preview-510706307
@metamask-previews/notification-services-controller@26.0.0-preview-510706307
@metamask-previews/passkey-controller@3.0.0-preview-510706307
@metamask-previews/permission-controller@13.1.1-preview-510706307
@metamask-previews/permission-log-controller@5.1.0-preview-510706307
@metamask-previews/perps-controller@10.0.0-preview-510706307
@metamask-previews/phishing-controller@17.3.0-preview-510706307
@metamask-previews/platform-api-docs@0.0.0-preview-510706307
@metamask-previews/polling-controller@16.0.8-preview-510706307
@metamask-previews/preferences-controller@23.1.0-preview-510706307
@metamask-previews/profile-metrics-controller@4.0.2-preview-510706307
@metamask-previews/profile-sync-controller@28.3.0-preview-510706307
@metamask-previews/ramps-controller@17.0.0-preview-510706307
@metamask-previews/rate-limit-controller@7.0.1-preview-510706307
@metamask-previews/react-data-query@0.2.2-preview-510706307
@metamask-previews/remote-feature-flag-controller@4.2.2-preview-510706307
@metamask-previews/sample-controllers@5.0.3-preview-510706307
@metamask-previews/seedless-onboarding-controller@10.1.0-preview-510706307
@metamask-previews/selected-network-controller@26.1.5-preview-510706307
@metamask-previews/sentinel-api-service@1.0.0-preview-510706307
@metamask-previews/shield-controller@5.1.3-preview-510706307
@metamask-previews/signature-controller@39.2.7-preview-510706307
@metamask-previews/smart-transactions-controller@25.0.1-preview-510706307
@metamask-previews/snap-account-service@2.0.0-preview-510706307
@metamask-previews/social-controllers@2.5.0-preview-510706307
@metamask-previews/solana-test-validator-up@1.0.0-preview-510706307
@metamask-previews/stellar-quickstart-up@0.0.0-preview-510706307
@metamask-previews/storage-service@1.0.2-preview-510706307
@metamask-previews/subscription-controller@6.2.1-preview-510706307
@metamask-previews/transaction-controller@69.2.1-preview-510706307
@metamask-previews/transaction-pay-controller@25.1.1-preview-510706307
@metamask-previews/user-operation-controller@41.2.7-preview-510706307
@metamask-previews/wallet@8.0.0-preview-510706307
@metamask-previews/wallet-cli@0.0.0-preview-510706307

@mikesposito
mikesposito added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit 3b976ff Jul 23, 2026
427 checks passed
@mikesposito
mikesposito deleted the me/network-enablement-controller-dynamic-registry branch July 23, 2026 13:16
pull Bot pushed a commit to dmrazzy/core that referenced this pull request Jul 28, 2026
## Explanation

Adds the user-facing `mm wallet send` command that sends a transaction
end-to-end through the daemon-hosted `TransactionController`, closing
MetaMask#9513. This is the CLI surface on top of the daemon's transaction
capability (MetaMask#9512 / MetaMask#9612): it collects transaction parameters,
dispatches them to the daemon, waits for the broadcast, and reports the
resulting transaction hash.

Send a transaction. `--value` is in ether; select the network with
`--network-client-id` or `--chain-id`; the sender defaults to the
selected account. The command previews the resolved plan and asks for
confirmation before broadcasting, then prints the transaction hash:

Because the daemon auto-approves the confirmation prompt — or your
explicit `--yes` — is the only boundary before funds move; use
`--dry-run` first if unsure. Gas is estimated automatically unless
overridden with `--gas` / `--max-fee-per-gas` /
`--max-priority-fee-per-gas` / `--gas-price` (each a `0x`-prefixed hex
quantity).

### Dedicated `sendTransaction` RPC handler

`TransactionController:addTransaction` returns a `Result` shaped like `{
transactionMeta, result }`, where `result` is a `Promise<hash>` that
resolves once the transaction is signed and broadcast. That promise is
**not JSON-serializable**, so it cannot travel back over the daemon's
generic `call` dispatch. The daemon therefore exposes a dedicated
`sendTransaction` handler (`src/daemon/send-transaction.ts`) that,
server-side:

1. resolves the network client — from `networkClientId`, or from
`chainId` via `NetworkController:findNetworkClientIdByChainId`;
2. resolves the sender — the provided `--from`, or the selected account;
3. calls `addTransaction(txParams, { networkClientId, origin:
'metamask', isInternal: true })` (internal, so it skips
origin/permitted-account validation and is auto-approved by the headless
daemon);
4. **awaits the broadcast** and re-reads the live record so the returned
status reflects the post-broadcast state (`submitted`), not the
`unapproved` creation snapshot;
5. returns a serializable `{ transactionHash, transactionId, status }`.

Params are validated with superstruct at the daemon boundary (exactly
one of `networkClientId` / `chainId`; `0x` address and hex quantities).

### The `mm wallet send` command

A thin client over that handler (`src/commands/wallet/send.ts`):


```sh
➜  wallet-cli: yarn mm wallet send --help
  Send a transaction through the daemon-hosted TransactionController. Estimates gas automatically
  unless overridden, signs, broadcasts, and prints the resulting transaction hash. The daemon
  auto-approves, so the confirmation boundary is this command.

USAGE
  $ mm wallet send --to <value> [--value <value>] [--from <value>] [--data <value>]
    [--network-client-id <value>] [--chain-id <value>] [--gas <value>] [--max-fee-per-gas <value>]
    [--max-priority-fee-per-gas <value>] [--gas-price <value>] [--dry-run] [-y] [-t <value>]

FLAGS
  -t, --timeout=<value>                   Response timeout in milliseconds
  -y, --yes                               Skip the confirmation prompt and broadcast immediately.
      --chain-id=<value>                  Chain ID (0x-prefixed hex) to resolve to a network client.
                                          Provide this or --network-client-id, not both.
      --data=<value>                      Calldata as a 0x-prefixed hex string (for contract calls)
      --dry-run                           Resolve the network client and sender and validate params,
                                          but do not broadcast.
      --from=<value>                      Sender address (0x-prefixed). Defaults to the selected
                                          account.
      --gas=<value>                       Gas limit override, as a 0x-prefixed hex quantity
      --gas-price=<value>                 Legacy gasPrice override, as a 0x-prefixed hex wei quantity
      --max-fee-per-gas=<value>           maxFeePerGas override, as a 0x-prefixed hex wei quantity
      --max-priority-fee-per-gas=<value>  maxPriorityFeePerGas override, as a 0x-prefixed hex wei
                                          quantity
      --network-client-id=<value>         Network client to send on. Provide this or --chain-id, not
                                          both.
      --to=<value>                        (required) Recipient address (0x-prefixed)
      --value=<value>                     [default: 0] Amount to send, in ether (e.g. 0.01). Defaults
                                          to 0.

EXAMPLES
  $ mm wallet send --to 0xRecipient --value 0.01 --chain-id 0x1

  $ mm wallet send --to 0xRecipient --value 0.01 --network-client-id mainnet --yes

  $ mm wallet send --to 0xContract --data 0xabcdef --value 0 --chain-id 0x1 --dry-run
```

## Testing

- Unit tests for the handler (network/sender resolution, internal
submit, dry-run, broadcast + live status, param validation) and the
command (arg parsing, preview/confirm/abort, `--yes`, `--dry-run`, error
surfaces); **100% coverage maintained**.
- **Real-chain e2e** (`tests/wallet-send.e2e.test.ts`): boots a local
`anvil` node, adds it as a custom network, and drives the built `mm` CLI
to sign, broadcast, and mine a real transaction (asserts receipt
`status: 0x1` and a recipient balance increase). It is
**skip-if-absent**; CI installs `anvil` for it only when
`packages/wallet-cli/` changed. See
`packages/wallet-cli/tests/README.md`.
- `build`, package `test`, `test:e2e`, `yarn lint`, `changelog:validate`
pass.

## References

- Closes MetaMask#9513
- Builds on MetaMask#9512 / MetaMask#9611 (daemon transaction-capable) and MetaMask#9509 (the
`TransactionController` slot); the mutating-RPC safety prerequisite
MetaMask#9511 landed in MetaMask#9608.
- `packages/wallet-cli/src/daemon/send-transaction.ts`,
`src/commands/wallet/send.ts`, `tests/wallet-send.e2e.test.ts`.

> [!NOTE]
> Stacked on `sirtimid/wallet-cli-daemon-transaction-capable` (MetaMask#9612);
this PR is based on that branch so the diff is scoped. Once MetaMask#9612
merges, this will be rebased onto `main` and retargeted.

## Checklist

- [x] Tests cover the handler and command (unit) plus a real-chain
broadcast (e2e); 100% coverage maintained.
- [x] `build`, `test`, `test:e2e`, `yarn lint:fix`, `yarn lint`,
`changelog:validate` pass.
- [x] Confirmation prompt (`--yes` to skip) and `--dry-run` gate a real,
irreversible send.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **High Risk**
> Adds an irreversible on-chain send path through a headless daemon that
auto-approves transactions; mistakes in confirmation, `--yes`, or
timeout/retry behavior could move real funds despite CLI safeguards.
> 
> **Overview**
> Introduces **`mm wallet send`** so users can broadcast through the
daemon-hosted `TransactionController`, with ether `--value`, network
selection via `--network-client-id` or `--chain-id`, optional gas
overrides, **`--dry-run`**, and an interactive preview (or **`--yes`**
to skip).
> 
> Because `addTransaction`'s broadcast promise cannot cross JSON-RPC,
the daemon gains a dedicated **`sendTransaction`** handler that resolves
network/sender, submits as internal/auto-approved, awaits the hash, and
returns `{ transactionHash, transactionId, status }` (with **`dryRun`**
for preview-only).
> 
> The CLI dry-runs before confirm, then pins the resolved **`from`** /
**`networkClientId`** on broadcast; it validates RPC results, uses a
longer default broadcast timeout with duplicate-send warnings on
timeout, and documents that the daemon still auto-approves—so the
command prompt is the main fund-moving gate.
> 
> **CI/testing:** wallet-cli e2e installs **anvil** via
`@metamask/foundryup`, sets **`MM_E2E_REQUIRE_ANVIL`**, adds a
real-chain send e2e (anvil + custom network), shares daemon cleanup
helpers, and updates knip/README/changelog accordingly.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0f0e34f. 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: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
pull Bot pushed a commit to firas9941/metamask-extension that referenced this pull request Aug 4, 2026
…er` (MetaMask#44766)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
~~Using preview build from MetaMask/core#9611

Bumping `@metamask/network-enablement-controller` to `^6.0.0`
```markdown
## [6.0.0]

### Added

- Expose missing public `NetworkEnablementController` method through its messenger ([MetaMask#9660](MetaMask/core#9660))
  - The following action is now available:
    - `NetworkEnablementController:restoreEnabledNetworkMap`
  - Corresponding action type (`NetworkEnablementControllerRestoreEnabledNetworkMapAction`) is available as well.

### Changed

- **BREAKING:** Popular-network classification is now augmented by `ConfigRegistryController` ([MetaMask#9611](MetaMask/core#9611))
  - `NetworkEnablementControllerMessenger` now requires the `ConfigRegistryController:getState` action to be available.
- Bump `@metamask/transaction-controller` from `^69.0.0` to `^69.3.0` ([MetaMask#9568](MetaMask/core#9568), [MetaMask#9589](MetaMask/core#9589), [MetaMask#9593](MetaMask/core#9593), [MetaMask#9693](MetaMask/core#9693))
- Bump `@metamask/keyring-api` from `^23.5.0` to `^23.7.0` ([MetaMask#9676](MetaMask/core#9676))
- Bump `@metamask/config-registry-controller` from `^0.4.1` to `^1.0.0` ([MetaMask#9706](MetaMask/core#9706))
```

and `@metamask/config-registry-controller` to `^1.0.0`
```markdown
## [1.0.0]

### Added

- Add `ConfigRegistryControllerStateChangedEvent` (`ConfigRegistryController:stateChanged`) to the controller's events ([MetaMask#9595](MetaMask/core#9595))
- Add `ConfigRegistryController.getNetworkConfigByCaip2ChainId` method to retrieve a network config by its CAIP-2 chain ID ([MetaMask#9597](MetaMask/core#9597), [MetaMask#9606](MetaMask/core#9606))
  - The method returns the network config if found, or `undefined` if not found.
  - The method is also accessible via the controller's messenger as `ConfigRegistryController:getNetworkConfigByCaip2ChainId`.

### Changed

- **BREAKING:** `ConfigRegistryControllerState.configs.networks` is now a `Record<Caip2ChainId, RegistryNetworkConfig>` instead of a `Record<string, RegistryNetworkConfig>` ([MetaMask#9606](MetaMask/core#9606))
- Bump `@metamask/utils` from `^11.9.0` to `^11.11.0` ([MetaMask#9074](MetaMask/core#9074))
- Bump `@metamask/controller-utils` from `^12.1.1` to `^12.3.0` ([MetaMask#9083](MetaMask/core#9083), [MetaMask#9218](MetaMask/core#9218))
- Bump `@metamask/profile-sync-controller` from `^28.1.1` to `^28.3.0` ([MetaMask#9119](MetaMask/core#9119), [MetaMask#9463](MetaMask/core#9463))
- Bump `@metamask/keyring-controller` from `^27.0.0` to `^27.1.0` ([MetaMask#9129](MetaMask/core#9129))
- Bump `@metamask/polling-controller` from `^16.0.6` to `^16.0.8` ([MetaMask#9218](MetaMask/core#9218), [MetaMask#9349](MetaMask/core#9349))
- Bump `@metamask/messenger` from `^1.2.0` to `^2.0.0` ([MetaMask#9392](MetaMask/core#9392))

### Removed

- **BREAKING:** Removed `ConfigRegistryControllerStateChangeEvent` type in favor of `ConfigRegistryControllerStateChangedEvent` ([MetaMask#9595](MetaMask/core#9595))
```

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Related: https://consensyssoftware.atlassian.net/browse/WPN-1710

## **Manual testing steps**

1. Verify the network switching and asset polling work same as before

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Popular-network behavior now depends on config registry state at
runtime; incorrect messenger wiring would break network enablement, but
the change is limited to dependency versions and one delegate action.
> 
> **Overview**
> Bumps **`@metamask/network-enablement-controller`** to `^6.0.0` and
**`@metamask/config-registry-controller`** to `^1.0.0`, with lockfile
updates.
> 
> Wires **`NetworkEnablementController`** to the config registry by
delegating **`ConfigRegistryController:getState`** on its messenger so
v6 can use registry data for popular-network classification.
> 
> Config-registry selector tests now build mock registry entries with
the **`RegistryNetworkConfig`** type instead of untyped inline objects,
matching the v1 typed `configs.networks` shape.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
1ddf8cd. 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: MetaMask Bot <metamaskbot@users.noreply.github.com>
Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
n3ps pushed a commit to MetaMask/metamask-extension that referenced this pull request Aug 5, 2026
…er` (#44766)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
~~Using preview build from MetaMask/core#9611

Bumping `@metamask/network-enablement-controller` to `^6.0.0`
```markdown
## [6.0.0]

### Added

- Expose missing public `NetworkEnablementController` method through its messenger ([#9660](MetaMask/core#9660))
  - The following action is now available:
    - `NetworkEnablementController:restoreEnabledNetworkMap`
  - Corresponding action type (`NetworkEnablementControllerRestoreEnabledNetworkMapAction`) is available as well.

### Changed

- **BREAKING:** Popular-network classification is now augmented by `ConfigRegistryController` ([#9611](MetaMask/core#9611))
  - `NetworkEnablementControllerMessenger` now requires the `ConfigRegistryController:getState` action to be available.
- Bump `@metamask/transaction-controller` from `^69.0.0` to `^69.3.0` ([#9568](MetaMask/core#9568), [#9589](MetaMask/core#9589), [#9593](MetaMask/core#9593), [#9693](MetaMask/core#9693))
- Bump `@metamask/keyring-api` from `^23.5.0` to `^23.7.0` ([#9676](MetaMask/core#9676))
- Bump `@metamask/config-registry-controller` from `^0.4.1` to `^1.0.0` ([#9706](MetaMask/core#9706))
```

and `@metamask/config-registry-controller` to `^1.0.0`
```markdown
## [1.0.0]

### Added

- Add `ConfigRegistryControllerStateChangedEvent` (`ConfigRegistryController:stateChanged`) to the controller's events ([#9595](MetaMask/core#9595))
- Add `ConfigRegistryController.getNetworkConfigByCaip2ChainId` method to retrieve a network config by its CAIP-2 chain ID ([#9597](MetaMask/core#9597), [#9606](MetaMask/core#9606))
  - The method returns the network config if found, or `undefined` if not found.
  - The method is also accessible via the controller's messenger as `ConfigRegistryController:getNetworkConfigByCaip2ChainId`.

### Changed

- **BREAKING:** `ConfigRegistryControllerState.configs.networks` is now a `Record<Caip2ChainId, RegistryNetworkConfig>` instead of a `Record<string, RegistryNetworkConfig>` ([#9606](MetaMask/core#9606))
- Bump `@metamask/utils` from `^11.9.0` to `^11.11.0` ([#9074](MetaMask/core#9074))
- Bump `@metamask/controller-utils` from `^12.1.1` to `^12.3.0` ([#9083](MetaMask/core#9083), [#9218](MetaMask/core#9218))
- Bump `@metamask/profile-sync-controller` from `^28.1.1` to `^28.3.0` ([#9119](MetaMask/core#9119), [#9463](MetaMask/core#9463))
- Bump `@metamask/keyring-controller` from `^27.0.0` to `^27.1.0` ([#9129](MetaMask/core#9129))
- Bump `@metamask/polling-controller` from `^16.0.6` to `^16.0.8` ([#9218](MetaMask/core#9218), [#9349](MetaMask/core#9349))
- Bump `@metamask/messenger` from `^1.2.0` to `^2.0.0` ([#9392](MetaMask/core#9392))

### Removed

- **BREAKING:** Removed `ConfigRegistryControllerStateChangeEvent` type in favor of `ConfigRegistryControllerStateChangedEvent` ([#9595](MetaMask/core#9595))
```

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Related: https://consensyssoftware.atlassian.net/browse/WPN-1710

## **Manual testing steps**

1. Verify the network switching and asset polling work same as before

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Popular-network behavior now depends on config registry state at
runtime; incorrect messenger wiring would break network enablement, but
the change is limited to dependency versions and one delegate action.
> 
> **Overview**
> Bumps **`@metamask/network-enablement-controller`** to `^6.0.0` and
**`@metamask/config-registry-controller`** to `^1.0.0`, with lockfile
updates.
> 
> Wires **`NetworkEnablementController`** to the config registry by
delegating **`ConfigRegistryController:getState`** on its messenger so
v6 can use registry data for popular-network classification.
> 
> Config-registry selector tests now build mock registry entries with
the **`RegistryNetworkConfig`** type instead of untyped inline objects,
matching the v1 typed `configs.networks` shape.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
1ddf8cd. 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: MetaMask Bot <metamaskbot@users.noreply.github.com>
Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
Bigshmow pushed a commit to MetaMask/metamask-extension that referenced this pull request Aug 5, 2026
…er` (#44766)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
~~Using preview build from MetaMask/core#9611

Bumping `@metamask/network-enablement-controller` to `^6.0.0`
```markdown
## [6.0.0]

### Added

- Expose missing public `NetworkEnablementController` method through its messenger ([#9660](MetaMask/core#9660))
  - The following action is now available:
    - `NetworkEnablementController:restoreEnabledNetworkMap`
  - Corresponding action type (`NetworkEnablementControllerRestoreEnabledNetworkMapAction`) is available as well.

### Changed

- **BREAKING:** Popular-network classification is now augmented by `ConfigRegistryController` ([#9611](MetaMask/core#9611))
  - `NetworkEnablementControllerMessenger` now requires the `ConfigRegistryController:getState` action to be available.
- Bump `@metamask/transaction-controller` from `^69.0.0` to `^69.3.0` ([#9568](MetaMask/core#9568), [#9589](MetaMask/core#9589), [#9593](MetaMask/core#9593), [#9693](MetaMask/core#9693))
- Bump `@metamask/keyring-api` from `^23.5.0` to `^23.7.0` ([#9676](MetaMask/core#9676))
- Bump `@metamask/config-registry-controller` from `^0.4.1` to `^1.0.0` ([#9706](MetaMask/core#9706))
```

and `@metamask/config-registry-controller` to `^1.0.0`
```markdown
## [1.0.0]

### Added

- Add `ConfigRegistryControllerStateChangedEvent` (`ConfigRegistryController:stateChanged`) to the controller's events ([#9595](MetaMask/core#9595))
- Add `ConfigRegistryController.getNetworkConfigByCaip2ChainId` method to retrieve a network config by its CAIP-2 chain ID ([#9597](MetaMask/core#9597), [#9606](MetaMask/core#9606))
  - The method returns the network config if found, or `undefined` if not found.
  - The method is also accessible via the controller's messenger as `ConfigRegistryController:getNetworkConfigByCaip2ChainId`.

### Changed

- **BREAKING:** `ConfigRegistryControllerState.configs.networks` is now a `Record<Caip2ChainId, RegistryNetworkConfig>` instead of a `Record<string, RegistryNetworkConfig>` ([#9606](MetaMask/core#9606))
- Bump `@metamask/utils` from `^11.9.0` to `^11.11.0` ([#9074](MetaMask/core#9074))
- Bump `@metamask/controller-utils` from `^12.1.1` to `^12.3.0` ([#9083](MetaMask/core#9083), [#9218](MetaMask/core#9218))
- Bump `@metamask/profile-sync-controller` from `^28.1.1` to `^28.3.0` ([#9119](MetaMask/core#9119), [#9463](MetaMask/core#9463))
- Bump `@metamask/keyring-controller` from `^27.0.0` to `^27.1.0` ([#9129](MetaMask/core#9129))
- Bump `@metamask/polling-controller` from `^16.0.6` to `^16.0.8` ([#9218](MetaMask/core#9218), [#9349](MetaMask/core#9349))
- Bump `@metamask/messenger` from `^1.2.0` to `^2.0.0` ([#9392](MetaMask/core#9392))

### Removed

- **BREAKING:** Removed `ConfigRegistryControllerStateChangeEvent` type in favor of `ConfigRegistryControllerStateChangedEvent` ([#9595](MetaMask/core#9595))
```

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Related: https://consensyssoftware.atlassian.net/browse/WPN-1710

## **Manual testing steps**

1. Verify the network switching and asset polling work same as before

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Popular-network behavior now depends on config registry state at
runtime; incorrect messenger wiring would break network enablement, but
the change is limited to dependency versions and one delegate action.
> 
> **Overview**
> Bumps **`@metamask/network-enablement-controller`** to `^6.0.0` and
**`@metamask/config-registry-controller`** to `^1.0.0`, with lockfile
updates.
> 
> Wires **`NetworkEnablementController`** to the config registry by
delegating **`ConfigRegistryController:getState`** on its messenger so
v6 can use registry data for popular-network classification.
> 
> Config-registry selector tests now build mock registry entries with
the **`RegistryNetworkConfig`** type instead of untyped inline objects,
matching the v1 typed `configs.networks` shape.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
1ddf8cd. 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: MetaMask Bot <metamaskbot@users.noreply.github.com>
Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
n3ps pushed a commit to MetaMask/metamask-extension that referenced this pull request Aug 6, 2026
…er` (#44766)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
~~Using preview build from MetaMask/core#9611

Bumping `@metamask/network-enablement-controller` to `^6.0.0`
```markdown
## [6.0.0]

### Added

- Expose missing public `NetworkEnablementController` method through its messenger ([#9660](MetaMask/core#9660))
  - The following action is now available:
    - `NetworkEnablementController:restoreEnabledNetworkMap`
  - Corresponding action type (`NetworkEnablementControllerRestoreEnabledNetworkMapAction`) is available as well.

### Changed

- **BREAKING:** Popular-network classification is now augmented by `ConfigRegistryController` ([#9611](MetaMask/core#9611))
  - `NetworkEnablementControllerMessenger` now requires the `ConfigRegistryController:getState` action to be available.
- Bump `@metamask/transaction-controller` from `^69.0.0` to `^69.3.0` ([#9568](MetaMask/core#9568), [#9589](MetaMask/core#9589), [#9593](MetaMask/core#9593), [#9693](MetaMask/core#9693))
- Bump `@metamask/keyring-api` from `^23.5.0` to `^23.7.0` ([#9676](MetaMask/core#9676))
- Bump `@metamask/config-registry-controller` from `^0.4.1` to `^1.0.0` ([#9706](MetaMask/core#9706))
```

and `@metamask/config-registry-controller` to `^1.0.0`
```markdown
## [1.0.0]

### Added

- Add `ConfigRegistryControllerStateChangedEvent` (`ConfigRegistryController:stateChanged`) to the controller's events ([#9595](MetaMask/core#9595))
- Add `ConfigRegistryController.getNetworkConfigByCaip2ChainId` method to retrieve a network config by its CAIP-2 chain ID ([#9597](MetaMask/core#9597), [#9606](MetaMask/core#9606))
  - The method returns the network config if found, or `undefined` if not found.
  - The method is also accessible via the controller's messenger as `ConfigRegistryController:getNetworkConfigByCaip2ChainId`.

### Changed

- **BREAKING:** `ConfigRegistryControllerState.configs.networks` is now a `Record<Caip2ChainId, RegistryNetworkConfig>` instead of a `Record<string, RegistryNetworkConfig>` ([#9606](MetaMask/core#9606))
- Bump `@metamask/utils` from `^11.9.0` to `^11.11.0` ([#9074](MetaMask/core#9074))
- Bump `@metamask/controller-utils` from `^12.1.1` to `^12.3.0` ([#9083](MetaMask/core#9083), [#9218](MetaMask/core#9218))
- Bump `@metamask/profile-sync-controller` from `^28.1.1` to `^28.3.0` ([#9119](MetaMask/core#9119), [#9463](MetaMask/core#9463))
- Bump `@metamask/keyring-controller` from `^27.0.0` to `^27.1.0` ([#9129](MetaMask/core#9129))
- Bump `@metamask/polling-controller` from `^16.0.6` to `^16.0.8` ([#9218](MetaMask/core#9218), [#9349](MetaMask/core#9349))
- Bump `@metamask/messenger` from `^1.2.0` to `^2.0.0` ([#9392](MetaMask/core#9392))

### Removed

- **BREAKING:** Removed `ConfigRegistryControllerStateChangeEvent` type in favor of `ConfigRegistryControllerStateChangedEvent` ([#9595](MetaMask/core#9595))
```

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Related: https://consensyssoftware.atlassian.net/browse/WPN-1710

## **Manual testing steps**

1. Verify the network switching and asset polling work same as before

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Popular-network behavior now depends on config registry state at
runtime; incorrect messenger wiring would break network enablement, but
the change is limited to dependency versions and one delegate action.
> 
> **Overview**
> Bumps **`@metamask/network-enablement-controller`** to `^6.0.0` and
**`@metamask/config-registry-controller`** to `^1.0.0`, with lockfile
updates.
> 
> Wires **`NetworkEnablementController`** to the config registry by
delegating **`ConfigRegistryController:getState`** on its messenger so
v6 can use registry data for popular-network classification.
> 
> Config-registry selector tests now build mock registry entries with
the **`RegistryNetworkConfig`** type instead of untyped inline objects,
matching the v1 typed `configs.networks` shape.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
1ddf8cd. 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: MetaMask Bot <metamaskbot@users.noreply.github.com>
Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants