@@ -136,23 +136,6 @@ abstract contract PluginManagerInternals is IPluginManager {
136136 _removeHooks (_selectorData.executionHooks, preExecHook, postExecHook);
137137 }
138138
139- function _enableExecFromPlugin (bytes4 selector , address plugin , AccountStorage storage accountStorage )
140- internal
141- {
142- bytes24 key = getPermittedCallKey (plugin, selector);
143-
144- // If there are duplicates, this will just enable the flag again. This is not a problem, since the boolean
145- // will be set to false twice during uninstall, which is fine.
146- accountStorage.permittedCalls[key].callPermitted = true ;
147- }
148-
149- function _disableExecFromPlugin (bytes4 selector , address plugin , AccountStorage storage accountStorage )
150- internal
151- {
152- bytes24 key = getPermittedCallKey (plugin, selector);
153- accountStorage.permittedCalls[key].callPermitted = false ;
154- }
155-
156139 function _addHooks (HookGroup storage hooks , FunctionReference preExecHook , FunctionReference postExecHook )
157140 internal
158141 {
@@ -306,7 +289,9 @@ abstract contract PluginManagerInternals is IPluginManager {
306289 // Add installed plugin and selectors this plugin can call
307290 length = manifest.permittedExecutionSelectors.length ;
308291 for (uint256 i = 0 ; i < length;) {
309- _enableExecFromPlugin (manifest.permittedExecutionSelectors[i], plugin, _storage);
292+ // If there are duplicates, this will just enable the flag again. This is not a problem, since the
293+ // boolean will be set to false twice during uninstall, which is fine.
294+ _storage.callPermitted[getPermittedCallKey (plugin, manifest.permittedExecutionSelectors[i])] = true ;
310295
311296 unchecked {
312297 ++ i;
@@ -619,7 +604,7 @@ abstract contract PluginManagerInternals is IPluginManager {
619604
620605 length = manifest.permittedExecutionSelectors.length ;
621606 for (uint256 i = 0 ; i < length;) {
622- _disableExecFromPlugin ( manifest.permittedExecutionSelectors[i], plugin, _storage) ;
607+ _storage.callPermitted[ getPermittedCallKey (plugin, manifest.permittedExecutionSelectors[i])] = false ;
623608
624609 unchecked {
625610 ++ i;
0 commit comments