Skip to content

feat!: allow dynamic infura networks#9432

Draft
mikesposito wants to merge 3 commits into
mainfrom
me/WPN-1554-allow-dynamic-infura-networks
Draft

feat!: allow dynamic infura networks#9432
mikesposito wants to merge 3 commits into
mainfrom
me/WPN-1554-allow-dynamic-infura-networks

Conversation

@mikesposito

Copy link
Copy Markdown
Member

Explanation

Currently, NetworkController manages two types of network config: Infura and Custom. The Infura type is dedicated to configurations with RPC endpoints with an Infura URL that uses a template string for the project ID, while Custom configurations are generic network configurations that can be also added by users.

In order to add a network configuration of Infura type to NetworkController, the network must first be added to @metamask/controller-utils to satisfy NetworkController validations, or else it won’t be recognized as a known network, and the operation will fail with an error. This currently blocks us from leveraging mm-config-registry (Dynamic registry) from being used to add Infura network configurations remotely.

This PR relaxes NetworkController validations to accept Infura configurations that are not included in @metamask/controller-utils, nor in any other bundled known list.

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

@mikesposito mikesposito force-pushed the me/WPN-1554-allow-dynamic-infura-networks branch from 21722a6 to ce206bd Compare July 8, 2026 19:23
@mikesposito

Copy link
Copy Markdown
Member Author

@metamaskbot publish-preview

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.

1 participant