Skip to content

refactor: convert app/scripts/lib/ens-ipfs/contracts/resolver.js to TypeScript#41328

Merged
HowardBraham merged 4 commits into
mainfrom
copilot/convert-resolver-js-to-typescript
Apr 2, 2026
Merged

refactor: convert app/scripts/lib/ens-ipfs/contracts/resolver.js to TypeScript#41328
HowardBraham merged 4 commits into
mainfrom
copilot/convert-resolver-js-to-typescript

Conversation

Copilot AI commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

[skip-e2e]
Part of the ongoing JS→TS migration. Converts the ENS resolver ABI contract file to TypeScript and removes it from the migration dashboard tracking list.

Changes

  • Renamed resolver.jsresolver.ts with no functional changes
  • Added as const assertion to the ABI array for literal type inference and immutability
  • Removed "app/scripts/lib/ens-ipfs/contracts/resolver.js" from development/ts-migration-dashboard/files-to-convert.json
// Before (resolver.js)
const abi = [ ... ];
export default abi;

// After (resolver.ts)
const abi = [ ... ] as const;
export default abi;

The default export is preserved to maintain compatibility with the existing import resolverAbi from './contracts/resolver' in ens-ipfs/resolver.js.


⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.


Note

Low Risk
Low risk refactor of a static ABI export plus a new unit test; main risk is accidental ABI shape drift impacting ens-ipfs/resolver.js contract calls.

Overview
Refactors the ENS resolver contract ABI export by replacing contracts/resolver.js with a TypeScript contracts/resolver.ts that builds the same ABI via small typed helpers and exports it as const.

Adds resolver.test.ts to assert the ABI is non-empty and includes key resolver functions, and removes the old JS file from development/ts-migration-dashboard/files-to-convert.json.

Written by Cursor Bugbot for commit 0f068f7. This will update automatically on new commits. Configure here.

Copilot AI changed the title [WIP] Convert resolver.js to TypeScript and update conversion list chore: convert app/scripts/lib/ens-ipfs/contracts/resolver.js to TypeScript Mar 27, 2026
Copilot AI requested a review from DDDDDanica March 27, 2026 21:19
@DDDDDanica DDDDDanica changed the title chore: convert app/scripts/lib/ens-ipfs/contracts/resolver.js to TypeScript refactor: convert app/scripts/lib/ens-ipfs/contracts/resolver.js to TypeScript Mar 27, 2026
@DDDDDanica DDDDDanica added team-extension-platform Extension Platform team and removed skip-e2e Skip E2E test jobs labels Mar 27, 2026
@metamaskbotv2

metamaskbotv2 Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor
Builds ready [fabc2d2]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account72229511463509381146
total72229511463509381146
Confirm Txconfirm_tx605660566056060566056
total605660566056060566056
Bridge User Actionsbridge_load_page2652642661266266
bridge_load_asset_picker24617230249298302
bridge_search_token77473881829775818
total1348132913812313811381
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Chrome Browserify Startup Standard HomeuiStartup14891216190210615411647
load1223100615869212651356
domContentLoaded121599915789112571342
domInteractive261692112746
firstPaint190661307136244302
backgroundConnect21319125613218243
firstReactRender21154042330
initialActions105123
loadScripts101780813789010551143
setupStore1265261421
numNetworkReqs35316073749
Chrome Browserify Startup Power User HomeuiStartup56462121160262991585213143
load12881142195311713401482
domContentLoaded12621105191910413081431
domInteractive3321147153552
firstPaint256941938248294359
backgroundConnect2599304134682971307710273
firstReactRender26184753037
initialActions109124
loadScripts105891516489710991215
setupStore1665371828
numNetworkReqs2829642879333370
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2202192221221222
srpButtonToSrpForm93939409494
confirmSrpToPwForm22212202222
pwFormToMetricsScreen15151501515
metricsToWalletReadyScreen16151601616
doneButtonToHomeScreen53452355915532559
openAccountMenuToAccountListLoaded2924291329441329262944
total3822380738431638393843
Onboarding New WalletcreateWalletToSocialScreen2182182190218219
srpButtonToPwForm1071061091108109
createPwToRecoveryScreen888088
skipBackupToMetricsScreen39374013940
agreeButtonToOnboardingSuccess16151601616
doneButtonToAssetList592482793128694793
total984866119012910801190
Asset DetailsassetClickToPriceChart827098108398
total827098108398
Solana Asset DetailsassetClickToPriceChart58516356163
total58516356163
Import Srp HomeloginToHomeScreen2013195720593920372059
openAccountMenuAfterLogin55466166161
homeAfterImportWithNewWallet34130343957319439
total25162320294224924232942
Send TransactionsopenSendPageFromHome31293533235
selectTokenToSendFormLoaded33264683746
reviewTransactionToConfirmationPage1087810132320712381323
total1158904138119613001381
SwapopenSwapPageFromHome94831058101105
fetchAndDisplaySwapQuotes269326862699526962699
total278727772799927912799
🌐 Dapp Page Load Benchmarks

