GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — delegation-framework/documents/DeleGatorCore.md at main · MetaMask/delegation-framework

Expand file tree

/

DeleGatorCore.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
28 lines (17 loc) · 2.31 KB
/

DeleGatorCore.md

Copy path

File metadata and controls

28 lines (17 loc) · 2.31 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

DeleGator Core

Defines the interface needed for a DelegationManager to invoke an Execution on behalf of the delegator.

This contract does not implement ERC7579 see ERC-7579 Details.

MetaMask's DeleGatorCore

Contains the logic needed for an ERC4337 SCA with delegation functionality. We provide two different "DeleGator implementations" for use: MultiSigDeleGator and HybridDeleGator. The distinction between the two is the signing mechanisms.

The DeleGatorCore implements the UUPS proxy, which is inherited by the implementations. There are two methods available to upgrade your account to a different implementation.

  • upgradeToAndCall - This method upgrades the account to a different implementation, and by default will clear the storage associated with the account's signer configuration.
  • upgradeToAndCallAndRetainStorage - This method upgrades the account to a different implementation and retains the storage associated with the account's signer configuration.

Signing a UserOperation

Contracts that extend the DeleGatorCore contract MUST use EIP712 typed data signatures for User Operations to provide legibility when signing. The typed data to be signed is a PackedUserOperation.

Rules

  • A DeleGator Implementation MUST use namespaced storage for ALL variables if it is extending MetaMask's DeleGatorCore.
  • DeleGator Implementations MUST inherit from DeleGatorCore as the "most base-like" (furthest right, more info)
  • DeleGator Implementations MUST implement ERC-1271 Standard Signature Validation Method for Contracts
  • DeleGator Implementations SHOULD return a non ERC-1271 magic value when encountering an invalid signature
  • DeleGator Implementations SHOULD implement a function to clear the storage related to the account's signer configuration, inside the function _clearDeleGatorStorage.

NOTE: If a DeleGator Implementation implements reinitialize it SHOULD gate the method to onlySelf to ensure no one can unexpectedly take over the DeleGator.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.