-
-
Notifications
You must be signed in to change notification settings - Fork 250
Feat/eip 7702 internal rpc middleware #6789
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
base: main
Are you sure you want to change the base?
Conversation
…b.com/MetaMask/core into feat/eip-7702-internal-rpc-middleware
There was a problem hiding this 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.
packages/eip-7702-internal-rpc-middleware/src/hooks/upgradeAccount.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
packages/eip-7702-internal-rpc-middleware/src/methods/wallet_getAccountUpgradeStatus.test.ts
Outdated
Show resolved
Hide resolved
packages/eip-7702-internal-rpc-middleware/src/methods/wallet_getAccountUpgradeStatus.test.ts
Outdated
Show resolved
Hide resolved
packages/eip-7702-internal-rpc-middleware/src/methods/wallet_getAccountUpgradeStatus.test.ts
Outdated
Show resolved
Hide resolved
packages/eip-7702-internal-rpc-middleware/src/hooks/getAccountUpgradeStatus.ts
Outdated
Show resolved
Hide resolved
packages/eip-7702-internal-rpc-middleware/src/hooks/getAccountUpgradeStatus.ts
Outdated
Show resolved
Hide resolved
packages/eip-7702-internal-rpc-middleware/src/hooks/getAccountUpgradeStatus.ts
Outdated
Show resolved
Hide resolved
packages/eip-7702-internal-rpc-middleware/src/hooks/upgradeAccount.ts
Outdated
Show resolved
Hide resolved
packages/eip-7702-internal-rpc-middleware/src/hooks/upgradeAccount.ts
Outdated
Show resolved
Hide resolved
packages/eip-7702-internal-rpc-middleware/src/hooks/upgradeAccount.ts
Outdated
Show resolved
Hide resolved
packages/eip-7702-internal-rpc-middleware/src/methods/wallet_getAccountUpgradeStatus.ts
Outdated
Show resolved
Hide resolved
packages/eip-7702-internal-rpc-middleware/src/methods/wallet_upgradeAccount.ts
Outdated
Show resolved
Hide resolved
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. |
…b.com/MetaMask/core into feat/eip-7702-internal-rpc-middleware
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
Note
Introduce
@metamask/eip-7702-internal-rpc-middleware
withwallet_upgradeAccount
andwallet_getAccountUpgradeStatus
, and integrate it into build, ownership, and team mappings.@metamask/eip-7702-internal-rpc-middleware
wallet_upgradeAccount
,wallet_getAccountUpgradeStatus
.README.md
package list and build references (tsconfig.build.json
).teams.json
and.github/CODEOWNERS
ownership entries.yarn.lock
.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.