-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
/* solhint-disable one-contract-per-file */ | ||
pragma solidity >=0.7.0 <0.9.0; | ||
|
||
import {IERC165} from "safe-smart-account/contracts/interfaces/IERC165.sol"; | ||
|
||
enum Operation { | ||
Call, | ||
DelegateCall | ||
} | ||
|
||
/** | ||
* @title IModuleGuard Interface | ||
*/ | ||
interface IModuleGuard is IERC165 { | ||
/** | ||
* @notice Checks the module transaction details. | ||
* @dev The function needs to implement module transaction validation logic. | ||
* @param to The address to which the transaction is intended. | ||
* @param value The value of the transaction in Wei. | ||
* @param data The transaction data. | ||
* @param operation The type of operation of the module transaction. | ||
* @param module The module involved in the transaction. | ||
* @return moduleTxHash The hash of the module transaction. | ||
*/ | ||
function checkModuleTransaction( | ||
address to, | ||
uint256 value, | ||
bytes memory data, | ||
Operation operation, | ||
address module | ||
) external returns (bytes32 moduleTxHash); | ||
|
||
/** | ||
* @notice Checks after execution of module transaction. | ||
* @dev The function needs to implement a check after the execution of the module transaction. | ||
* @param txHash The hash of the module transaction. | ||
* @param success The status of the module transaction execution. | ||
*/ | ||
function checkAfterModuleExecution(bytes32 txHash, bool success) external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters