Skip to content

feat: add Monad Testnet #14963

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

feat: add Monad Testnet #14963

wants to merge 16 commits into from

Conversation

stanleyyconsensys
Copy link
Contributor

@stanleyyconsensys stanleyyconsensys commented Apr 29, 2025

Description

This PR is to add Monad Testnet as default network

It also include a migration script to add/replace the Monad testnet network for existing user

Change:

  • Bump controller-utils from 11.7.0 to 11.8.0
  • Bump network-controller from 23.2.0 to 23.4.0
  • Add Monad Testnet to default network via NetworkController options - additionalDefaultNetworks
  • Add migration script to replace/add Monad Testnet to the NetworkController state (TODO)
  • Update Unit Test for Monad Testnet

Related issues

Fixes:

Manual testing steps

  1. Setup a new wallet
  2. Click on network menu and show test networks
  3. You will see Sepolia , Linea Sepolia , Mega Testnet, Monad Testnet on test networks section
  4. Click on Monad Testnet to switch the network
  5. Send a transaction
  6. Check the transaction result in the explorer

Screenshots/Recordings

Before

After

image image

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@stanleyyconsensys stanleyyconsensys self-assigned this Apr 30, 2025
@stanleyyconsensys stanleyyconsensys changed the title feat: add monad testnet feat: add Monad Testnet Apr 30, 2025
stanleyyconsensys added a commit to MetaMask/core that referenced this pull request May 6, 2025
…ls` (#5724)

## Explanation

<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->

This PR is to add Monad Testnet as default network on
`network-controller` default state - `networkConfigurationsByChainId`
with the constants and type from the latest `controller-utils`

### Changes:

- Refactor `network-controller`
methods`getDefaultCustomNetworkConfigurationsByChainId` to build the
configuration from `CustomNetworkType` instead of hardcode network 1 by
1

- Add `Monad Testnet` info into `controller-utils`
- Include `Monad Testnet` into `network-controller` method
`getDefaultCustomNetworkConfigurationsByChainId`

Integration PR in mobile:
MetaMask/metamask-mobile#14963

<img width="300" alt="image"
src="https://github.com/user-attachments/assets/5f4b5bd7-d4f2-4edb-9e03-43b08206276a"
/>


## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

## Changelog

<!--
THIS SECTION IS NO LONGER NEEDED.

The process for updating changelogs has changed. Please consult the
"Updating changelogs" section of the Contributing doc for more.
-->

## 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](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
Copy link

socket-security bot commented May 7, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​controller-utils@​11.7.0 ⏵ 11.8.094 +110075 +196 +5100
Updatednpm/​@​metamask/​network-controller@​23.2.0 ⏵ 23.4.093 -110076 +198 +1100

View full report

@stanleyyconsensys stanleyyconsensys added the Run Smoke E2E Triggers smoke e2e on Bitrise label May 7, 2025
@stanleyyconsensys stanleyyconsensys marked this pull request as ready for review May 7, 2025 13:30
@stanleyyconsensys stanleyyconsensys requested a review from a team as a code owner May 7, 2025 13:30
Copy link
Contributor

github-actions bot commented May 7, 2025

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: c07264f
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/69819db3-1a07-4e21-a616-6364a8375a54

Note

  • This comment will auto-update when build completes
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@stanleyyconsensys stanleyyconsensys added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label May 7, 2025
@github-project-automation github-project-automation bot moved this to Needs dev review in PR review queue May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) Run Smoke E2E Triggers smoke e2e on Bitrise team-network-enablement
Projects
Status: Needs dev review
Development

Successfully merging this pull request may close these issues.

2 participants