Skip to content
This repository was archived by the owner on Sep 11, 2026. It is now read-only.

feat: add optional signEip7702Authorization method to Keyring type - #231

Merged
ccharly merged 4 commits into
mainfrom
feat/7702-sign-authorization
Feb 11, 2025
Merged

ccharly merged 4 commits into
mainfrom
feat/7702-sign-authorization

Conversation

@jeffsmale90

@jeffsmale90 jeffsmale90 commented Feb 3, 2025 •

Copy link
Copy Markdown
Contributor

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 adds an optional signEip7702Authorization method to the Keyring type which is implemented on @metamask/eth-simple-keyring and @metamask/eth-hd-keyring in MetaMask/accounts#182.

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

@jeffsmale90
jeffsmale90 marked this pull request as draft February 10, 2025 21:08
@jeffsmale90
jeffsmale90 force-pushed the feat/7702-sign-authorization branch from 8b57894 to 16e4553 Compare February 10, 2025 21:26
@jeffsmale90
jeffsmale90 changed the base branch from main to revert/keyring_generic February 10, 2025 21:27
@jeffsmale90
jeffsmale90 marked this pull request as ready for review February 10, 2025 21:30
@ccharly ccharly changed the title Add optional signEIP7702Authorization method to Keyring type feat: add optional signEip7702Authorization method to Keyring type Feb 11, 2025
Comment thread src/keyring.ts
*/
signEip7702Authorization?(
address: Hex,
authorization: [chainId: number, contractAddress: Hex, nonce: number],

@ccharly ccharly Feb 11, 2025 •

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.

We could have used @metamask/eth-sig-util here too, but that would pull a new dep and since we plan to move this type (Keyring) to accounts/keyring-utils, I think that's fine that we keep it as is.

ccharly
ccharly previously approved these changes Feb 11, 2025
ccharly pushed a commit that referenced this pull request Feb 11, 2025
Reverts the changes introduced by
#232 in order to allow
#231 to be released as a minor
update on the current published version without requiring a major
version bump.

This change will be re-introduced after release.
Base automatically changed from revert/keyring_generic to main February 11, 2025 10:32
@ccharly
ccharly dismissed their stale review February 11, 2025 10:32

The base branch was changed.

@ccharly
ccharly merged commit daa2270 into main Feb 11, 2025
@ccharly
ccharly deleted the feat/7702-sign-authorization branch February 11, 2025 11:22
pull Bot pushed a commit to Reality2byte/core that referenced this pull request Sep 10, 2026
Reverts the changes introduced by
MetaMask/utils#232 in order to allow
MetaMask/utils#231 to be released as a minor
update on the current published version without requiring a major
version bump.

This change will be re-introduced after release.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants