diff --git a/src/account/ModuleManagerInternals.sol b/src/account/ModuleManagerInternals.sol index 54cb2fc0..35ca5f79 100644 --- a/src/account/ModuleManagerInternals.sol +++ b/src/account/ModuleManagerInternals.sol @@ -175,7 +175,7 @@ abstract contract ModuleManagerInternals is IModuleManager { revert ModuleInstallCallbackFailed(module, revertReason); } - emit ModuleInstalled(module); + emit ExecutionInstalled(module, manifest); } function _uninstallExecution(address module, ExecutionManifest calldata manifest, bytes memory uninstallData) @@ -218,7 +218,7 @@ abstract contract ModuleManagerInternals is IModuleManager { onUninstallSuccess = false; } - emit ModuleUninstalled(module, onUninstallSuccess); + emit ExecutionUninstalled(module, onUninstallSuccess, manifest); } function _onInstall(address module, bytes calldata data) internal { diff --git a/src/interfaces/IModuleManager.sol b/src/interfaces/IModuleManager.sol index 8df05bc4..459a1ce7 100644 --- a/src/interfaces/IModuleManager.sol +++ b/src/interfaces/IModuleManager.sol @@ -10,8 +10,8 @@ type ValidationConfig is bytes26; type HookConfig is bytes26; interface IModuleManager { - event ModuleInstalled(address indexed module); - event ModuleUninstalled(address indexed module, bool indexed onUninstallSucceeded); + event ExecutionInstalled(address indexed module, ExecutionManifest manifest); + event ExecutionUninstalled(address indexed module, bool onUninstallSucceeded, ExecutionManifest manifest); event ValidationInstalled(ModuleEntity indexed moduleEntity); event ValidationUninstalled(ModuleEntity indexed moduleEntity, bool indexed onUninstallSucceeded); diff --git a/test/account/AccountExecHooks.t.sol b/test/account/AccountExecHooks.t.sol index 2e0a90bc..347724f6 100644 --- a/test/account/AccountExecHooks.t.sol +++ b/test/account/AccountExecHooks.t.sol @@ -22,8 +22,8 @@ contract AccountExecHooksTest is AccountTestBase { ExecutionManifest internal _m1; - event ModuleInstalled(address indexed module); - event ModuleUninstalled(address indexed module, bool indexed callbacksSucceeded); + event ExecutionInstalled(address indexed module, ExecutionManifest manifest); + event ExecutionUninstalled(address indexed module, bool onUninstallSucceeded, ExecutionManifest manifest); // emitted by MockModule event ReceivedCall(bytes msgData, uint256 msgValue); @@ -164,7 +164,7 @@ contract AccountExecHooksTest is AccountTestBase { vm.expectEmit(true, true, true, true); emit ReceivedCall(abi.encodeCall(IModule.onInstall, (bytes(""))), 0); vm.expectEmit(true, true, true, true); - emit ModuleInstalled(address(mockModule1)); + emit ExecutionInstalled(address(mockModule1), _m1); vm.startPrank(address(entryPoint)); account1.installExecution({ @@ -179,7 +179,7 @@ contract AccountExecHooksTest is AccountTestBase { vm.expectEmit(true, true, true, true); emit ReceivedCall(abi.encodeCall(IModule.onUninstall, (bytes(""))), 0); vm.expectEmit(true, true, true, true); - emit ModuleUninstalled(address(module), true); + emit ExecutionUninstalled(address(module), true, module.executionManifest()); vm.startPrank(address(entryPoint)); account1.uninstallExecution(address(module), module.executionManifest(), bytes("")); diff --git a/test/account/UpgradeableModularAccount.t.sol b/test/account/UpgradeableModularAccount.t.sol index 6e305197..eca667f2 100644 --- a/test/account/UpgradeableModularAccount.t.sol +++ b/test/account/UpgradeableModularAccount.t.sol @@ -42,8 +42,8 @@ contract UpgradeableModularAccountTest is AccountTestBase { Counter public counter; ExecutionManifest internal _manifest; - event ModuleInstalled(address indexed module); - event ModuleUninstalled(address indexed module, bool indexed callbacksSucceeded); + event ExecutionInstalled(address indexed module, ExecutionManifest manifest); + event ExecutionUninstalled(address indexed module, bool onUninstallSucceeded, ExecutionManifest manifest); event ReceivedCall(bytes msgData, uint256 msgValue); function setUp() public { @@ -240,7 +240,7 @@ contract UpgradeableModularAccountTest is AccountTestBase { vm.startPrank(address(entryPoint)); vm.expectEmit(true, true, true, true); - emit ModuleInstalled(address(tokenReceiverModule)); + emit ExecutionInstalled(address(tokenReceiverModule), tokenReceiverModule.executionManifest()); IModuleManager(account1).installExecution({ module: address(tokenReceiverModule), manifest: tokenReceiverModule.executionManifest(), @@ -314,7 +314,7 @@ contract UpgradeableModularAccountTest is AccountTestBase { }); vm.expectEmit(true, true, true, true); - emit ModuleUninstalled(address(module), true); + emit ExecutionUninstalled(address(module), true, module.executionManifest()); IModuleManager(account1).uninstallExecution({ module: address(module), manifest: module.executionManifest(),