Skip to content

feat: add SEI network support in @metamask/assets-controllers #5610

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 19 commits into
base: main
Choose a base branch
from

Conversation

stanleyyconsensys
Copy link
Contributor

@stanleyyconsensys stanleyyconsensys commented Apr 8, 2025

Explanation

This PR is to adding SEI support for

  • Assets Controller

Even if the network is not yet onboard on mobile/extension
it has no harm to adding SEI support on mobile/extension

References

Changelog

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, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@stanleyyconsensys
Copy link
Contributor Author

@metamaskbot publish-preview

1 similar comment
@stanleyyconsensys
Copy link
Contributor Author

@metamaskbot publish-preview

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "27.0.0-preview-fa52096c",
  "@metamask-previews/address-book-controller": "6.0.3-preview-fa52096c",
  "@metamask-previews/announcement-controller": "7.0.3-preview-fa52096c",
  "@metamask-previews/app-metadata-controller": "1.0.0-preview-fa52096c",
  "@metamask-previews/approval-controller": "7.1.3-preview-fa52096c",
  "@metamask-previews/assets-controllers": "56.0.0-preview-fa52096c",
  "@metamask-previews/base-controller": "8.0.0-preview-fa52096c",
  "@metamask-previews/bridge-controller": "14.0.0-preview-fa52096c",
  "@metamask-previews/bridge-status-controller": "12.0.1-preview-fa52096c",
  "@metamask-previews/build-utils": "3.0.3-preview-fa52096c",
  "@metamask-previews/chain-agnostic-permission": "0.3.0-preview-fa52096c",
  "@metamask-previews/composable-controller": "11.0.0-preview-fa52096c",
  "@metamask-previews/controller-utils": "11.7.0-preview-fa52096c",
  "@metamask-previews/delegation-controller": "0.0.0-preview-fa52096c",
  "@metamask-previews/earn-controller": "0.11.0-preview-fa52096c",
  "@metamask-previews/eip1193-permission-middleware": "0.1.0-preview-fa52096c",
  "@metamask-previews/ens-controller": "16.0.0-preview-fa52096c",
  "@metamask-previews/eth-json-rpc-provider": "4.1.8-preview-fa52096c",
  "@metamask-previews/gas-fee-controller": "23.0.0-preview-fa52096c",
  "@metamask-previews/json-rpc-engine": "10.0.3-preview-fa52096c",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.7-preview-fa52096c",
  "@metamask-previews/keyring-controller": "21.0.2-preview-fa52096c",
  "@metamask-previews/logging-controller": "6.0.4-preview-fa52096c",
  "@metamask-previews/message-manager": "12.0.1-preview-fa52096c",
  "@metamask-previews/multichain": "4.0.0-preview-fa52096c",
  "@metamask-previews/multichain-api-middleware": "0.1.1-preview-fa52096c",
  "@metamask-previews/multichain-network-controller": "0.4.0-preview-fa52096c",
  "@metamask-previews/multichain-transactions-controller": "0.9.0-preview-fa52096c",
  "@metamask-previews/name-controller": "8.0.3-preview-fa52096c",
  "@metamask-previews/network-controller": "23.2.0-preview-fa52096c",
  "@metamask-previews/notification-services-controller": "6.0.0-preview-fa52096c",
  "@metamask-previews/permission-controller": "11.0.6-preview-fa52096c",
  "@metamask-previews/permission-log-controller": "3.0.3-preview-fa52096c",
  "@metamask-previews/phishing-controller": "12.4.1-preview-fa52096c",
  "@metamask-previews/polling-controller": "13.0.0-preview-fa52096c",
  "@metamask-previews/preferences-controller": "17.0.0-preview-fa52096c",
  "@metamask-previews/profile-sync-controller": "12.0.0-preview-fa52096c",
  "@metamask-previews/queued-request-controller": "10.0.0-preview-fa52096c",
  "@metamask-previews/rate-limit-controller": "6.0.3-preview-fa52096c",
  "@metamask-previews/remote-feature-flag-controller": "1.6.0-preview-fa52096c",
  "@metamask-previews/sample-controllers": "0.1.0-preview-fa52096c",
  "@metamask-previews/selected-network-controller": "22.0.0-preview-fa52096c",
  "@metamask-previews/signature-controller": "27.1.0-preview-fa52096c",
  "@metamask-previews/token-search-discovery-controller": "3.1.0-preview-fa52096c",
  "@metamask-previews/transaction-controller": "54.1.0-preview-fa52096c",
  "@metamask-previews/user-operation-controller": "33.0.0-preview-fa52096c"
}

