diff --git a/src/contracts/misc/GhoAaveSteward.sol b/src/contracts/misc/GhoAaveSteward.sol index 7e99c4f0..de69d92b 100644 --- a/src/contracts/misc/GhoAaveSteward.sol +++ b/src/contracts/misc/GhoAaveSteward.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; -import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; import {IPoolAddressesProvider} from '@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol'; import {IPoolConfigurator} from '@aave/core-v3/contracts/interfaces/IPoolConfigurator.sol'; import {IPool} from '@aave/core-v3/contracts/interfaces/IPool.sol'; @@ -19,7 +18,7 @@ import {RiskCouncilControlled} from './RiskCouncilControlled.sol'; * @dev Only the Risk Council is able to action contract's functions, based on specific conditions that have been agreed upon with the community. * @dev Requires role RiskAdmin on the Aave V3 Ethereum Pool */ -contract GhoAaveSteward is Ownable, RiskCouncilControlled, IGhoAaveSteward { +contract GhoAaveSteward is RiskCouncilControlled, IGhoAaveSteward { using ReserveConfiguration for DataTypes.ReserveConfigurationMap; /// @inheritdoc IGhoAaveSteward @@ -46,20 +45,17 @@ contract GhoAaveSteward is Ownable, RiskCouncilControlled, IGhoAaveSteward { /** * @dev Constructor - * @param owner The address of the owner of the contract * @param addressesProvider The address of the PoolAddressesProvider of Aave V3 Ethereum Pool * @param ghoToken The address of the GhoToken * @param fixedRateStrategyFactory The address of the FixedRateStrategyFactory * @param riskCouncil The address of the risk council */ constructor( - address owner, address addressesProvider, address ghoToken, address fixedRateStrategyFactory, address riskCouncil ) RiskCouncilControlled(riskCouncil) { - require(owner != address(0), 'INVALID_OWNER'); require(addressesProvider != address(0), 'INVALID_ADDRESSES_PROVIDER'); require(ghoToken != address(0), 'INVALID_GHO_TOKEN'); require(fixedRateStrategyFactory != address(0), 'INVALID_FIXED_RATE_STRATEGY_FACTORY'); @@ -67,8 +63,6 @@ contract GhoAaveSteward is Ownable, RiskCouncilControlled, IGhoAaveSteward { POOL_ADDRESSES_PROVIDER = addressesProvider; GHO_TOKEN = ghoToken; FIXED_RATE_STRATEGY_FACTORY = fixedRateStrategyFactory; - - _transferOwnership(owner); } /// @inheritdoc IGhoAaveSteward diff --git a/src/contracts/misc/GhoBucketCapacitySteward.sol b/src/contracts/misc/GhoBucketCapacitySteward.sol index bfc1f928..b5cdfb59 100644 --- a/src/contracts/misc/GhoBucketCapacitySteward.sol +++ b/src/contracts/misc/GhoBucketCapacitySteward.sol @@ -38,7 +38,7 @@ contract GhoBucketCapacitySteward is Ownable, RiskCouncilControlled, IGhoBucketC /** * @dev Constructor - * @param owner The address of the owner of the contract + * @param owner The address of the contract's owner * @param ghoToken The address of the GhoToken * @param riskCouncil The address of the risk council */ diff --git a/src/contracts/misc/GhoCcipSteward.sol b/src/contracts/misc/GhoCcipSteward.sol index 5c673e2b..e05ee7a5 100644 --- a/src/contracts/misc/GhoCcipSteward.sol +++ b/src/contracts/misc/GhoCcipSteward.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; -import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import {IGhoToken} from '../gho/interfaces/IGhoToken.sol'; import {IGhoCcipSteward} from './interfaces/IGhoCcipSteward.sol'; @@ -15,7 +14,7 @@ import {UpgradeableLockReleaseTokenPool, RateLimiter} from './deps/Dependencies. * @dev Only the Risk Council is able to action contract's functions, based on specific conditions that have been agreed upon with the community. * @dev Requires roles RateLimitAdmin and BridgeLimitAdmin (if on Ethereum) on GhoTokenPool */ -contract GhoCcipSteward is Ownable, RiskCouncilControlled, IGhoCcipSteward { +contract GhoCcipSteward is RiskCouncilControlled, IGhoCcipSteward { using EnumerableSet for EnumerableSet.AddressSet; /// @inheritdoc IGhoCcipSteward @@ -40,27 +39,22 @@ contract GhoCcipSteward is Ownable, RiskCouncilControlled, IGhoCcipSteward { /** * @dev Constructor - * @param owner The address of the owner of the contract * @param ghoToken The address of the GhoToken * @param ghoTokenPool The address of the Gho CCIP Token Pool * @param riskCouncil The address of the risk council */ constructor( - address owner, address ghoToken, address ghoTokenPool, address riskCouncil, bool bridgeLimitEnabled ) RiskCouncilControlled(riskCouncil) { - require(owner != address(0), 'INVALID_OWNER'); require(ghoToken != address(0), 'INVALID_GHO_TOKEN'); require(ghoTokenPool != address(0), 'INVALID_GHO_TOKEN_POOL'); GHO_TOKEN = ghoToken; GHO_TOKEN_POOL = ghoTokenPool; BRIDGE_LIMIT_ENABLED = bridgeLimitEnabled; - - _transferOwnership(owner); } /// @inheritdoc IGhoCcipSteward diff --git a/src/contracts/misc/GhoGsmSteward.sol b/src/contracts/misc/GhoGsmSteward.sol index 0dfbcabe..6095f2d2 100644 --- a/src/contracts/misc/GhoGsmSteward.sol +++ b/src/contracts/misc/GhoGsmSteward.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; -import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import {FixedFeeStrategy} from '../facilitators/gsm/feeStrategy/FixedFeeStrategy.sol'; import {IGsm} from '../facilitators/gsm/interfaces/IGsm.sol'; @@ -16,7 +15,7 @@ import {RiskCouncilControlled} from './RiskCouncilControlled.sol'; * @dev Only the Risk Council is able to action contract's functions, based on specific conditions that have been agreed upon with the community. * @dev Requires role GSM_CONFIGURATOR_ROLE on every GSM contract to be managed */ -contract GhoGsmSteward is Ownable, RiskCouncilControlled, IGhoGsmSteward { +contract GhoGsmSteward is RiskCouncilControlled, IGhoGsmSteward { using EnumerableSet for EnumerableSet.AddressSet; /// @inheritdoc IGhoGsmSteward @@ -40,14 +39,9 @@ contract GhoGsmSteward is Ownable, RiskCouncilControlled, IGhoGsmSteward { /** * @dev Constructor - * @param owner The address of the owner of the contract * @param riskCouncil The address of the risk council */ - constructor(address owner, address riskCouncil) RiskCouncilControlled(riskCouncil) { - require(owner != address(0), 'INVALID_OWNER'); - - _transferOwnership(owner); - } + constructor(address riskCouncil) RiskCouncilControlled(riskCouncil) {} /** * @inheritdoc IGhoGsmSteward diff --git a/src/test/TestGhoAaveSteward.t.sol b/src/test/TestGhoAaveSteward.t.sol index 646e3c77..13c1de7a 100644 --- a/src/test/TestGhoAaveSteward.t.sol +++ b/src/test/TestGhoAaveSteward.t.sol @@ -15,7 +15,6 @@ contract TestGhoAaveSteward is TestGhoBase { function testConstructor() public { assertEq(GHO_AAVE_STEWARD.MINIMUM_DELAY(), MINIMUM_DELAY_V2); - assertEq(GHO_AAVE_STEWARD.owner(), SHORT_EXECUTOR); assertEq(GHO_AAVE_STEWARD.POOL_ADDRESSES_PROVIDER(), address(PROVIDER)); assertEq(GHO_AAVE_STEWARD.GHO_TOKEN(), address(GHO_TOKEN)); assertEq(GHO_AAVE_STEWARD.FIXED_RATE_STRATEGY_FACTORY(), address(FIXED_RATE_STRATEGY_FACTORY)); @@ -25,29 +24,24 @@ contract TestGhoAaveSteward is TestGhoBase { assertEq(ghoTimelocks.ghoBorrowCapLastUpdate, 0); } - function testRevertConstructorInvalidExecutor() public { - vm.expectRevert('INVALID_OWNER'); - new GhoAaveSteward(address(0), address(0x002), address(0x003), address(0x004), address(0x005)); - } - function testRevertConstructorInvalidAddressesProvider() public { vm.expectRevert('INVALID_ADDRESSES_PROVIDER'); - new GhoAaveSteward(address(0x001), address(0), address(0x003), address(0x004), address(0x005)); + new GhoAaveSteward(address(0), address(0x002), address(0x003), address(0x004)); } function testRevertConstructorInvalidGhoToken() public { vm.expectRevert('INVALID_GHO_TOKEN'); - new GhoAaveSteward(address(0x001), address(0x002), address(0), address(0x004), address(0x005)); + new GhoAaveSteward(address(0x001), address(0), address(0x003), address(0x004)); } function testRevertConstructorInvalidFixedRateStrategyFactory() public { vm.expectRevert('INVALID_FIXED_RATE_STRATEGY_FACTORY'); - new GhoAaveSteward(address(0x001), address(0x002), address(0x003), address(0), address(0x005)); + new GhoAaveSteward(address(0x001), address(0x002), address(0), address(0x004)); } function testRevertConstructorInvalidRiskCouncil() public { vm.expectRevert('INVALID_RISK_COUNCIL'); - new GhoAaveSteward(address(0x001), address(0x002), address(0x003), address(0x004), address(0)); + new GhoAaveSteward(address(0x001), address(0x002), address(0x003), address(0)); } function testUpdateGhoBorrowCap() public { diff --git a/src/test/TestGhoBase.t.sol b/src/test/TestGhoBase.t.sol index 6cfee61e..42db0851 100644 --- a/src/test/TestGhoBase.t.sol +++ b/src/test/TestGhoBase.t.sol @@ -343,7 +343,6 @@ contract TestGhoBase is Test, Constants, Events { // Deploy Gho Aave Steward GHO_AAVE_STEWARD = new GhoAaveSteward( - SHORT_EXECUTOR, address(PROVIDER), address(GHO_TOKEN), address(FIXED_RATE_STRATEGY_FACTORY), @@ -352,7 +351,6 @@ contract TestGhoBase is Test, Constants, Events { // Deploy Gho CCIP Steward GHO_CCIP_STEWARD = new GhoCcipSteward( - SHORT_EXECUTOR, address(GHO_TOKEN), address(GHO_TOKEN_POOL), RISK_COUNCIL, @@ -360,7 +358,7 @@ contract TestGhoBase is Test, Constants, Events { ); // Deploy Gho GSM Steward - GHO_GSM_STEWARD = new GhoGsmSteward(SHORT_EXECUTOR, RISK_COUNCIL); + GHO_GSM_STEWARD = new GhoGsmSteward(RISK_COUNCIL); // Deploy Gho Bucket Capacity Steward GHO_BUCKET_CAPACITY_STEWARD = new GhoBucketCapacitySteward( diff --git a/src/test/TestGhoCcipSteward.t.sol b/src/test/TestGhoCcipSteward.t.sol index 85e22a99..69a159a5 100644 --- a/src/test/TestGhoCcipSteward.t.sol +++ b/src/test/TestGhoCcipSteward.t.sol @@ -28,30 +28,24 @@ contract TestGhoCcipSteward is TestGhoBase { function testConstructor() public { assertEq(GHO_CCIP_STEWARD.MINIMUM_DELAY(), MINIMUM_DELAY_V2); - assertEq(GHO_CCIP_STEWARD.owner(), SHORT_EXECUTOR); assertEq(GHO_CCIP_STEWARD.GHO_TOKEN(), address(GHO_TOKEN)); assertEq(GHO_CCIP_STEWARD.GHO_TOKEN_POOL(), address(GHO_TOKEN_POOL)); assertEq(GHO_CCIP_STEWARD.RISK_COUNCIL(), RISK_COUNCIL); } - function testRevertConstructorInvalidExecutor() public { - vm.expectRevert('INVALID_OWNER'); - new GhoCcipSteward(address(0), address(0x002), address(0x003), address(0x004), true); - } - function testRevertConstructorInvalidGhoToken() public { vm.expectRevert('INVALID_GHO_TOKEN'); - new GhoCcipSteward(address(0x001), address(0), address(0x003), address(0x004), true); + new GhoCcipSteward(address(0), address(0x002), address(0x003), true); } function testRevertConstructorInvalidGhoTokenPool() public { vm.expectRevert('INVALID_GHO_TOKEN_POOL'); - new GhoCcipSteward(address(0x001), address(0x002), address(0), address(0x004), true); + new GhoCcipSteward(address(0x001), address(0), address(0x003), true); } function testRevertConstructorInvalidRiskCouncil() public { vm.expectRevert('INVALID_RISK_COUNCIL'); - new GhoCcipSteward(address(0x001), address(0x002), address(0x003), address(0), true); + new GhoCcipSteward(address(0x001), address(0x002), address(0), true); } function testUpdateBridgeLimit() public { diff --git a/src/test/TestGhoGsmSteward.t.sol b/src/test/TestGhoGsmSteward.t.sol index 45069e84..e43f9af8 100644 --- a/src/test/TestGhoGsmSteward.t.sol +++ b/src/test/TestGhoGsmSteward.t.sol @@ -17,21 +17,15 @@ contract TestGhoGsmSteward is TestGhoBase { assertEq(GHO_GSM_STEWARD.GSM_FEE_RATE_CHANGE_MAX(), GSM_FEE_RATE_CHANGE_MAX); assertEq(GHO_GSM_STEWARD.MINIMUM_DELAY(), MINIMUM_DELAY_V2); - assertEq(GHO_GSM_STEWARD.owner(), SHORT_EXECUTOR); assertEq(GHO_GSM_STEWARD.RISK_COUNCIL(), RISK_COUNCIL); address[] memory gsmFeeStrategies = GHO_GSM_STEWARD.getGsmFeeStrategies(); assertEq(gsmFeeStrategies.length, 0); } - function testRevertConstructorInvalidExecutor() public { - vm.expectRevert('INVALID_OWNER'); - new GhoGsmSteward(address(0), address(0x002)); - } - function testRevertConstructorInvalidRiskCouncil() public { vm.expectRevert('INVALID_RISK_COUNCIL'); - new GhoGsmSteward(address(0x001), address(0)); + new GhoGsmSteward(address(0)); } function testUpdateGsmExposureCapUpwards() public {