Skip to content

Commit

Permalink
feat: add 7780 extension
Browse files Browse the repository at this point in the history
  • Loading branch information
kopy-kat committed Nov 9, 2024
1 parent 8b69620 commit ea7b984
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions pages/extensions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Extensions are a way to extend the behavior of ERC-7579. Extensions can be used
## Current extensions

- [ERC-7484: Registry Extension for ERC-7579](/extensions/erc7484)
- [ERC-7780: Validation Module Extension for ERC-7579](/extensions/erc7780)
1 change: 1 addition & 0 deletions pages/extensions/_meta.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const meta = {
erc7484: "ERC-7484",
erc7780: "ERC-7780",
};

export default meta;
23 changes: 23 additions & 0 deletions pages/extensions/erc7780.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## What is ERC-7780?

ERC-7780 introduces three new module types: signers, policies and stateless validators. Policy modules can be used to check what a UserOperation or action is trying to achieve and determine if this is allowed. Signer modules can be used to validate signatures on provided hashes. Stateless validators are modules that are used to both validate signatures and compare them to a calldata-provided data blob which could, for example, include owners to check signatures against.

## Why ERC-7780?

We do not expect every account to implement all of these module types since they are optional. However, these policies bring features that are currently not possible in a composable way in ERC-7579.

Policy and signer modules allow an account to make direct use of such a permissioning logic rather than relying on external modules to handle this. This has the upside of lower gas cost but the downside of less flexibility for users and developers that use the account.

Stateless validators enable further composability around signature validation logic. In many cases, it does not make sense to re-write signature validation for new validators, but instead to use the existing ones. However, this is usually not possible since the validators rely on a stored configuration indexed by the `msg.sender`, which is expected to be an account. Stateless validators solve this problem by not relying on state to compare signature verficiation against, but instead to compare it against a calldata-provided argument.

## The standard

This standard introduces three new module types on top of the existing modules introduced by ERC-7579:

- Policy (type id: 5)
- Signer (type id: 6)
- Stateless Validator (type id: 7)

## Further reading

- [ERC-7780: Validation Module Extension for ERC-7579](https://github.com/ethereum/ERCs/pull/666/files)

0 comments on commit ea7b984

Please sign in to comment.