You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -193,6 +192,27 @@ contract StartaleSmartAccount is
193
192
emitModuleInstalled(moduleTypeId, module);
194
193
}
195
194
195
+
/// @notice Installs an interface to the smart account.
196
+
/// @param interfaceId The id of the interface to install.
197
+
/// @dev This function can only be called by the EntryPoint or the account itself for security reasons.
198
+
function installInterface(bytes4interfaceId) externalpayable onlyEntryPointOrSelf {
199
+
_installInterface(interfaceId);
200
+
}
201
+
202
+
/// @notice Installs multiple interfaces to the smart account.
203
+
/// @param interfaceIds The ids of the interfaces to install.
204
+
/// @dev This function can only be called by the EntryPoint or the account itself for security reasons.
205
+
function installInterfaces(bytes4[] calldatainterfaceIds) externalpayable onlyEntryPointOrSelf {
206
+
_installInterfaces(interfaceIds);
207
+
}
208
+
209
+
/// @notice Uninstalls an interface from the smart account.
210
+
/// @param interfaceId The id of the interface to uninstall.
211
+
/// @dev This function can only be called by the EntryPoint or the account itself for security reasons.
212
+
function uninstallInterface(bytes4interfaceId) externalpayable onlyEntryPointOrSelf {
213
+
_uninstallInterface(interfaceId);
214
+
}
215
+
196
216
/// @notice Uninstalls a module from the smart account.
197
217
/// @param moduleTypeId The type ID of the module to be uninstalled, matching the installation type:
198
218
/// - 1 for Validator
@@ -305,18 +325,21 @@ contract StartaleSmartAccount is
305
325
}
306
326
}
307
327
308
-
/// @dev Uninstalls all validators, executors, hooks, and pre-validation hooks.
309
-
/// Review: _onRedelegation
328
+
/// @dev Uninstalls all validators, executors, hooks, fallbacks, and pre-validation hooks.
329
+
/// @notice It is worth noting that, onRedelegation() does not obligate the account to completely wipe out it’s storage.
330
+
/// @notice It is an optional action for the account where it could uninitialize the storage variables as much as it can to provide clean storage for new wallet.
0 commit comments