feat: add bridge/swap feature to HyperEVM#39819
Conversation
|
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. |
f7520ec to
04c4ce2
Compare
|
Caution MetaMask internal reviewing guidelines:
|
04c4ce2 to
30b6850
Compare
30b6850 to
e6e8069
Compare
e6e8069 to
6cecbe2
Compare
|
Pushed |
✨ Files requiring CODEOWNER review ✨📜 @MetaMask/policy-reviewers (8 files, +320 -8)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🔄 @MetaMask/swaps-engineers (2 files, +12 -1)
|
Builds ready [6cecbe2]
UI Startup Metrics (1440 ± 105 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [b8f7e8f]
UI Startup Metrics (1453 ± 108 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Mrtenz
left a comment
There was a problem hiding this comment.
Policy changes look good to me.
| "uuid": true | ||
| } | ||
| }, | ||
| "@metamask/transaction-pay-controller>@metamask/bridge-controller": { |
There was a problem hiding this comment.
Looks like some packages still use the previous major version of @metamask/bridge-controller. Not related to this PR, but we should make sure to bump it so we can deduplicate.
There was a problem hiding this comment.
Ok thank you. I've added it to my TODO list. Maybe I should have done it on the last core release (although I had done a minor bump). Is it recommended to bump dependent packages when doing a major bump, generally speaking ?
shared/constants/swaps.ts
Outdated
| ]), | ||
| [CHAIN_IDS.HYPE]: new Set([ | ||
| '0xb88339cb7199b77e23db6e890353e22632ba630f', // USDC | ||
| '0xb88339CB7199b77E23DB6E890353E22632Ba630f', // USDC |
There was a problem hiding this comment.
This is not in use anymore so no need to update it
Builds ready [9b23901]
UI Startup Metrics (1384 ± 99 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [4af4ad0]
UI Startup Metrics (1393 ± 113 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Changelog
CHANGELOG entry: Adds Bridge and Swap feature to HyperEVM
Related issues
Jira epic: https://consensyssoftware.atlassian.net/browse/NEB-105?atlOrigin=eyJpIjoiNTQwZjNkMDEwNTdhNGFjZWFmMTJiZTJlY2QyM2I4MDMiLCJwIjoiaiJ9
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Expands supported networks and contract-address allowlists for Bridge/Swaps and bumps core controller dependencies, which can affect transaction routing and cross-chain flows. LavaMoat policy broadening also increases the chance of mis-scoping permissions if incorrect.
Overview
Adds HyperEVM (CHAIN_IDS.HYPE /
eip155:999) to the allowed Bridge and Swaps networks, including display names and a default Swaps native token (HYPE) plus the relevant contract and wrapped-token addresses.Extends Bridge/Swaps token metadata to include HyperEVM USDC (and additional stablecoin IDs for slippage heuristics), and updates the bridge UI selector test expectations to include the new chain.
Updates dependencies to newer
@metamask/bridge-controllerand@metamask/transaction-controllerversions and adjusts LavaMoat Browserify/Webpack policies to allowtransaction-pay-controller’s nestedbridge-controller/network-controller dependency graph and required globals.Written by Cursor Bugbot for commit 4af4ad0. This will update automatically on new commits. Configure here.