-
-
Notifications
You must be signed in to change notification settings - Fork 256
chore: change Monad Testnet to infura network
#7067
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
base: main
Are you sure you want to change the base?
Changes from all commits
1ebd872
23b78b6
65bdea1
374308c
9051881
3ba6af3
7f3d20a
e520e29
ba44305
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ export const InfuraNetworkType = { | |
| 'optimism-mainnet': 'optimism-mainnet', | ||
| 'polygon-mainnet': 'polygon-mainnet', | ||
| 'sei-mainnet': 'sei-mainnet', | ||
| 'monad-testnet': 'monad-testnet', | ||
| } as const; | ||
|
|
||
| export type InfuraNetworkType = | ||
|
|
@@ -24,6 +25,9 @@ export type InfuraNetworkType = | |
| */ | ||
| export const CustomNetworkType = { | ||
| 'megaeth-testnet': 'megaeth-testnet', | ||
| /** | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we dont remove monad here to avoid breaking change as controller utils is share everywhere
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, good call. |
||
| * @deprecated `monad-testnet` is supported on InfuraNetworkType instead. | ||
| */ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Network Type Conflict Causes Classification AmbiguityThe |
||
| 'monad-testnet': 'monad-testnet', | ||
| } as const; | ||
| export type CustomNetworkType = | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -508,6 +508,21 @@ describe('NetworkController', () => { | |
| }, | ||
| ], | ||
| }, | ||
| "0x279f": Object { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this affects the default set of networks for NetworkController, what are your thoughts on adding a changelog entry for this package? Perhaps we could add an entry to Changed such as: ### Changed
- Update the default set of Infura networks to include Monad Testnet ([#7067](https://github.com/MetaMask/core/pull/7067))
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think we only need that when network controller bump up? otherwise it seem still remain the same?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We generally encourage updating changelogs as changes are made to packages, not at release time. As it stands your change affects NetworkController now, not when the release is created. (You can tell because the tests changed.) That's why I suggested updating the |
||
| "blockExplorerUrls": Array [], | ||
| "chainId": "0x279f", | ||
| "defaultRpcEndpointIndex": 0, | ||
| "name": "Monad Testnet", | ||
| "nativeCurrency": "MON", | ||
| "rpcEndpoints": Array [ | ||
| Object { | ||
| "failoverUrls": Array [], | ||
| "networkClientId": "monad-testnet", | ||
| "type": "infura", | ||
| "url": "https://monad-testnet.infura.io/v3/{infuraProjectId}", | ||
| }, | ||
| ], | ||
| }, | ||
| "0x38": Object { | ||
| "blockExplorerUrls": Array [], | ||
| "chainId": "0x38", | ||
|
|
@@ -695,6 +710,21 @@ describe('NetworkController', () => { | |
| }, | ||
| ], | ||
| }, | ||
| "0x279f": Object { | ||
| "blockExplorerUrls": Array [], | ||
| "chainId": "0x279f", | ||
| "defaultRpcEndpointIndex": 0, | ||
| "name": "Monad Testnet", | ||
| "nativeCurrency": "MON", | ||
| "rpcEndpoints": Array [ | ||
| Object { | ||
| "failoverUrls": Array [], | ||
| "networkClientId": "monad-testnet", | ||
| "type": "infura", | ||
| "url": "https://monad-testnet.infura.io/v3/{infuraProjectId}", | ||
| }, | ||
| ], | ||
| }, | ||
| "0x38": Object { | ||
| "blockExplorerUrls": Array [], | ||
| "chainId": "0x38", | ||
|
|
@@ -2001,6 +2031,21 @@ describe('NetworkController', () => { | |
| enableRpcFailover: expect.any(Function), | ||
| disableRpcFailover: expect.any(Function), | ||
| }, | ||
| 'monad-testnet': { | ||
| blockTracker: expect.anything(), | ||
| configuration: { | ||
| type: NetworkClientType.Infura, | ||
| failoverRpcUrls: [], | ||
| infuraProjectId, | ||
| chainId: '0x279f', | ||
| ticker: 'MON', | ||
| network: InfuraNetworkType['monad-testnet'], | ||
| }, | ||
| provider: expect.anything(), | ||
| destroy: expect.any(Function), | ||
| enableRpcFailover: expect.any(Function), | ||
| disableRpcFailover: expect.any(Function), | ||
| }, | ||
| 'optimism-mainnet': { | ||
| blockTracker: expect.anything(), | ||
| configuration: { | ||
|
|
@@ -14793,6 +14838,21 @@ describe('NetworkController', () => { | |
| }, | ||
| ], | ||
| }, | ||
| "0x279f": Object { | ||
| "blockExplorerUrls": Array [], | ||
| "chainId": "0x279f", | ||
| "defaultRpcEndpointIndex": 0, | ||
| "name": "Monad Testnet", | ||
| "nativeCurrency": "MON", | ||
| "rpcEndpoints": Array [ | ||
| Object { | ||
| "failoverUrls": Array [], | ||
| "networkClientId": "monad-testnet", | ||
| "type": "infura", | ||
| "url": "https://monad-testnet.infura.io/v3/{infuraProjectId}", | ||
| }, | ||
| ], | ||
| }, | ||
| "0x38": Object { | ||
| "blockExplorerUrls": Array [], | ||
| "chainId": "0x38", | ||
|
|
@@ -14962,6 +15022,21 @@ describe('NetworkController', () => { | |
| }, | ||
| ], | ||
| }, | ||
| "0x279f": Object { | ||
| "blockExplorerUrls": Array [], | ||
| "chainId": "0x279f", | ||
| "defaultRpcEndpointIndex": 0, | ||
| "name": "Monad Testnet", | ||
| "nativeCurrency": "MON", | ||
| "rpcEndpoints": Array [ | ||
| Object { | ||
| "failoverUrls": Array [], | ||
| "networkClientId": "monad-testnet", | ||
| "type": "infura", | ||
| "url": "https://monad-testnet.infura.io/v3/{infuraProjectId}", | ||
| }, | ||
| ], | ||
| }, | ||
| "0x38": Object { | ||
| "blockExplorerUrls": Array [], | ||
| "chainId": "0x38", | ||
|
|
@@ -15131,6 +15206,21 @@ describe('NetworkController', () => { | |
| }, | ||
| ], | ||
| }, | ||
| "0x279f": Object { | ||
| "blockExplorerUrls": Array [], | ||
| "chainId": "0x279f", | ||
| "defaultRpcEndpointIndex": 0, | ||
| "name": "Monad Testnet", | ||
| "nativeCurrency": "MON", | ||
| "rpcEndpoints": Array [ | ||
| Object { | ||
| "failoverUrls": Array [], | ||
| "networkClientId": "monad-testnet", | ||
| "type": "infura", | ||
| "url": "https://monad-testnet.infura.io/v3/{infuraProjectId}", | ||
| }, | ||
| ], | ||
| }, | ||
| "0x38": Object { | ||
| "blockExplorerUrls": Array [], | ||
| "chainId": "0x38", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.