Skip to content

Conversation

MoMannn
Copy link

@MoMannn MoMannn commented Oct 7, 2025

Explanation

This PR adds RPC methods for upgrading Externally Owned Accounts (EOAs) to EIP-7702 delegator accounts. This functions are only callable by preinstalled snaps. It adds

wallet_upgradeAccount for upgrading the account
wallet_getAccountUpgradeStatus for checking if account is upgraded or not

References

Needed for: MetaMask/metamask-extension#36452

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

Note

Introduce @metamask/eip-7702-internal-rpc-middleware with wallet_upgradeAccount and wallet_getAccountUpgradeStatus, and integrate it into build, ownership, and team mappings.

  • New package: @metamask/eip-7702-internal-rpc-middleware
    • Implements internal JSON-RPC methods: wallet_upgradeAccount, wallet_getAccountUpgradeStatus.
    • Hook-based design with param/address validation utilities, constants, and typed results.
    • Added tests, README, changelog, license, build/typedoc configs, and exports.
  • Repo integration
    • Added to README.md package list and build references (tsconfig.build.json).
    • Updated teams.json and .github/CODEOWNERS ownership entries.
    • Workspace wiring in yarn.lock.
  • Dependency graph updates (README mermaid)
    • phishing_controller --> transaction_controller.
    • signature_controller --> gator_permissions_controller.

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

@MoMannn MoMannn requested a review from a team as a code owner October 7, 2025 11:56
cursor[bot]

This comment was marked as outdated.

jeffsmale90
jeffsmale90 previously approved these changes Oct 8, 2025
Copy link
Contributor

@jeffsmale90 jeffsmale90 left a comment

Choose a reason for hiding this comment

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

This looks great. A couple minor naming comments.

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Did a brief pass, will do a round 2 later.

One question I had: Is it necessary to add internal-rpc within the package name? We didn't do that for eip-5792-middleware I notice.

@jeffsmale90
Copy link
Contributor

@mcmire

Is it necessary to add internal-rpc within the package name? We didn't do that for eip-5792-middleware I notice.

The reasoning for this is that these RPCs aren't strictly EIP-7702, they're internal RPCs for supporting EIP-7702, not intended for consumption by third parties.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@MoMannn MoMannn self-assigned this Oct 10, 2025
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.

5 participants