From 6b180c0b4b9cd31d6cd05364a2984e0a9277f684 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Fri, 22 Dec 2023 10:39:49 -0300 Subject: [PATCH 1/2] fix: set deployer as owner in non live networks --- deploy/1-deploy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/1-deploy.ts b/deploy/1-deploy.ts index b0d04126..c2844273 100644 --- a/deploy/1-deploy.ts +++ b/deploy/1-deploy.ts @@ -24,7 +24,7 @@ const func: DeployFunction = async ({ deterministicDeployment: false, args: [comptrollerAddress, WBNBAddress, vBNBAddress], proxy: { - owner: timelockAddress, + owner: live ? timelockAddress : deployer, proxyContract: "OpenZeppelinTransparentProxy", execute: { methodName: "initialize", From 40987e77989da37437b129be2946684fdfd2bafd Mon Sep 17 00:00:00 2001 From: Jesus Lanchas Date: Tue, 2 Jan 2024 12:22:46 +0100 Subject: [PATCH 2/2] feat: stop changing the owner of PSR on no-live networks --- deploy/1-deploy.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/deploy/1-deploy.ts b/deploy/1-deploy.ts index c2844273..4d2e5e8a 100644 --- a/deploy/1-deploy.ts +++ b/deploy/1-deploy.ts @@ -1,4 +1,4 @@ -import hre, { ethers } from "hardhat"; +import { ethers } from "hardhat"; import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; @@ -32,15 +32,6 @@ const func: DeployFunction = async ({ }, }, }); - - const psr = await hre.ethers.getContract("ProtocolShareReserve"); - const psrOwner = await psr.owner(); - - if (psrOwner === deployer) { - const tx = await psr.transferOwnership(timelockAddress); - await tx.wait(); - console.log("Transferred ownership of PSR to Timelock"); - } }; func.tags = ["deploy"];