Skip to content

Commit

Permalink
refactor: check owner before transfering
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Sep 26, 2024
1 parent cca355f commit b5e1722
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/018-native-token-gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const nativeTokenGateway = await ethers.getContract(`NativeTokenGateway_${vWNativeInfo.name}`);
const targetOwner = preconfiguredAddresses.NormalTimelock || deployer;
if (hre.network.live) {
if (hre.network.live && await nativeTokenGateway.owner() !== targetOwner) {
const tx = await nativeTokenGateway.transferOwnership(targetOwner);
await tx.wait();
console.log(`Transferred ownership of NativeTokenGateway_${vWNativeInfo.name} to Timelock`);
Expand Down

0 comments on commit b5e1722

Please sign in to comment.