Skip to content

test: EIP-5792 methods on Multichain API #33077

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

Conversation

wenfix
Copy link

@wenfix wenfix commented May 20, 2025

Description

We want to ensure there is support for calling EIP-5792 methods via the Multichain API. Adds E2E tests for it.

Open in GitHub Codespaces

Related issues

https://github.com/MetaMask/MetaMask-planning/issues/4784

Manual testing steps

Screenshots/Recordings

Before

After

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

socket-security bot commented May 20, 2025

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​multichain-api-middleware@​0.1.1 ⏵ 0.3.084 +110074 +193100
Updated@​metamask/​chain-agnostic-permission@​0.2.0 ⏵ 0.7.096 +110075 +196 +1100
Updated@​metamask/​test-dapp-multichain@​0.10.0 ⏵ 0.12.085 +210092 +197 +250 -50
Updated@​metamask/​api-specs@​0.10.15 ⏵ 0.14.095 +110087 +196100

View full report

@@ -11,7 +11,7 @@ import {
NormalizedScopesObject,
getSupportedScopeObjects,
Caip25CaveatValue,
setPermittedAccounts,
setNonSCACaipAccountIdsInCaip25CaveatValue
Copy link
Author

Choose a reason for hiding this comment

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

This change is unrelated but required due to breaking changes on the @metamask/[email protected] package that went into this. Diff should go away after #32152 is merged.

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@metamaskbot
Copy link
Collaborator

metamaskbot commented May 20, 2025

✨ Files requiring CODEOWNER review ✨

🧩 @MetaMask/extension-devs

  • lavamoat/browserify/beta/policy.json
  • lavamoat/browserify/flask/policy.json
  • lavamoat/browserify/main/policy.json
  • lavamoat/browserify/mmi/policy.json

📜 @MetaMask/policy-reviewers

Tip

Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers.

  • lavamoat/browserify/beta/policy.json
  • lavamoat/browserify/flask/policy.json
  • lavamoat/browserify/main/policy.json
  • lavamoat/browserify/mmi/policy.json

🔗 @MetaMask/supply-chain

  • lavamoat/browserify/beta/policy.json
  • lavamoat/browserify/flask/policy.json
  • lavamoat/browserify/main/policy.json
  • lavamoat/browserify/mmi/policy.json

@@ -1,4 +1,6 @@
/* eslint-disable prettier/prettier */
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this disable necessary?

Copy link
Author

Choose a reason for hiding this comment

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

it's not, must've been a fat finger 😅

@wenfix wenfix marked this pull request as ready for review May 21, 2025 14:53
@wenfix wenfix requested review from a team as code owners May 21, 2025 14:53
@wenfix wenfix force-pushed the am/multichain-eip5792-methods-test branch from 3778f97 to 6cb35c8 Compare May 21, 2025 15:15
@wenfix wenfix requested review from a team as code owners May 21, 2025 15:15
@wenfix
Copy link
Author

wenfix commented May 21, 2025

@metamaskbot update-policies

@wenfix wenfix changed the base branch from main to jl/adopt-sip-26-post-merge-core-refactor May 21, 2025 15:26
@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@metamaskbot
Copy link
Collaborator

Builds ready [329f6ba]
UI Startup Metrics (1187 ± 64 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1187107015936412131278
load102189914366210461104
domContentLoaded101389214276310411096
domInteractive16133431624
firstPaint797138143737310381092
backgroundConnect94336825
firstReactRender20154762035
getState1455282030
initialActions001001
loadScripts775652117662801851
setupStore84334817
WebpackHomeuiStartup21621732275321823002508
load16681354195115417651896
domContentLoaded16601350193815217601883
domInteractive161258101346
firstPaint1556835051171265
backgroundConnect2710249262951
firstReactRender16942375116309332
getState195303411439
initialActions318145
loadScripts16561348192515117561871
setupStore3863047023279
FirefoxBrowserifyHomeuiStartup13121134177113413331623
load1160992156811812001437
domContentLoaded1160992156811811991437
domInteractive953926531102158
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect19135882040
firstReactRender23205042328
getState11420326813
initialActions005101
loadScripts1144979155411711851420
setupStore9433933611
WebpackHomeuiStartup15881372234416516641905
load13681186193414314411676
domContentLoaded13681186193414314411676
domInteractive80562562386124
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect241571102445
firstReactRender39265454248
getState145237321030
initialActions102111
loadScripts13481172191114314211657
setupStore959310822
Benchmark value 25 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 39 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 2508 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 279 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 39 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 1676 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1676 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 1657 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 9ms | Sum of p95 exceeds: 334ms
Sum of all benchmark exceeds: 343ms

@wenfix
Copy link
Author

wenfix commented May 21, 2025

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@metamaskbot
Copy link
Collaborator

Builds ready [93b1c7a]
UI Startup Metrics (1189 ± 59 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1189107514095912291284
load102691911865510721107
domContentLoaded101991511825610641100
domInteractive16135551524
firstPaint77491118838710451105
backgroundConnect84356826
firstReactRender21155472139
getState1252771826
initialActions001001
loadScripts78268193055832859
setupStore84314813
WebpackHomeuiStartup22871712271619724132611
load17731351220616818892046
domContentLoaded17631347220016418842012
domInteractive16125481441
firstPaint1706868777181314
backgroundConnect3611351483761
firstReactRender18144365119313352
getState185276272036
initialActions318147
loadScripts17591345219816318812009
setupStore4073107028282
FirefoxBrowserifyHomeuiStartup13031132182013813371577
load1159987167513412161439
domContentLoaded1159986167513412161438
domInteractive933817725101156
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect19135872031
firstReactRender24205662333
getState84627810
initialActions001001
loadScripts1142972166013211791414
setupStore74718611
WebpackHomeuiStartup15761340210814216831803
load13701157189513514851607
domContentLoaded13701157189413514841607
domInteractive79421461985127
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect22155262335
firstReactRender38285154145
getState11524023928
initialActions102111
loadScripts13511141187913614651578
setupStore85284812
cc: @HowardBraham
Benchmark value 26 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 2288 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1773 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1763 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 1759 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 40 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 2611 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2046 exceeds gate value 2030 for chrome webpack home p95 load
Benchmark value 2012 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 2009 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 282 exceeds gate value 65 for chrome webpack home p95 setupStore
Sum of mean exceeds: 285ms | Sum of p95 exceeds: 444ms
Sum of all benchmark exceeds: 729ms

Base automatically changed from jl/adopt-sip-26-post-merge-core-refactor to main May 21, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants