@@ -4,8 +4,20 @@ import { TaskArguments } from "hardhat/types";
44import  {  sleep  }  from  "./tools" ; 
55
66task ( "validate_upgrade" ) 
7-   . addPositionalParam ( "factory" ,  "the name of the factory" ,  undefined ,  types . string ,  false ) 
8-   . addPositionalParam ( "address" ,  "the address of the deployed proxy contract" ,  undefined ,  types . string ,  false ) 
7+   . addPositionalParam ( 
8+     "factory" , 
9+     "the name of the factory" , 
10+     undefined , 
11+     types . string , 
12+     false , 
13+   ) 
14+   . addPositionalParam ( 
15+     "address" , 
16+     "the address of the deployed proxy contract" , 
17+     undefined , 
18+     types . string , 
19+     false , 
20+   ) 
921  . setAction ( async  function  ( args : TaskArguments ,  hre )  { 
1022    const  {  factory,  address }  =  args ; 
1123    const  Factory  =  await  hre . ethers . getContractFactory ( factory ) ; 
@@ -23,8 +35,20 @@ task("validate_upgrade")
2335  } ) ; 
2436
2537task ( "prepare_upgrade" ) 
26-   . addPositionalParam ( "factory" ,  "the name of the factory" ,  undefined ,  types . string ,  false ) 
27-   . addPositionalParam ( "address" ,  "the address of the deployed proxy contract" ,  undefined ,  types . string ,  false ) 
38+   . addPositionalParam ( 
39+     "factory" , 
40+     "the name of the factory" , 
41+     undefined , 
42+     types . string , 
43+     false , 
44+   ) 
45+   . addPositionalParam ( 
46+     "address" , 
47+     "the address of the deployed proxy contract" , 
48+     undefined , 
49+     types . string , 
50+     false , 
51+   ) 
2852  . addParam ( "fromIdx" ,  "the index of sender" ,  0 ,  types . int ) 
2953  . setAction ( async  function  ( args : TaskArguments ,  hre )  { 
3054    const  {  factory,  address }  =  args ; 
@@ -52,8 +76,20 @@ task("prepare_upgrade")
5276  } ) ; 
5377
5478task ( "upgrade:testnet" ) 
55-   . addPositionalParam ( "factory" ,  "the name of the factory" ,  undefined ,  types . string ,  false ) 
56-   . addPositionalParam ( "address" ,  "the address of the deployed proxy contract" ,  undefined ,  types . string ,  false ) 
79+   . addPositionalParam ( 
80+     "factory" , 
81+     "the name of the factory" , 
82+     undefined , 
83+     types . string , 
84+     false , 
85+   ) 
86+   . addPositionalParam ( 
87+     "address" , 
88+     "the address of the deployed proxy contract" , 
89+     undefined , 
90+     types . string , 
91+     false , 
92+   ) 
5793  . addParam ( "fromIdx" ,  "the index of sender" ,  0 ,  types . int ) 
5894  . setAction ( async  function  ( args : TaskArguments ,  hre )  { 
5995    const  signer  =  ( await  hre . ethers . getSigners ( ) ) [ args . fromIdx ] ; 
@@ -64,7 +100,10 @@ task("upgrade:testnet")
64100    const  Factory  =  await  hre . ethers . getContractFactory ( factory ) ; 
65101
66102    console . log ( "Proxy" ,  address ) ; 
67-     console . log ( "Current implementation" ,  await  getImplementationAddress ( hre . ethers . provider ,  address ) ) ; 
103+     console . log ( 
104+       "Current implementation" , 
105+       await  getImplementationAddress ( hre . ethers . provider ,  address ) , 
106+     ) ; 
68107
69108    const  impl  =  await  hre . upgrades . upgradeProxy ( address ,  Factory ,  { 
70109      unsafeAllowRenames : true , 
0 commit comments