Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove lowercasing addresses; compare checksummed addresses
Browse files Browse the repository at this point in the history
coreyar committed Oct 16, 2024
1 parent e4a1558 commit e1cfa65
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deploy/012-transfer-pools-ownership.ts
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ const transfer2StepOwnerships = async (contractNames: string[], targetOwner: str
const pendingOwner = await contract.pendingOwner();

let tx;
if (owner.toLowerCase() !== targetOwner.toLowerCase() && pendingOwner.toLowerCase() !== targetOwner.toLowerCase()) {
if (owner !== targetOwner && pendingOwner !== targetOwner) {
tx = await contract.transferOwnership(targetOwner);
await tx.wait(1);
const pendingOwner = await contract.pendingOwner();
@@ -36,7 +36,7 @@ const transferSingleStepOwnerships = async (contractNames: string[], targetOwner
const owner = await contract.owner();

let tx;
if (owner.toLowerCase() !== targetOwner.toLowerCase()) {
if (owner !== targetOwner) {
tx = await contract.transferOwnership(targetOwner);
await tx.wait(1);
const newOwner = await contract.owner();
2 changes: 1 addition & 1 deletion deploy/018-native-token-gateway.ts
Original file line number Diff line number Diff line change
@@ -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 && (await nativeTokenGateway.owner()).toLowerCase() !== targetOwner.toLowerCase()) {
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`);

0 comments on commit e1cfa65

Please sign in to comment.