From dcb07688c69176130f929ebff08fe77afa5e7b18 Mon Sep 17 00:00:00 2001 From: howydev <132113803+howydev@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:42:05 -0500 Subject: [PATCH 1/3] fix: disable renounce ownership --- src/factory/MultiOwnerMSCAFactory.sol | 3 +++ src/factory/MultiOwnerTokenReceiverMSCAFactory.sol | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/factory/MultiOwnerMSCAFactory.sol b/src/factory/MultiOwnerMSCAFactory.sol index b1a2e368..57f40cf3 100644 --- a/src/factory/MultiOwnerMSCAFactory.sol +++ b/src/factory/MultiOwnerMSCAFactory.sol @@ -158,4 +158,7 @@ contract MultiOwnerMSCAFactory is Ownable2Step { keccak256(abi.encodePacked(type(ERC1967Proxy).creationCode, abi.encode(IMPL, ""))) ); } + + /// @notice Overriding to disable renounce ownership in Ownable + function renounceOwnership() public override onlyOwner {} } diff --git a/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol b/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol index 44925079..8affa1d7 100644 --- a/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol +++ b/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol @@ -166,4 +166,7 @@ contract MultiOwnerTokenReceiverMSCAFactory is Ownable2Step { keccak256(abi.encodePacked(type(ERC1967Proxy).creationCode, abi.encode(IMPL, ""))) ); } + + /// @notice Overriding to disable renounce ownership in Ownable + function renounceOwnership() public override onlyOwner {} } From bf613eb7acc61b8af1df88135182822fcf7071d2 Mon Sep 17 00:00:00 2001 From: howydev <132113803+howydev@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:51:18 -0500 Subject: [PATCH 2/3] review fix --- src/factory/MultiOwnerMSCAFactory.sol | 5 ++++- src/factory/MultiOwnerTokenReceiverMSCAFactory.sol | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/factory/MultiOwnerMSCAFactory.sol b/src/factory/MultiOwnerMSCAFactory.sol index 57f40cf3..22954ff9 100644 --- a/src/factory/MultiOwnerMSCAFactory.sol +++ b/src/factory/MultiOwnerMSCAFactory.sol @@ -43,6 +43,7 @@ contract MultiOwnerMSCAFactory is Ownable2Step { error OwnersArrayEmpty(); error OwnersLimitExceeded(); error TransferFailed(); + error InvalidAction(); /// @notice Constructor for the factory constructor( @@ -160,5 +161,7 @@ contract MultiOwnerMSCAFactory is Ownable2Step { } /// @notice Overriding to disable renounce ownership in Ownable - function renounceOwnership() public override onlyOwner {} + function renounceOwnership() public view override onlyOwner { + revert InvalidAction(); + } } diff --git a/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol b/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol index 8affa1d7..33a45a5e 100644 --- a/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol +++ b/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol @@ -45,6 +45,7 @@ contract MultiOwnerTokenReceiverMSCAFactory is Ownable2Step { error OwnersArrayEmpty(); error OwnersLimitExceeded(); error TransferFailed(); + error InvalidAction(); /// @notice Constructor for the factory constructor( @@ -168,5 +169,7 @@ contract MultiOwnerTokenReceiverMSCAFactory is Ownable2Step { } /// @notice Overriding to disable renounce ownership in Ownable - function renounceOwnership() public override onlyOwner {} + function renounceOwnership() public override onlyOwner { + revert InvalidAction(); + } } From e5730dbcf0b6c462ab5656d9d9d30e412f7e290c Mon Sep 17 00:00:00 2001 From: howydev <132113803+howydev@users.noreply.github.com> Date: Fri, 26 Jan 2024 16:11:02 -0500 Subject: [PATCH 3/3] review fix --- src/factory/MultiOwnerMSCAFactory.sol | 2 +- src/factory/MultiOwnerTokenReceiverMSCAFactory.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/factory/MultiOwnerMSCAFactory.sol b/src/factory/MultiOwnerMSCAFactory.sol index 22954ff9..ebefd80e 100644 --- a/src/factory/MultiOwnerMSCAFactory.sol +++ b/src/factory/MultiOwnerMSCAFactory.sol @@ -39,11 +39,11 @@ contract MultiOwnerMSCAFactory is Ownable2Step { bytes32 internal immutable _MULTI_OWNER_PLUGIN_MANIFEST_HASH; uint256 internal constant _MAX_OWNERS_ON_CREATION = 100; + error InvalidAction(); error InvalidOwner(); error OwnersArrayEmpty(); error OwnersLimitExceeded(); error TransferFailed(); - error InvalidAction(); /// @notice Constructor for the factory constructor( diff --git a/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol b/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol index 33a45a5e..24953c3e 100644 --- a/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol +++ b/src/factory/MultiOwnerTokenReceiverMSCAFactory.sol @@ -41,11 +41,11 @@ contract MultiOwnerTokenReceiverMSCAFactory is Ownable2Step { bytes32 internal immutable _TOKEN_RECEIVER_PLUGIN_MANIFEST_HASH; uint256 internal constant _MAX_OWNERS_ON_CREATION = 100; + error InvalidAction(); error InvalidOwner(); error OwnersArrayEmpty(); error OwnersLimitExceeded(); error TransferFailed(); - error InvalidAction(); /// @notice Constructor for the factory constructor(