Current Commit: fabc2d2 | Date: 3/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±41ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 723ms (±39ms) 🟢 | historical mean value: 729ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 85ms (±10ms) 🟢 | historical mean value: 87ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 41ms 1.00s 1.31s 1.05s 1.31s
domContentLoaded 723ms 39ms 700ms 990ms 739ms 990ms
firstPaint 85ms 10ms 68ms 164ms 96ms 164ms
firstContentfulPaint 85ms 10ms 68ms 164ms 96ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

@github-actions

Copy link
Copy Markdown
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.

@DDDDDanica DDDDDanica marked this pull request as ready for review March 30, 2026 14:54
@github-actions github-actions Bot added size-M and removed size-XS labels Mar 30, 2026
@metamaskbotv2

metamaskbotv2 Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor
Builds ready [3d01c6f]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account940548134928011161349
total940548134928011161349
Confirm Txconfirm_tx6057604260831660576083
total6057604260831660576083
Bridge User Actionsbridge_load_page2682622724272272
bridge_load_asset_picker30024033937327339
bridge_search_token8248158306830830
total1396128714957614291495
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Startup Standard HomeuiStartup1490129617799215361646
load1228102514809012701383
domContentLoaded1220101914758912621363
domInteractive2616104132651
firstPaint222771291203262332
backgroundConnect20718724413213233
firstReactRender20144962033
initialActions107113
loadScripts102983112818610651171
setupStore1373561524
numNetworkReqs35315873851
Startup Power User HomeuiStartup4295196813421190053186814
load12681112202214212891534
domContentLoaded12481106194112712661484
domInteractive3820253353591
firstPaint298851420235302551
backgroundConnect15482779692161625333979
firstReactRender24175462533
initialActions106113
loadScripts1043908168211910621264
setupStore1565371826
numNetworkReqs1186029239124203
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2222192242224224
srpButtonToSrpForm103981095109109
confirmSrpToPwForm25242612526
pwFormToMetricsScreen17161811818
metricsToWalletReadyScreen18181911919
doneButtonToHomeScreen103910361044310441044
openAccountMenuToAccountListLoaded272327202724227242724
total4149411041892841504189
Onboarding New WalletcreateWalletToSocialScreen2192182232218223
srpButtonToPwForm1101071142111114
createPwToRecoveryScreen888088
skipBackupToMetricsScreen38374014040
agreeButtonToOnboardingSuccess16161601616
doneButtonToAssetList1138103812297912111229
total1536144016177316041617
Asset DetailsassetClickToPriceChart765888128788
total765888128788
Solana Asset DetailsassetClickToPriceChart60596216062
total60596216062
Import Srp HomeloginToHomeScreen2191217422212122212221
openAccountMenuAfterLogin45424934549
homeAfterImportWithNewWallet8963891689892989868989
total1115710997113881391122111388
Send TransactionsopenSendPageFromHome28203763037
selectTokenToSendFormLoaded26233022630
reviewTransactionToConfirmationPage86485189920852899
total93090095924949959
SwapopenSwapPageFromHome453468135168
fetchAndDisplaySwapQuotes269226812704927012704
total2727271427371027362737

Dapp page load benchmarks: data not available.

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 5.72 KiB (0.08%)
  • ui: -22.57 KiB (-0.27%)
  • common: 3.39 KiB (0.03%)

@DDDDDanica DDDDDanica enabled auto-merge March 30, 2026 17:12
n3ps
n3ps previously approved these changes Mar 30, 2026
itsyoboieltr
itsyoboieltr previously approved these changes Mar 30, 2026
@DDDDDanica DDDDDanica added this pull request to the merge queue Mar 30, 2026
@HowardBraham HowardBraham removed this pull request from the merge queue due to a manual request Mar 30, 2026
@DDDDDanica DDDDDanica added this pull request to the merge queue Mar 31, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Mar 31, 2026
@DDDDDanica DDDDDanica dismissed stale reviews from itsyoboieltr and n3ps via 0f068f7 March 31, 2026 15:07
@sonarqubecloud

Copy link
Copy Markdown

@metamaskbotv2

metamaskbotv2 Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor
Builds ready [0f068f7]
⚡ Performance Benchmarks (Total: 🟢 15 pass · 🟡 2 warn · 🔴 0 fail)

Baseline (latest main): dbaaa4f | Date: 8/13/58216 | Pipeline: 23804552542 | Baseline logs

Interaction Benchmarks
Benchmarkchrome-browserify
loadNewAccount
🟡 load_new_account
[Show logs]
confirmTx🟢 [Show logs]
bridgeUserActions🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: +13%
  • loadNewAccount/total: +13%
  • bridgeUserActions/bridge_load_asset_picker: +11%
  • bridgeUserActions/bridge_search_token: -11%
Startup Benchmarks

⚠️ Missing data: firefox/browserify/startupPowerUserHome

Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]
startupPowerUserHome
🟡 uiStartup
[Show logs]
🟢 [Show logs]🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/initialActions: -29%
  • startupPowerUserHome/backgroundConnect: +19%
  • startupPowerUserHome/numNetworkReqs: +24%
  • startupStandardHome/firstPaint: +14%
  • startupPowerUserHome/backgroundConnect: +26%
  • startupPowerUserHome/numNetworkReqs: -55%
  • startupStandardHome/domInteractive: +14%
  • startupStandardHome/initialActions: -17%
  • startupStandardHome/initialActions: -38%
  • startupPowerUserHome/setupStore: +28%
