-
-
Notifications
You must be signed in to change notification settings - Fork 223
feat: add Monad Testnet
to network-controller
and controller-utils
#5724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
Keep in mind, due to Monad is using 'MON' as symbol, hence, we will not add it into controller-utils constants |
@mcmire i also agree with that, may be to align with other constants, we can use chainId as key export const BUILT_IN_CUSTOM_NETWORKS_RPC = {
[ChainId['megaeth-testnet']]: 'https://carrot.megaeth.com/rpc',
[ChainId['monad-testnet']]: 'https://testnet-rpc.monad.xyz',
}; keep in mind that, we change this constants will causing a breaking change for controller-utils but i guess we are okay to move it to a breaking version, wdyt? |
@stanleyyconsensys Hmm... I would say despite the comments, let's do what we can to avoid a breaking change for now, since |
…core into feat/add-monad-testnet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Explanation
This PR is to add Monad Testnet as default network on
network-controller
default state -networkConfigurationsByChainId
with the constants and type from the latestcontroller-utils
Changes:
Refactor
network-controller
methodsgetDefaultCustomNetworkConfigurationsByChainId
to build the configuration fromCustomNetworkType
instead of hardcode network 1 by 1Add
Monad Testnet
info intocontroller-utils
Include
Monad Testnet
intonetwork-controller
methodgetDefaultCustomNetworkConfigurationsByChainId
Integration PR in mobile: MetaMask/metamask-mobile#14963
References
Changelog
Checklist