Conversation
910e6ef to
da05b3b
Compare
da05b3b to
4fee538
Compare
4fee538 to
7b839a8
Compare
| 'sei-mainnet': 'sei-mainnet', | ||
| 'monad-mainnet': 'monad-mainnet', | ||
| 'hyperevm-mainnet': 'hyperevm-mainnet', | ||
| 'megaeth-mainnet': 'megaeth-mainnet', |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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


Explanation
avalanche-mainnettoInfuraNetworkTypemonad-mainnettoInfuraNetworkTypehyperevm-mainnettoInfuraNetworkTypemegaeth-mainnettoInfuraNetworkTypeReferences
Related to: https://consensyssoftware.atlassian.net/browse/NEB-496?atlOrigin=eyJpIjoiOWI0NjhlODE2NDdkNDNiOGEwMjdmMzcwYTY4OTI0MzEiLCJwIjoiaiJ9
Checklist
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, andmegaeth-mainnet.Updates
src/types.tsto include these networks acrossInfuraNetworkType,BuiltInNetworkName,ChainId,NetworksTicker,BlockExplorerUrl, andNetworkNickname, and documents the addition in the package changelog.Written by Cursor Bugbot for commit 7b839a8. This will update automatically on new commits. Configure here.