-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
feat: add MegaETH Testnet
to network-controller
#5527
feat: add MegaETH Testnet
to network-controller
#5527
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.
|
MegaETH Testnet
to network controller
MegaETH Testnet
to network controllerMegaETH Testnet
to network-controller
@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.
|
57dc107
to
38ce0ec
Compare
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
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.
Just one suggestion on this, otherwise this looks good.
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.
Looks good!
- fix mock network hardcoded mock path when RPC has endpoint with '/rpc' - fix test result on token detection when megaETH network added as default
39d35a4
to
80be045
Compare
Explanation
Further to Previous PR: #5495
We are adding MegaETH Testnet as default network on
Network Controller
default state -networkConfigurationsByChainId
with the constants and type from the latestcontroller-utils
In additional, a new constructor option
addtionalDefaultNetworks
has introduced inNetworkController
toprevent client push the new network unintentionally
(such as bump up the network controller without support on the client side)
Changes:
Add Constructor Option
addtionalDefaultNetworks
to specify the additional default networks to be included, which allows backward compatible and only include the Network if it has ready on client side (by developer specify)Refactor the logic to separate the construction of default network configurations to methods
getDefaultInfuraNetworkConfigurationsByChainId
andgetDefaultCustomNetworkConfigurationsByChainId
Fix
mock-network
not support a use case when the RPC endpoint come with a path segment, e.g: 'https://carrot.megaeth.com/rpc'Add
MegaETH Testnet
ChainId into constantsCHAIN_IDS
fromtransaction-controller
Note :
For everyone interested in testing this version in MM mobile you can use this branch to do so : https://github.com/MetaMask/metamask-mobile/tree/feat/add-megaeth-testnet


References
Changelog
@metamask/network-controller
addtionalDefaultNetworks
to specify the additional networks to be included as the default network.@metamask/transaction-controller
MegaETH Testnet
ChainId into constantsCHAIN_IDS
Checklist