Skip to content

feat: add methods to support ERC-4337 accounts - #3602

Merged
danroc merged 16 commits into
mainfrom
feature/erc-4337-support
Jan 22, 2024
Merged

feat: add methods to support ERC-4337 accounts#3602
danroc merged 16 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.

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

@danroc
danrocforce-pushed the feature/erc-4337-support branch 2 times, most recently from 0d6fa8d to c36fc6bCompareDecember 8, 2023 10:18
@socket-security

socket-securityBot commented Dec 8, 2023

Copy link
Copy Markdown

@danroc
danrocforce-pushed the feature/erc-4337-support branch from 6b56615 to 0442d7dCompareJanuary 9, 2024 14:18
@montelaidev

Copy link
Copy Markdown
Contributor

@metamaskbot publish-preview

@github-actions

Copy link
Copy Markdown
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
"@metamask-previews/accounts-controller": "7.0.1-preview.228ccaca",
"@metamask-previews/address-book-controller": "3.1.6-preview.228ccaca",
"@metamask-previews/announcement-controller": "5.0.1-preview.228ccaca",
"@metamask-previews/approval-controller": "5.1.1-preview.228ccaca",
"@metamask-previews/assets-controllers": "23.1.0-preview.228ccaca",
"@metamask-previews/base-controller": "4.0.1-preview.228ccaca",
"@metamask-previews/build-utils": "1.0.1-preview.228ccaca",
"@metamask-previews/composable-controller": "5.0.0-preview.228ccaca",
"@metamask-previews/controller-utils": "8.0.1-preview.228ccaca",
"@metamask-previews/ens-controller": "8.0.0-preview.228ccaca",
"@metamask-previews/eth-json-rpc-provider": "2.3.1-preview.228ccaca",
"@metamask-previews/gas-fee-controller": "12.0.0-preview.228ccaca",
"@metamask-previews/json-rpc-engine": "7.3.1-preview.228ccaca",
"@metamask-previews/json-rpc-middleware-stream": "6.0.1-preview.228ccaca",
"@metamask-previews/keyring-controller": "11.0.0-preview.228ccaca",
"@metamask-previews/logging-controller": "2.0.1-preview.228ccaca",
"@metamask-previews/message-manager": "7.3.7-preview.228ccaca",
"@metamask-previews/name-controller": "4.1.0-preview.228ccaca",
"@metamask-previews/network-controller": "17.1.0-preview.228ccaca",
"@metamask-previews/notification-controller": "4.0.1-preview.228ccaca",
"@metamask-previews/permission-controller": "7.1.0-preview.228ccaca",
"@metamask-previews/permission-log-controller": "0.0.0-preview.228ccaca",
"@metamask-previews/phishing-controller": "8.0.1-preview.228ccaca",
"@metamask-previews/polling-controller": "4.0.0-preview.228ccaca",
"@metamask-previews/preferences-controller": "5.0.1-preview.228ccaca",
"@metamask-previews/queued-request-controller": "0.3.0-preview.228ccaca",
"@metamask-previews/rate-limit-controller": "4.0.1-preview.228ccaca",
"@metamask-previews/selected-network-controller": "6.0.0-preview.228ccaca",
"@metamask-previews/signature-controller": "9.0.0-preview.228ccaca",
"@metamask-previews/transaction-controller": "19.0.1-preview.228ccaca",
"@metamask-previews/user-operation-controller": "0.0.0-preview.228ccaca"
}

@danroc
danrocforce-pushed the feature/erc-4337-support branch from 228ccac to b7789bcCompareJanuary 22, 2024 10:13
@danroc
danroc marked this pull request as ready for review January 22, 2024 10:14
@danroc
danroc requested a review from a team as a code ownerJanuary 22, 2024 10:14
@socket-security

socket-securityBot commented Jan 22, 2024

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: npm/@metamask/obs-store@9.0.0

View full report↗︎

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 ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

    @danrocdanroc self-assigned this Jan 22, 2024
    @danroc

    Copy link
    Copy Markdown
    ContributorAuthor

    @SocketSecurity ignore npm/@metamask/obs-store@9.0.0

    @montelaidevmontelaidev left a comment

    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.

    LGTM

    @danroc
    danroc merged commit 8a79dc5 into mainJan 22, 2024
    @danroc
    danroc deleted the feature/erc-4337-support branch January 22, 2024 10:38
    Gudahtt added a commit that referenced this pull request Jan 22, 2024
    …roller-in-sync-with-keyrings
    * origin/main:
    chore(deps): bump @metamask/eth-keyring-controller from 17.0.0 to 17.0.1 (#3805)
    fix: custody keyring name (#3803)
    chore: update dependencies for `@metamask/accounts-controller` (#3747)
    fix: quick succession of submit password causing Accounts Controller state to be cleared (#3802)
    feat: add methods to support ERC-4337 accounts (#3602)
    feat: add getAccount action to AccountsController (#1892)
    "@lavamoat/allow-scripts": "^2.3.1",
    "@metamask/auto-changelog": "^3.4.4",
    "@metamask/eth-sig-util": "^7.0.1",
    "@metamask/preferences-controller": "^6.0.0",

    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.

    Hey @danroc, why was this moved from dev dependenices to dependencies? I'm asking because this conflicts with one of my PRs, where this is being removed as a dependency completely.

    Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    3 participants

    @danroc@montelaidev@Gudahtt