User Journey Benchmarks
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟢 [Show logs]
solanaAssetDetails🟢 [Show logs]
importSrpHome🟢 [Show logs]
sendTransactions🟢 [Show logs]
swap🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/doneButtonToHomeScreen: -76%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +29%
  • onboardingImportWallet/total: -39%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -14%
  • onboardingNewWallet/doneButtonToAssetList: -42%
  • onboardingNewWallet/total: -36%
  • assetDetails/assetClickToPriceChart: -33%
  • assetDetails/total: -33%
  • solanaAssetDetails/assetClickToPriceChart: -54%
  • solanaAssetDetails/total: -54%
  • importSrpHome/loginToHomeScreen: +18%
  • importSrpHome/homeAfterImportWithNewWallet: -34%
  • importSrpHome/total: -28%
  • swap/openSwapPageFromHome: -88%
  • swap/fetchAndDisplaySwapQuotes: +25%

Dapp page load benchmarks: data not available.

Bundle size diffs [🚀 Bundle size reduced!]
  • background: -1.3 KiB (-0.02%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

@gauthierpetetin gauthierpetetin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I left a non-blocking comment. LGTM


expect(functionNames).toContain('contenthash');
expect(functionNames).toContain('text');
expect(functionNames).toContain('addr');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Given that app/scripts/lib/ens-ipfs/resolver.js calls supportsInterface and content functions, maybe we can test these here as well, by adding:

expect(functionNames).toContain('supportsInterface');
expect(functionNames).toContain('content');

@metamaskbotv2

metamaskbotv2 Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
Builds ready [0f068f7]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 2 warn · 🔴 0 fail)

Baseline (latest main): d304b15 | Date: 1/31/58219 | Pipeline: 23804552542 | Baseline logs

Interaction Benchmarks
Benchmarkchrome-browserify
loadNewAccount
🟡 load_new_account
[Show logs]
confirmTx🟢 [Show logs]
bridgeUserActions🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: +17%
  • loadNewAccount/total: +17%
  • bridgeUserActions/bridge_search_token: -11%
Startup Benchmarks
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]
startupPowerUserHome
🟡 uiStartup
[Show logs]
🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/firstPaint: +14%
  • startupStandardHome/firstReactRender: -15%
  • startupStandardHome/initialActions: -17%
  • startupPowerUserHome/backgroundConnect: +29%
  • startupPowerUserHome/numNetworkReqs: +42%
  • startupStandardHome/firstReactRender: -11%
  • startupPowerUserHome/backgroundConnect: +29%
  • startupPowerUserHome/numNetworkReqs: -52%
  • startupStandardHome/domInteractive: +17%
  • startupStandardHome/firstReactRender: -11%
  • startupPowerUserHome/domInteractive: -17%
  • startupPowerUserHome/backgroundConnect: +22%
  • startupPowerUserHome/setupStore: +24%
  • startupStandardHome/firstReactRender: -15%
  • startupStandardHome/initialActions: -38%
  • startupPowerUserHome/setupStore: +17%
User Journey Benchmarks
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟢 [Show logs]
solanaAssetDetails🟢 [Show logs]
importSrpHome🟢 [Show logs]
sendTransactions🟢 [Show logs]
swap🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/metricsToWalletReadyScreen: -13%
  • onboardingImportWallet/doneButtonToHomeScreen: -75%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +63%
  • onboardingImportWallet/total: -37%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -23%
  • onboardingNewWallet/doneButtonToAssetList: -38%
  • onboardingNewWallet/total: -32%
  • assetDetails/assetClickToPriceChart: -13%
  • assetDetails/total: -13%
  • solanaAssetDetails/assetClickToPriceChart: -49%
  • solanaAssetDetails/total: -49%
  • importSrpHome/loginToHomeScreen: +16%
  • importSrpHome/openAccountMenuAfterLogin: -42%
  • importSrpHome/homeAfterImportWithNewWallet: -41%
  • importSrpHome/total: -35%
  • swap/openSwapPageFromHome: -85%
  • swap/fetchAndDisplaySwapQuotes: +29%
  • swap/total: +14%

Dapp page load benchmarks: data not available.

Bundle size diffs [🚀 Bundle size reduced!]
  • background: -1.3 KiB (-0.02%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

@DDDDDanica DDDDDanica enabled auto-merge April 1, 2026 22:21
@DDDDDanica DDDDDanica added this pull request to the merge queue Apr 2, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 2, 2026
@HowardBraham HowardBraham added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit b82d5b2 Apr 2, 2026
392 of 394 checks passed
@HowardBraham HowardBraham deleted the copilot/convert-resolver-js-to-typescript branch April 2, 2026 08:24
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 2, 2026
@metamaskbot metamaskbot added the release-13.26.0 Issue or pull request that will be included in release 13.26.0 label Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants