Skip to content

Commit a7c1812

Browse files
committed
refactor: whitelist new owner
1 parent 2b747ab commit a7c1812

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/hardhat/deploy/00_deploy_whitelist.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ const deployWhitelistOracleContracts: DeployFunction = async function (hre: Hard
1111
const { deployer } = await hre.getNamedAccounts();
1212
const { deploy } = hre.deployments;
1313
const { viem } = hre;
14+
// Set your own address here
15+
const whitelistContractNewOwner = deployer;
1416

1517
const publicClient = await viem.getPublicClient();
1618

1719
console.log("Deploying WhitelistOracle contracts...");
18-
const whitelistContractOwner = deployer;
1920

2021
// Get 10 wallet clients (accounts)
2122
const accounts = await viem.getWalletClients();
@@ -106,13 +107,13 @@ const deployWhitelistOracleContracts: DeployFunction = async function (hre: Hard
106107
});
107108
console.log(`Initial median price: ${medianPrice.toString()}`);
108109

109-
if (deployer !== whitelistContractOwner) {
110+
if (deployer !== whitelistContractNewOwner) {
110111
console.log("Transferring ownership of WhitelistOracle");
111112
await deployerAccount.writeContract({
112113
address: whitelistOracleAddress,
113114
abi: whitelistOracleAbi,
114115
functionName: "transferOwnership",
115-
args: [whitelistContractOwner],
116+
args: [whitelistContractNewOwner],
116117
});
117118
console.log("Ownership transferred successfully!");
118119
}

0 commit comments

Comments
 (0)