Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

feat!: add methods to support ERC-4337 accounts - #315

Merged
danroc merged 8 commits into
mainfrom
feature/erc-4337-support
Dec 11, 2023
Merged

feat!: add methods to support ERC-4337 accounts#315
danroc merged 8 commits into
mainfrom
feature/erc-4337-support

Conversation

@danroc

@danrocdanroc commented Dec 1, 2023

Copy link
Copy Markdown
Contributor

Description

Depends on:

This PR adds the following new methods available in the EthKeyring interface:

  • prepareUserOperation
  • patchUserOperation
  • signUserOperation

See the PR in the keyring-api for more details.

BREAKING: This PR replaces the Keyring interface from @metamask/utils with the EthKeyring interface from @metamask/keyring-api.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation for new or updated code as appropriate (note: this will usually be JSDoc)
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@danrocdanroc changed the title feat: add method to support UserOperationsfeat: add methods to support UserOperationsDec 1, 2023
@danrocdanroc changed the title feat: add methods to support UserOperationsfeat: add methods to support ERC-4337 accountsDec 1, 2023
@danrocdanroc added the team-accounts This should be handled by the Accounts Team label Dec 1, 2023
@danroc
danrocforce-pushed the feature/erc-4337-support branch from 27017d0 to d474ec5CompareDecember 1, 2023 22:41
@socket-security

Copy link
Copy Markdown

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

PackagesVersionNew capabilitiesTransitivesSizePublisher
eslint-plugin-import2.29.0...2.26.0None+3/-11.12 MBljharb

@socket-security

socket-securityBot commented Dec 1, 2023

Copy link
Copy Markdown

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: @ethereumjs/rlp@4.0.1, @ethereumjs/rlp@5.0.1, rlp@2.2.7

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

    @danroc

    danroc commented Dec 4, 2023

    Copy link
    Copy Markdown
    ContributorAuthor

    @SocketSecurity ignore @ethereumjs/rlp@4.0.1
    @SocketSecurity ignore @ethereumjs/rlp@5.0.1
    @SocketSecurity ignore rlp@2.2.7

    These are transient dependencies and the rlp script isn't used.

    @danroc
    danroc marked this pull request as ready for review December 8, 2023 10:14
    @danroc
    danroc requested a review from a team as a code ownerDecember 8, 2023 10:14

    @gantunesrgantunesr left a comment

    Copy link
    Copy Markdown
    Member

    Choose a reason for hiding this comment

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

    LGTM! Left some minor comments to be resolved before approving

    Comment threadpackage.json
    Comment threadsrc/KeyringController.ts
    Comment threadsrc/KeyringController.ts
    @danrocdanroc changed the title feat: add methods to support ERC-4337 accountsfeat!: add methods to support ERC-4337 accountsDec 8, 2023
    @danroc
    danroc merged commit 16d62dd into mainDec 11, 2023
    @danroc
    danroc deleted the feature/erc-4337-support branch December 11, 2023 09:22
    danroc added a commit that referenced this pull request Dec 13, 2023
    * feat: add UserOperation methods
    * build: ignore errors from Snap packages
    * fix: fix return type of `prepareUserOperation`
    * chore: enable lcov coverage
    * test: add missing unit tests
    * chore: update `yarn.lock`
    * chore: apply linter
    * chore: update @metamask/keyring-api version to 2.0.0
    mikesposito pushed a commit that referenced this pull request Jan 15, 2024
    * feat: add UserOperation methods
    * build: ignore errors from Snap packages
    * fix: fix return type of `prepareUserOperation`
    * chore: enable lcov coverage
    * test: add missing unit tests
    * chore: update `yarn.lock`
    * chore: apply linter
    * chore: update @metamask/keyring-api version to 2.0.0
    danroc added a commit to MetaMask/core that referenced this pull request Jan 22, 2024
    ## Description
    **Depends on:**
    - [x] <MetaMask/keyring-api#213>
    - [x] <MetaMask/KeyringController#315>
    - [x] <#3617>
    This PR adds the following new methods available in the `EthKeyring`
    interface:
    - `prepareUserOperation`
    - `patchUserOperation`
    - `signUserOperation`
    See the [PR](MetaMask/keyring-api#213) in the
    `keyring-api` for more details.
    ## Checklist
    - [ ] I've updated the test suite for new or updated code as appropriate
    - [ ] I've updated documentation for new or updated code as appropriate
    (note: this will usually be JSDoc)
    - [ ] I've highlighted breaking changes using the "BREAKING" category
    above as appropriate
    Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

    Labels

    team-accountsThis should be handled by the Accounts Team

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants

    @danroc@gantunesr