Skip to content

Commit c4108c6

Browse files
committed
fix: feedback
1 parent 8a5e111 commit c4108c6

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

e2e/multisig-migration.test.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ describe("Should change LBC owner to the multisig.ts", function () {
150150

151151
console.info(`Impersonated account: ${impersonatedSigner.address}`);
152152

153-
// Call changeMultisigOwner
153+
// Call changeMultisigOwner and ensure the Promise is fulfilled
154154
await expect(
155155
changeMultisigOwner(
156156
multisigAddress,
157157
deploymentNetwork,
158158
impersonatedSigner
159159
)
160-
).to.not.be.reverted;
160+
).to.eventually.be.fulfilled;
161161

162162
const newOwner = await contract.owner();
163163
console.info(`New owner: ${newOwner}`);
@@ -167,13 +167,24 @@ describe("Should change LBC owner to the multisig.ts", function () {
167167

168168
// Verify old owner can no longer perform owner functions
169169
const adminAddress = await upgrades.erc1967.getAdminAddress(proxyAddress);
170-
const adminContract = await ethers.getContractAt(
170+
171+
// Get the ProxyAdmin contract instance
172+
const proxyAdminContract = await ethers.getContractAt(
171173
"LiquidityBridgeContractAdmin",
172174
adminAddress
173175
);
176+
177+
// Attempt an upgrade with the former owner to ensure permissions were revoked
178+
const adminContract = proxyAdminContract.connect(impersonatedSigner);
174179
await expect(
175180
adminContract.upgrade(proxyAddress, multisigAddress)
176-
).to.revertedWith("Ownable: caller is not the owner");
181+
).to.be.revertedWith("Ownable: caller is not the owner");
182+
183+
// Verify the ProxyAdmin owner was also updated
184+
const proxyAdminOwner = await proxyAdminContract.owner();
185+
expect(proxyAdminOwner.toLowerCase()).to.equal(
186+
multisigAddress.toLowerCase()
187+
);
177188

178189
console.info(
179190
`Ownership of LiquidityBridgeContract proxy changed to multisig in ${deploymentNetwork}`

hardhat.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const config: HardhatUserConfig = {
5555
accounts: getAccounts("mainnet"),
5656
},
5757
tenderly: {
58-
url: process.env.FORK_NETWORK_URL ?? "https://public-node.testnet.rsk.co",
58+
url: process.env.FORK_NETWORK_URL,
5959
chainId: 30,
6060
timeout: rpcDefaultTimeout,
6161
},

0 commit comments

Comments
 (0)