diff --git a/src/execution-strategies/TimelockExecutionStrategy.sol b/src/execution-strategies/TimelockExecutionStrategy.sol index 055220a2..fdd16707 100644 --- a/src/execution-strategies/TimelockExecutionStrategy.sol +++ b/src/execution-strategies/TimelockExecutionStrategy.sol @@ -81,20 +81,11 @@ contract TimelockExecutionStrategy is SimpleQuorumExecutionStrategy, IERC1155Rec /// renounce ownership of the contract while still maintaining a veto guardian. address public vetoGuardian; - /// @notice Constructor - /// @param _owner Address of the owner of this contract. - /// @param _vetoGuardian Address of the veto guardian. - /// @param _spaces Array of whitelisted space contracts. - /// @param _timelockDelay The timelock delay in seconds. - /// @param _quorum The quorum required to execute a proposal. - constructor( - address _owner, - address _vetoGuardian, - address[] memory _spaces, - uint256 _timelockDelay, - uint256 _quorum - ) { - setUp(abi.encode(_owner, _vetoGuardian, _spaces, _timelockDelay, _quorum)); + /// @notice Constructor. + /// @dev We enforce implementations of this contract to be disabled as a security measure to prevent delegate + /// calls to the SELFDESTRUCT opcode, irrecoverably disabling all the proxies using that implementation. + constructor() { + setUp(abi.encode(address(1), address(1), new address[](0), 0, 0)); } /// @notice Initialization function, should be called immediately after deploying a new proxy to this contract. diff --git a/test/TimelockExecutionStrategy.t.sol b/test/TimelockExecutionStrategy.t.sol index 411a3f57..5caae313 100644 --- a/test/TimelockExecutionStrategy.t.sol +++ b/test/TimelockExecutionStrategy.t.sol @@ -508,10 +508,6 @@ abstract contract TimelockExecutionStrategyTest is SpaceTest { } function testSetUp() public { - address[] memory spaces = new address[](1); - spaces[0] = address(space); - timelockExecutionStrategy = new TimelockExecutionStrategy(owner, vetoGuardian, spaces, 1000, quorum); - assertEq(timelockExecutionStrategy.owner(), owner); assertEq(timelockExecutionStrategy.vetoGuardian(), vetoGuardian); assertEq(timelockExecutionStrategy.quorum(), quorum); @@ -520,19 +516,6 @@ abstract contract TimelockExecutionStrategyTest is SpaceTest { } } -contract TimelockExecutionStrategyTestDirect is TimelockExecutionStrategyTest { - function setUp() public override { - super.setUp(); - - address[] memory spaces = new address[](1); - spaces[0] = address(space); - - timelockExecutionStrategy = new TimelockExecutionStrategy(owner, vetoGuardian, spaces, 1000, quorum); - vm.deal(address(owner), 1000); - payable(timelockExecutionStrategy).transfer(1000); - } -} - contract TimelockExecutionStrategyTestProxy is TimelockExecutionStrategyTest { function setUp() public override { super.setUp(); @@ -540,13 +523,7 @@ contract TimelockExecutionStrategyTestProxy is TimelockExecutionStrategyTest { address[] memory spaces = new address[](1); spaces[0] = address(space); address[] memory emptyArray = new address[](1); - TimelockExecutionStrategy masterExecutionStrategy = new TimelockExecutionStrategy( - address(1), - address(0), - emptyArray, - 0, - 0 - ); + TimelockExecutionStrategy masterExecutionStrategy = new TimelockExecutionStrategy(); timelockExecutionStrategy = TimelockExecutionStrategy( payable(