Skip to content

Commit

Permalink
Plugin setup first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed Jan 15, 2025
1 parent ed980b5 commit 5828f04
Show file tree
Hide file tree
Showing 5 changed files with 338 additions and 347 deletions.
11 changes: 5 additions & 6 deletions src/LockManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,16 @@ contract LockManager is ILockManager, DaoAuthorizable {
}

/// @inheritdoc ILockManager
function setPluginAddress(
ILockToVoteBase _newPluginAddress
) public auth(UPDATE_SETTINGS_PERMISSION_ID) {
if (
function setPluginAddress(ILockToVoteBase _newPluginAddress) public {
if (address(plugin) != address(0)) {
// Only once
revert SetPluginAddressForbidden();
} else if (
!IERC165(address(_newPluginAddress)).supportsInterface(
type(ILockToVoteBase).interfaceId
)
) {
revert InvalidPlugin();
} else if (address(plugin) != address(0)) {
revert SetPluginAddressForbidden();
} else if (
settings.pluginMode == PluginMode.APPROVAL &&
!IERC165(address(_newPluginAddress)).supportsInterface(
Expand Down
Loading

0 comments on commit 5828f04

Please sign in to comment.