Skip to content

Conversation

@maxime-oe
Copy link
Contributor

@maxime-oe maxime-oe commented Feb 9, 2026

Explanation

  • This PR adds 4 networks to supported Infura networks list (#7875)
    • Add avalanche-mainnet to InfuraNetworkType
    • Add monad-mainnet to InfuraNetworkType
    • Add hyperevm-mainnet to InfuraNetworkType
    • Add megaeth-mainnet to InfuraNetworkType

References

Related to: https://consensyssoftware.atlassian.net/browse/NEB-496?atlOrigin=eyJpIjoiOWI0NjhlODE2NDdkNDNiOGEwMjdmMzcwYTY4OTI0MzEiLCJwIjoiaiJ9

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

Low Risk
Constant/type expansions only; risk is limited to consumers relying on exhaustive network lists or switch statements needing to handle the new values.

Overview
Adds support for four additional Infura networks in @metamask/controller-utils: avalanche-mainnet, monad-mainnet, hyperevm-mainnet, and megaeth-mainnet.

Updates src/types.ts to include these networks across InfuraNetworkType, BuiltInNetworkName, ChainId, NetworksTicker, BlockExplorerUrl, and NetworkNickname, and documents the addition in the package changelog.

Written by Cursor Bugbot for commit 7b839a8. This will update automatically on new commits. Configure here.

@maxime-oe maxime-oe force-pushed the feat/ctrl-utils-add-4-net-infura branch from 910e6ef to da05b3b Compare February 9, 2026 16:39
@maxime-oe maxime-oe marked this pull request as ready for review February 9, 2026 16:39
@maxime-oe maxime-oe requested a review from a team as a code owner February 9, 2026 16:39
@maxime-oe maxime-oe force-pushed the feat/ctrl-utils-add-4-net-infura branch from da05b3b to 4fee538 Compare February 9, 2026 18:05
@maxime-oe maxime-oe force-pushed the feat/ctrl-utils-add-4-net-infura branch from 4fee538 to 7b839a8 Compare February 9, 2026 18:08
Copy link

@cursor cursor bot left a comment

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.

'sei-mainnet': 'sei-mainnet',
'monad-mainnet': 'monad-mainnet',
'hyperevm-mainnet': 'hyperevm-mainnet',
'megaeth-mainnet': 'megaeth-mainnet',
Copy link

Choose a reason for hiding this comment

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

New Infura networks missing from BUILT_IN_NETWORKS constant

Medium Severity

The four new Infura networks (avalanche-mainnet, monad-mainnet, hyperevm-mainnet, megaeth-mainnet) are added to InfuraNetworkType, BuiltInNetworkName, ChainId, NetworksTicker, BlockExplorerUrl, and NetworkNickname, but are not added to the BUILT_IN_NETWORKS constant in constants.ts. Every previous network addition also updated BUILT_IN_NETWORKS. This exported object is used by consumers and test helpers (e.g., BUILT_IN_NETWORKS[infuraNetwork].chainId) to look up network metadata — accessing the new networks there will return undefined and cause runtime errors.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will need to investigate more. Original idea was just to add networks into InfuraNetworkType but then other objects depended on it. I don't want to risk a regression and so I'll have to audit it

@maxime-oe maxime-oe marked this pull request as draft February 10, 2026 05:59
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