From 51ef9295b793b2e7a1e37fcf19830f52bdffabe4 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Mon, 16 Oct 2023 23:45:32 +0100 Subject: [PATCH] fix: linting --- contracts/deploy/utils/deployUpgradable.ts | 4 ++-- contracts/test/proxy/index.ts | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contracts/deploy/utils/deployUpgradable.ts b/contracts/deploy/utils/deployUpgradable.ts index 66aeb295a..95908ac47 100644 --- a/contracts/deploy/utils/deployUpgradable.ts +++ b/contracts/deploy/utils/deployUpgradable.ts @@ -46,7 +46,7 @@ export const deployUpgradable = async ( } : {}; - let fullOptions: DeployOptions = { + const fullOptions: DeployOptions = { ...otherOptions, ...contract, proxy: { @@ -66,5 +66,5 @@ export const deployUpgradable = async ( }; // console.debug("fullOptions: ", JSON.stringify(fullOptions)); - return await deploy(proxy, fullOptions); + return deploy(proxy, fullOptions); }; diff --git a/contracts/test/proxy/index.ts b/contracts/test/proxy/index.ts index 81f5fbfc8..429a75323 100644 --- a/contracts/test/proxy/index.ts +++ b/contracts/test/proxy/index.ts @@ -92,16 +92,16 @@ describe("Upgradability", async () => { it("Only the governor (deployer here) can perform upgrades", async () => { // Unauthorized user try to upgrade the implementation const UUPSUpgradeableMockV2Factory = await ethers.getContractFactory("UUPSUpgradeableMockV2"); - let implementation = await UUPSUpgradeableMockV2Factory.connect(user1).deploy(); - await expect(proxy.connect(user1).upgradeToAndCall(implementation.address, "0x")).to.be.revertedWith( + let upgradable = await UUPSUpgradeableMockV2Factory.connect(user1).deploy(); + await expect(proxy.connect(user1).upgradeToAndCall(upgradable.address, "0x")).to.be.revertedWith( "No privilege to upgrade" ); // Governor updates the implementation - implementation = await UUPSUpgradeableMockV2Factory.connect(deployer).deploy(); - await expect(proxy.connect(deployer).upgradeToAndCall(implementation.address, "0x")) + upgradable = await UUPSUpgradeableMockV2Factory.connect(deployer).deploy(); + await expect(proxy.connect(deployer).upgradeToAndCall(upgradable.address, "0x")) .to.emit(proxy, "Upgraded") - .withArgs(implementation.address); + .withArgs(upgradable.address); }); }); });