Skip to content

Commit

Permalink
Optimize module execution events
Browse files Browse the repository at this point in the history
  • Loading branch information
rmeissner committed Oct 24, 2019
1 parent 7928b8e commit dbea5bb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions contracts/base/ModuleManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ contract ModuleManager is SelfAuthorized, Executor {

event EnabledModule(Module module);
event DisabledModule(Module module);
// TODO: what should be indexed
event ExecutionFromModule(
bool indexed success, address indexed module, address indexed to, // topics
uint256 value, bytes data, Enum.Operation operation
);
event ExecutionFromModuleSuccess(address indexed module);
event ExecutionFromModuleFailure(address indexed module);

address public constant SENTINEL_MODULES = address(0x1);

Expand Down Expand Up @@ -77,7 +74,8 @@ contract ModuleManager is SelfAuthorized, Executor {
require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), "Method can only be called from an enabled module");
// Execute transaction without further confirmations.
success = execute(to, value, data, operation, gasleft());
emit ExecutionFromModule(success, msg.sender, to, value, data, operation);
if (success) emit ExecutionFromModuleSuccess(msg.sender);
else emit ExecutionFromModuleFailure(msg.sender);
}

/// @dev Returns array of modules.
Expand Down

0 comments on commit dbea5bb

Please sign in to comment.