Skip to content

feat: add EIP-7702 revoke flow #30969

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

Merged
merged 10 commits into from
Mar 17, 2025
Merged

feat: add EIP-7702 revoke flow #30969

merged 10 commits into from
Mar 17, 2025

Conversation

matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Mar 13, 2025

Description

Add an EIP-7702 revoke flow to downgrade the user's EOA to a standard account.

Specifically:

  • Add getCode action and associated background API.
  • Support TransactionType.revokeDelegation in confirmations including custom title and description.
  • Add account type pill to AccountDetailsDisplay.
  • Add revoke button to AccountDetailsDisplay.
  • Add useIsDowngradeTransaction hook to identify if transaction will revoke delegation.
  • Add useEIP7702Account hook to identify if account is upgraded, and trigger revert transaction.

Open in GitHub Codespaces

Related issues

Manual testing steps

Screenshots/Recordings

Before

After

Account Details Confirmation

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.

@matthewwalsh0 matthewwalsh0 added the team-confirmations Push issues to confirmations team label Mar 13, 2025
@matthewwalsh0 matthewwalsh0 force-pushed the feat/downgrade-account branch from b940b4c to 1509d8a Compare March 13, 2025 13:43
@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review March 13, 2025 13:45
@matthewwalsh0 matthewwalsh0 requested review from a team as code owners March 13, 2025 13:45
@matthewwalsh0 matthewwalsh0 force-pushed the feat/downgrade-account branch from 4a38252 to 1118353 Compare March 14, 2025 10:42
@metamaskbot
Copy link
Collaborator

Builds ready [f40fb6b]
Page Load Metrics (2731 ± 1018 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint43511254258021221019
domContentLoaded14941017324211867896
load158311413273121201018
domInteractive24227736129
backgroundConnect401286297306147
firstReactRender22140613115
getState1160312413866
initialActions01000
loadScripts1096885918021647791
setupStore11358728842
uiStartup196213377393828601373
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 174 Bytes (0.00%)
  • ui: 4.38 KiB (0.06%)
  • common: 457 Bytes (0.00%)

@matthewwalsh0 matthewwalsh0 enabled auto-merge March 17, 2025 09:42
@matthewwalsh0 matthewwalsh0 added this pull request to the merge queue Mar 17, 2025
Merged via the queue into main with commit 8d2d603 Mar 17, 2025
76 checks passed
@matthewwalsh0 matthewwalsh0 deleted the feat/downgrade-account branch March 17, 2025 19:05
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2025
@metamaskbot metamaskbot added the release-12.16.0 Issue or pull request that will be included in release 12.16.0 label Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.16.0 Issue or pull request that will be included in release 12.16.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants