From a36fc32437eee04da125e5f467231eb99354923e Mon Sep 17 00:00:00 2001 From: kartojal Date: Mon, 4 Apr 2022 15:51:23 +0200 Subject: [PATCH 1/2] feat: Add owner constructor parameter to EmissionManager contract to support CREATE2 factory deployments --- contracts/rewards/EmissionManager.sol | 4 +++- test/helpers/make-suite.ts | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/contracts/rewards/EmissionManager.sol b/contracts/rewards/EmissionManager.sol index 4ce915ee..f24d6e00 100644 --- a/contracts/rewards/EmissionManager.sol +++ b/contracts/rewards/EmissionManager.sol @@ -30,9 +30,11 @@ contract EmissionManager is Ownable, IEmissionManager { /** * Constructor. * @param controller The address of the RewardsController contract + * @param controller The address of the owner of this contract */ - constructor(address controller) { + constructor(address controller, address owner) { _rewardsController = IRewardsController(controller); + transferOwnership(owner); } /// @inheritdoc IEmissionManager diff --git a/test/helpers/make-suite.ts b/test/helpers/make-suite.ts index f8526a11..5f67de84 100644 --- a/test/helpers/make-suite.ts +++ b/test/helpers/make-suite.ts @@ -241,7 +241,8 @@ export async function initializeMakeSuite() { const rewardsController = ((await getIncentivesV2()) as any) as RewardsController; testEnv.rewardsController = rewardsController; testEnv.emissionManager = await new EmissionManager__factory(deployer.signer).deploy( - rewardsController.address + rewardsController.address, + deployer.address ); testEnv.rewardsVault = rewardsVault; testEnv.stakedAave = await getStakeAave(); From 7b0b0fdffb5f6305be865576edf3e20c0d12d8c6 Mon Sep 17 00:00:00 2001 From: miguelmtzinf Date: Mon, 4 Apr 2022 15:59:25 +0200 Subject: [PATCH 2/2] fix: Fix docs --- contracts/rewards/EmissionManager.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/rewards/EmissionManager.sol b/contracts/rewards/EmissionManager.sol index f24d6e00..fe49e77d 100644 --- a/contracts/rewards/EmissionManager.sol +++ b/contracts/rewards/EmissionManager.sol @@ -30,7 +30,7 @@ contract EmissionManager is Ownable, IEmissionManager { /** * Constructor. * @param controller The address of the RewardsController contract - * @param controller The address of the owner of this contract + * @param owner The address of the owner */ constructor(address controller, address owner) { _rewardsController = IRewardsController(controller);