Skip to content

Commit

Permalink
[#775] Move pre execTransaction call to preModuleExecution
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay-ap committed Jun 27, 2024
1 parent 64dec82 commit f827f91
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions contracts/base/ModuleManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ abstract contract ModuleManager is SelfAuthorized, Executor, IModuleManager {
bytes memory data,
Enum.Operation operation
) internal returns (address guard, bytes32 guardHash) {
onBeforeExecTransactionFromModule(to, value, data, operation);
guard = getModuleGuard();

// Only whitelisted modules are allowed.
Expand Down Expand Up @@ -153,7 +154,6 @@ abstract contract ModuleManager is SelfAuthorized, Executor, IModuleManager {
bytes memory data,
Enum.Operation operation
) external override returns (bool success) {
onBeforeExecTransactionFromModule(to, value, data, operation);
(address guard, bytes32 guardHash) = preModuleExecution(to, value, data, operation);
success = execute(to, value, data, operation, type(uint256).max);
postModuleExecution(guard, guardHash, success);
Expand All @@ -168,7 +168,6 @@ abstract contract ModuleManager is SelfAuthorized, Executor, IModuleManager {
bytes memory data,
Enum.Operation operation
) external override returns (bool success, bytes memory returnData) {
onBeforeExecTransactionFromModule(to, value, data, operation);
(address guard, bytes32 guardHash) = preModuleExecution(to, value, data, operation);
success = execute(to, value, data, operation, type(uint256).max);
/* solhint-disable no-inline-assembly */
Expand Down

0 comments on commit f827f91

Please sign in to comment.