Skip to content
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

Add signEIP7702Authorization to KeyringController #5301

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jeffsmale90
Copy link

@jeffsmale90 jeffsmale90 commented Feb 7, 2025

EIP-7702 defines a new struct Authorization which represents authority to set a pointer to a contract address at an EOA - effectively making the EOA perform as a smart contract.

This change integrates the new signEip7702Authorization method added to eth- simple and hd keyrings in MetaMask/accounts#182. This is exposed via KeyringController.signEip7702Authorization as well as the message handler KeyringController:SignEip7702Authorization.

See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7702.md for details

@jeffsmale90 jeffsmale90 changed the title Add signEIP7702Authorization to KeyringController [draft] Add signEIP7702Authorization to KeyringController Feb 7, 2025
@jeffsmale90 jeffsmale90 force-pushed the feat/7702-sign-authorization branch from e225fe3 to 082e817 Compare February 12, 2025 00:53
@jeffsmale90 jeffsmale90 force-pushed the feat/7702-sign-authorization branch from 082e817 to 47935e0 Compare February 12, 2025 01:09
Copy link

socket-security bot commented Feb 12, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 24.1 kB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 101 kB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 788 kB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] Transitive: environment +1 2.97 MB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 52.3 kB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 63.7 kB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 160 kB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 31.8 kB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 49.3 kB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 11.8 kB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 876 kB nicolo-ribaudo
npm/@babel/[email protected] environment 0 20.3 kB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 1.89 MB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] None 0 70.4 kB nicolo-ribaudo
npm/@babel/[email protected] 🔁 npm/@babel/[email protected] Transitive: environment +1 770 kB nicolo-ribaudo
npm/@metamask/[email protected] None 0 140 kB metamaskbot
npm/@metamask/[email protected] None 0 78.4 kB metamaskbot
npm/[email protected] None 0 538 kB marijn
npm/[email protected] None 0 9.37 kB sindresorhus
npm/[email protected] 🔁 npm/[email protected] None 0 63 kB ai
npm/[email protected] 🔁 npm/[email protected] None 0 2.1 MB caniuse-lite
npm/[email protected] environment 0 26.9 kB sindresorhus
npm/[email protected] None 0 27 kB qix
npm/[email protected] None 0 9.36 kB dfcreative
npm/[email protected] 🔁 npm/[email protected] None 0 146 kB kilianvalkhof
npm/[email protected] 🔁 npm/[email protected] None 0 11.6 kB lukeed
npm/[email protected] None 0 2.69 kB jbnicolai
npm/[email protected] None 0 3.13 kB sindresorhus
npm/[email protected] 🔁 npm/[email protected] None 0 32 kB mathias
npm/[email protected] 🔁 npm/[email protected] None 0 35.7 kB chicoxyzzy
npm/[email protected] environment 0 6.63 kB sindresorhus
npm/[email protected] None 0 3.5 kB sindresorhus
npm/[email protected] 🔁 npm/[email protected] None 0 14.8 kB ai

View full report↗︎

Comment on lines -14 to +15
import SimpleKeyring from '@metamask/eth-simple-keyring/dist/simple-keyring';
import SimpleKeyring from '@metamask/eth-simple-keyring';
Copy link
Author

Choose a reason for hiding this comment

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

https://github.com/MetaMask/accounts/releases/tag/v12.0.0

@metamask/eth-simple-keyring 8.0.0
BREAKING: Add ESM build (MetaMask/accounts#40)

  • It's no longer possible to import files from ./dist directly.

@jeffsmale90 jeffsmale90 changed the title [draft] Add signEIP7702Authorization to KeyringController Add signEIP7702Authorization to KeyringController Feb 12, 2025
@jeffsmale90 jeffsmale90 marked this pull request as ready for review February 12, 2025 01:43
@jeffsmale90 jeffsmale90 requested review from a team as code owners February 12, 2025 01:43
@jeffsmale90 jeffsmale90 requested a review from a team as a code owner February 12, 2025 06:18
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.

1 participant