File tree 2 files changed +7
-7
lines changed
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 (
46
46
}
47
47
: { } ;
48
48
49
- let fullOptions : DeployOptions = {
49
+ const fullOptions : DeployOptions = {
50
50
...otherOptions ,
51
51
...contract ,
52
52
proxy : {
@@ -66,5 +66,5 @@ export const deployUpgradable = async (
66
66
} ;
67
67
68
68
// console.debug("fullOptions: ", JSON.stringify(fullOptions));
69
- return await deploy ( proxy , fullOptions ) ;
69
+ return deploy ( proxy , fullOptions ) ;
70
70
} ;
Original file line number Diff line number Diff line change @@ -92,16 +92,16 @@ describe("Upgradability", async () => {
92
92
it ( "Only the governor (deployer here) can perform upgrades" , async ( ) => {
93
93
// Unauthorized user try to upgrade the implementation
94
94
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 (
97
97
"No privilege to upgrade"
98
98
) ;
99
99
100
100
// 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" ) )
103
103
. to . emit ( proxy , "Upgraded" )
104
- . withArgs ( implementation . address ) ;
104
+ . withArgs ( upgradable . address ) ;
105
105
} ) ;
106
106
} ) ;
107
107
} ) ;
You can’t perform that action at this time.
0 commit comments