forked from erc6900/reference-implementation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIExecutionModule.sol
37 lines (32 loc) · 1.34 KB
/
IExecutionModule.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.20;
import {IModule} from "./IModule.sol";
struct ManifestExecutionFunction {
// The selector to install.
bytes4 executionSelector;
// If true, the function won't need runtime validation, and can be called by anyone.
bool skipRuntimeValidation;
// If true, the function can be validated by a global validation function.
bool allowGlobalValidation;
}
struct ManifestExecutionHook {
bytes4 executionSelector;
uint32 entityId;
bool isPreHook;
bool isPostHook;
}
/// @dev A struct describing how the module should be installed on a modular account.
struct ExecutionManifest {
// Execution functions defined in this module to be installed on the MSCA.
ManifestExecutionFunction[] executionFunctions;
ManifestExecutionHook[] executionHooks;
// List of ERC-165 interface IDs to add to account to support introspection checks. This MUST NOT include
// IModule's interface ID.
bytes4[] interfaceIds;
}
interface IExecutionModule is IModule {
/// @notice Describe the contents and intended configuration of the module.
/// @dev This manifest MUST stay constant over time.
/// @return A manifest describing the contents and intended configuration of the module.
function executionManifest() external pure returns (ExecutionManifest memory);
}