@@ -10,6 +10,7 @@ uint256 constant MODULE_TYPE_EXECUTOR = 2;
10
10
uint256 constant MODULE_TYPE_FALLBACK = 3 ;
11
11
uint256 constant MODULE_TYPE_HOOK = 4 ;
12
12
13
+ /// @dev Minimal configuration interface for ERC-7579 modules
13
14
interface IERC7579Module {
14
15
/**
15
16
* @dev This function is called by the smart account during installation of the module
@@ -36,6 +37,11 @@ interface IERC7579Module {
36
37
function isModuleType (uint256 moduleTypeId ) external view returns (bool );
37
38
}
38
39
40
+ /**
41
+ * @dev ERC-7579 Validation module (type 1).
42
+ *
43
+ * A module that implements logic to validate user operations and signatures.
44
+ */
39
45
interface IERC7579Validator is IERC7579Module {
40
46
/**
41
47
* @dev Validates a UserOperation
@@ -63,6 +69,12 @@ interface IERC7579Validator is IERC7579Module {
63
69
) external view returns (bytes4 );
64
70
}
65
71
72
+ /**
73
+ * @dev ERC-7579 Hooks module (type 4).
74
+ *
75
+ * A module that implements logic to execute before and after the account executes a user operation,
76
+ * either individually or batched.
77
+ */
66
78
interface IERC7579Hook is IERC7579Module {
67
79
/**
68
80
* @dev Called by the smart account before execution
@@ -93,6 +105,11 @@ struct Execution {
93
105
bytes callData;
94
106
}
95
107
108
+ /**
109
+ * @dev ERC-7579 Execution.
110
+ *
111
+ * Accounts should implement this interface so that the Entrypoint and ERC-7579 modules can execute operations.
112
+ */
96
113
interface IERC7579Execution {
97
114
/**
98
115
* @dev Executes a transaction on behalf of the account.
@@ -119,6 +136,11 @@ interface IERC7579Execution {
119
136
) external returns (bytes [] memory returnData );
120
137
}
121
138
139
+ /**
140
+ * @dev ERC-7579 Account Config.
141
+ *
142
+ * Accounts should implement this interface to exposes information that identifies the account, supported modules and capabilities.
143
+ */
122
144
interface IERC7579AccountConfig {
123
145
/**
124
146
* @dev Returns the account id of the smart account
@@ -148,6 +170,11 @@ interface IERC7579AccountConfig {
148
170
function supportsModule (uint256 moduleTypeId ) external view returns (bool );
149
171
}
150
172
173
+ /**
174
+ * @dev ERC-7579 Module Config.
175
+ *
176
+ * Accounts should implement this interface to allows installing and uninstalling modules.
177
+ */
151
178
interface IERC7579ModuleConfig {
152
179
event ModuleInstalled (uint256 moduleTypeId , address module );
153
180
event ModuleUninstalled (uint256 moduleTypeId , address module );
0 commit comments