File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export const deployUpgradable = async (
4646 }
4747 : { } ;
4848
49- let fullOptions : DeployOptions = {
49+ const fullOptions : DeployOptions = {
5050 ...otherOptions ,
5151 ...contract ,
5252 proxy : {
@@ -66,5 +66,5 @@ export const deployUpgradable = async (
6666 } ;
6767
6868 // console.debug("fullOptions: ", JSON.stringify(fullOptions));
69- return await deploy ( proxy , fullOptions ) ;
69+ return deploy ( proxy , fullOptions ) ;
7070} ;
Original file line number Diff line number Diff line change @@ -92,16 +92,16 @@ describe("Upgradability", async () => {
9292 it ( "Only the governor (deployer here) can perform upgrades" , async ( ) => {
9393 // Unauthorized user try to upgrade the implementation
9494 const UUPSUpgradeableMockV2Factory = await ethers . getContractFactory ( "UUPSUpgradeableMockV2" ) ;
95- let implementation = await UUPSUpgradeableMockV2Factory . connect ( user1 ) . deploy ( ) ;
96- await expect ( proxy . connect ( user1 ) . upgradeToAndCall ( implementation . address , "0x" ) ) . to . be . revertedWith (
95+ let upgradable = await UUPSUpgradeableMockV2Factory . connect ( user1 ) . deploy ( ) ;
96+ await expect ( proxy . connect ( user1 ) . upgradeToAndCall ( upgradable . address , "0x" ) ) . to . be . revertedWith (
9797 "No privilege to upgrade"
9898 ) ;
9999
100100 // Governor updates the implementation
101- implementation = await UUPSUpgradeableMockV2Factory . connect ( deployer ) . deploy ( ) ;
102- await expect ( proxy . connect ( deployer ) . upgradeToAndCall ( implementation . address , "0x" ) )
101+ upgradable = await UUPSUpgradeableMockV2Factory . connect ( deployer ) . deploy ( ) ;
102+ await expect ( proxy . connect ( deployer ) . upgradeToAndCall ( upgradable . address , "0x" ) )
103103 . to . emit ( proxy , "Upgraded" )
104- . withArgs ( implementation . address ) ;
104+ . withArgs ( upgradable . address ) ;
105105 } ) ;
106106 } ) ;
107107 } ) ;
You can’t perform that action at this time.
0 commit comments