Skip to content

Commit ed98138

Browse files
ernestognwcairoethAmxx
authored
Add missing docstrings (#5311)
Co-authored-by: cairo <cairoeth@protonmail.com> Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
1 parent b3ce884 commit ed98138

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

contracts/governance/extensions/GovernorCountingOverridable.sol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ abstract contract GovernorCountingOverridable is GovernorVotes {
3535
mapping(address voter => VoteReceipt) voteReceipt;
3636
}
3737

38-
event VoteReduced(address indexed voter, uint256 proposalId, uint8 support, uint256 weight);
38+
/// @dev The vote was reduced by `weight` after an override over the `delegate` by the original token holder
39+
event VoteReduced(address indexed delegate, uint256 proposalId, uint8 support, uint256 weight);
40+
41+
/// @dev A delegated vote on `proposalId` was overridden by `weight`
3942
event OverrideVoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason);
4043

4144
error GovernorAlreadyOverridenVote(address account);

contracts/interfaces/draft-IERC7579.sol

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ uint256 constant MODULE_TYPE_EXECUTOR = 2;
1010
uint256 constant MODULE_TYPE_FALLBACK = 3;
1111
uint256 constant MODULE_TYPE_HOOK = 4;
1212

13+
/// @dev Minimal configuration interface for ERC-7579 modules
1314
interface IERC7579Module {
1415
/**
1516
* @dev This function is called by the smart account during installation of the module
@@ -36,6 +37,11 @@ interface IERC7579Module {
3637
function isModuleType(uint256 moduleTypeId) external view returns (bool);
3738
}
3839

40+
/**
41+
* @dev ERC-7579 Validation module (type 1).
42+
*
43+
* A module that implements logic to validate user operations and signatures.
44+
*/
3945
interface IERC7579Validator is IERC7579Module {
4046
/**
4147
* @dev Validates a UserOperation
@@ -63,6 +69,12 @@ interface IERC7579Validator is IERC7579Module {
6369
) external view returns (bytes4);
6470
}
6571

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+
*/
6678
interface IERC7579Hook is IERC7579Module {
6779
/**
6880
* @dev Called by the smart account before execution
@@ -93,6 +105,11 @@ struct Execution {
93105
bytes callData;
94106
}
95107

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+
*/
96113
interface IERC7579Execution {
97114
/**
98115
* @dev Executes a transaction on behalf of the account.
@@ -119,6 +136,11 @@ interface IERC7579Execution {
119136
) external returns (bytes[] memory returnData);
120137
}
121138

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+
*/
122144
interface IERC7579AccountConfig {
123145
/**
124146
* @dev Returns the account id of the smart account
@@ -148,6 +170,11 @@ interface IERC7579AccountConfig {
148170
function supportsModule(uint256 moduleTypeId) external view returns (bool);
149171
}
150172

173+
/**
174+
* @dev ERC-7579 Module Config.
175+
*
176+
* Accounts should implement this interface to allows installing and uninstalling modules.
177+
*/
151178
interface IERC7579ModuleConfig {
152179
event ModuleInstalled(uint256 moduleTypeId, address module);
153180
event ModuleUninstalled(uint256 moduleTypeId, address module);

0 commit comments

Comments
 (0)