Skip to content

Commit 5c3363b

Browse files
committed
fix: add hooks to install functions
1 parent bb2d4ba commit 5c3363b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/MSAAdvanced.sol

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,17 @@ contract MSAAdvanced is IMSA, ExecutionHelper, ModuleManager, HookManager {
168168
payable
169169
onlyEntryPointOrSelf
170170
{
171+
(address hook, bytes memory hookData) = _preCheck();
172+
171173
if (moduleTypeId == MODULE_TYPE_VALIDATOR) _installValidator(module, initData);
172174
else if (moduleTypeId == MODULE_TYPE_EXECUTOR) _installExecutor(module, initData);
173175
else if (moduleTypeId == MODULE_TYPE_FALLBACK) _installFallbackHandler(module, initData);
174176
else if (moduleTypeId == MODULE_TYPE_HOOK) _installHook(module, initData);
175177
else revert UnsupportedModuleType(moduleTypeId);
176178
emit ModuleInstalled(moduleTypeId, module);
179+
180+
// TODO: add correct data
181+
_postCheck(hook, hookData, true, new bytes(0));
177182
}
178183

179184
/**
@@ -188,6 +193,8 @@ contract MSAAdvanced is IMSA, ExecutionHelper, ModuleManager, HookManager {
188193
payable
189194
onlyEntryPointOrSelf
190195
{
196+
(address hook, bytes memory hookData) = _preCheck();
197+
191198
if (moduleTypeId == MODULE_TYPE_VALIDATOR) {
192199
_uninstallValidator(module, deInitData);
193200
} else if (moduleTypeId == MODULE_TYPE_EXECUTOR) {
@@ -200,6 +207,9 @@ contract MSAAdvanced is IMSA, ExecutionHelper, ModuleManager, HookManager {
200207
revert UnsupportedModuleType(moduleTypeId);
201208
}
202209
emit ModuleUninstalled(moduleTypeId, module);
210+
211+
// TODO: add correct data
212+
_postCheck(hook, hookData, true, new bytes(0));
203213
}
204214

205215
/**

0 commit comments

Comments
 (0)