Skip to content

Commit

Permalink
Add comment to Modifier.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
cristovaoth committed Oct 9, 2023
1 parent 52f47e6 commit c32130b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions contracts/core/Modifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ abstract contract Modifier is Module, SignatureChecker, IAvatar {
/// @dev `setModules()` was already called.
error SetupModulesAlreadyCalled();

/*
--------------------------------------------------
You must override both of the following virtual functions,
execTransactionFromModule() and execTransactionFromModuleReturnData().
It is recommended that implementations of both functions make use the
onlyModule modifier.
*/

/// @dev Passes a transaction to the modifier.
/// @notice Can only be called by enabled modules.
/// @param to Destination address of module transaction.
Expand All @@ -56,6 +64,10 @@ abstract contract Modifier is Module, SignatureChecker, IAvatar {
Enum.Operation operation
) public virtual returns (bool success, bytes memory returnData);

/*
--------------------------------------------------
*/

modifier moduleOnly() {
if (modules[msg.sender] == address(0)) {
if (modules[moduleTxSignedBy()] == address(0)) {
Expand Down

0 comments on commit c32130b

Please sign in to comment.