@stanleyyconsensys stanleyyconsensys marked this pull request as ready for review April 17, 2025 03:36
@stanleyyconsensys stanleyyconsensys requested review from a team as code owners April 17, 2025 03:36
cryptodev-2s
cryptodev-2s previously approved these changes Apr 17, 2025
Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cryptodev-2s
Copy link
Contributor

@stanleyyconsensys you’ve got some conflicts to resolve—let me know once they’re fixed and I’ll take another look.

@stanleyyconsensys
Copy link
Contributor Author

stanleyyconsensys commented Apr 17, 2025

@stanleyyconsensys you’ve got some conflicts to resolve—let me know once they’re fixed and I’ll take another look.

@cryptodev-2s thanks for the review, just resolve the conflict on the change log, hopefully it will not happen again

i just wonder why we change the way for implement the change log, previous one seem better (at least you wont have conflict on that?)

cryptodev-2s
cryptodev-2s previously approved these changes Apr 17, 2025
Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

wantedsystem
wantedsystem previously approved these changes Apr 17, 2025
salimtb
salimtb previously approved these changes Apr 17, 2025
Copy link
Contributor

@salimtb salimtb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assets changes lgtm

@sahar-fehri
Copy link
Contributor

Oh i think this line in changelog got lost

  • Add SEI network support (#5610)

@stanleyyconsensys stanleyyconsensys dismissed stale reviews from salimtb and wantedsystem via ba6884a April 17, 2025 12:28
@mcmire
Copy link
Contributor

mcmire commented Apr 17, 2025

@stanleyyconsensys Do we need to update controller-utils as well?

Copy link
Member

@OGPoyraz OGPoyraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lifting off my RC since we rolled back transaction-controller changes

OGPoyraz
OGPoyraz previously approved these changes Apr 17, 2025
@stanleyyconsensys
Copy link
Contributor Author

stanleyyconsensys commented Apr 17, 2025

@stanleyyconsensys Do we need to update controller-utils as well?

@mcmire SEI is not a build-in network, it is a feature network like Polygon, so we dont need to update controller-utils

im thinking, we should create a refactor PR to remove all the chainIDs from any controller,
and having them to pass in from Constructor

else it will become a super annoying whenever we need to add a network , wdyt?

cryptodev-2s
cryptodev-2s previously approved these changes Apr 17, 2025
Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

sahar-fehri
sahar-fehri previously approved these changes Apr 17, 2025
@stanleyyconsensys stanleyyconsensys enabled auto-merge (squash) April 17, 2025 14:26
@@ -17,6 +17,7 @@ export const ALLOWED_BRIDGE_CHAIN_IDS = [
CHAIN_IDS.ARBITRUM,
CHAIN_IDS.LINEA_MAINNET,
CHAIN_IDS.BASE,
CHAIN_IDS.SEI,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ejwessel @micaelae Are we supporting bridge quotes for SEI network ?

Copy link
Contributor Author

@stanleyyconsensys stanleyyconsensys Apr 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amitabh94 it is not supported for now, but it is wip by ME

since the UI is blocking the user to fetch quote for SEI, so i think it is okay to add the chain id here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

due to the sake of simplicity on the review of this PR, i remove bridge controller to avoid blocking the others

@stanleyyconsensys stanleyyconsensys changed the title feat: add SEI network support feat: add SEI network support in Assets Controller Apr 22, 2025
@stanleyyconsensys stanleyyconsensys changed the title feat: add SEI network support in Assets Controller feat: add SEI network support in @metamask/assets-controllers Apr 22, 2025
Copy link
Member

@mikesposito mikesposito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

- Added `fetchHistoricalPricesForAsset` method to `MultichainAssetsRatesController` ([#5639](https://github.com/MetaMask/core/pull/5639))
- Added `getSelectedMultichainAccount` action to `multichainAssetsRatesController` ([#5639](https://github.com/MetaMask/core/pull/5639))
- Added new state field `historicalPrices` to `MultichainAssetsRatesController` ([#5639](https://github.com/MetaMask/core/pull/5639))
- Add `includeMarketData` to the params of the `OnAssetsConversion` handler ([#5639](https://github.com/MetaMask/core/pull/5639))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v58 has been already released; is this change intentional?

Copy link
Contributor Author

@stanleyyconsensys stanleyyconsensys Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

um, as i had a comment from @cryptodev-2s previously

which we should use Add instead of Added

i can rollback that, but just for align purpose

Copy link
Contributor Author

@stanleyyconsensys stanleyyconsensys Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sahar-fehri which way we prefer

just change to Add for this PR
or do it for previous too
or use Added

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it has been already released, lets not update it; but in future we use Add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants