-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing docstrings #5311
base: master
Are you sure you want to change the base?
Add missing docstrings #5311
Changes from all commits
c233ed9
419b7d2
7d6c3d6
8368fb2
3803803
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -10,6 +10,7 @@ uint256 constant MODULE_TYPE_EXECUTOR = 2; | |||||||||||||
uint256 constant MODULE_TYPE_FALLBACK = 3; | ||||||||||||||
uint256 constant MODULE_TYPE_HOOK = 4; | ||||||||||||||
|
||||||||||||||
/// @dev Minimal configuration interface for ERC-7579 modules | ||||||||||||||
interface IERC7579Module { | ||||||||||||||
/** | ||||||||||||||
* @dev This function is called by the smart account during installation of the module | ||||||||||||||
|
@@ -36,6 +37,11 @@ interface IERC7579Module { | |||||||||||||
function isModuleType(uint256 moduleTypeId) external view returns (bool); | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
/** | ||||||||||||||
* @dev ERC-7579 Validator. | ||||||||||||||
* | ||||||||||||||
* A module that implements logic to validate user operations and signatures. | ||||||||||||||
*/ | ||||||||||||||
interface IERC7579Validator is IERC7579Module { | ||||||||||||||
/** | ||||||||||||||
* @dev Validates a UserOperation | ||||||||||||||
|
@@ -63,6 +69,12 @@ interface IERC7579Validator is IERC7579Module { | |||||||||||||
) external view returns (bytes4); | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
/** | ||||||||||||||
* @dev ERC-7579 Executor. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is IERC7579Hook. Hooks module are type id 4 and Execution modules are type id 2. So I'm guessing there is a confusion here
Suggested change
|
||||||||||||||
* | ||||||||||||||
* A module that implements logic to execute before and after the account executes a user operation, | ||||||||||||||
* either individually or batched. | ||||||||||||||
*/ | ||||||||||||||
interface IERC7579Hook is IERC7579Module { | ||||||||||||||
/** | ||||||||||||||
* @dev Called by the smart account before execution | ||||||||||||||
|
@@ -93,6 +105,11 @@ struct Execution { | |||||||||||||
bytes callData; | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
/** | ||||||||||||||
* @dev Smart Account execution according to ERC-7579. | ||||||||||||||
* | ||||||||||||||
* To implement ERC-7579 modules, smart accounts must implement this interface. | ||||||||||||||
Comment on lines
+109
to
+111
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
*/ | ||||||||||||||
interface IERC7579Execution { | ||||||||||||||
/** | ||||||||||||||
* @dev Executes a transaction on behalf of the account. | ||||||||||||||
|
@@ -119,6 +136,11 @@ interface IERC7579Execution { | |||||||||||||
) external returns (bytes[] memory returnData); | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
/** | ||||||||||||||
* @dev ERC-7579 Account Config. | ||||||||||||||
* | ||||||||||||||
* Exposes information that identifies the account, supported modules and capabilities. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
*/ | ||||||||||||||
interface IERC7579AccountConfig { | ||||||||||||||
/** | ||||||||||||||
* @dev Returns the account id of the smart account | ||||||||||||||
|
@@ -148,6 +170,11 @@ interface IERC7579AccountConfig { | |||||||||||||
function supportsModule(uint256 moduleTypeId) external view returns (bool); | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
/** | ||||||||||||||
* @dev ERC-7579 Module Config. | ||||||||||||||
* | ||||||||||||||
* Allows an account to install and uninstall modules. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
*/ | ||||||||||||||
interface IERC7579ModuleConfig { | ||||||||||||||
event ModuleInstalled(uint256 moduleTypeId, address module); | ||||||||||||||
event ModuleUninstalled(uint256 moduleTypeId, address module); | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.