Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybuidl committed Oct 16, 2023
1 parent 2a0bea5 commit 51ef929
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions contracts/deploy/utils/deployUpgradable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const deployUpgradable = async (
}
: {};

let fullOptions: DeployOptions = {
const fullOptions: DeployOptions = {
...otherOptions,
...contract,
proxy: {
Expand All @@ -66,5 +66,5 @@ export const deployUpgradable = async (
};

// console.debug("fullOptions: ", JSON.stringify(fullOptions));
return await deploy(proxy, fullOptions);
return deploy(proxy, fullOptions);
};
10 changes: 5 additions & 5 deletions contracts/test/proxy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});
Expand Down

0 comments on commit 51ef929

Please sign in to comment.