@@ -4,8 +4,20 @@ import { TaskArguments } from "hardhat/types";
4
4
import { sleep } from "./tools" ;
5
5
6
6
task ( "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
+ )
9
21
. setAction ( async function ( args : TaskArguments , hre ) {
10
22
const { factory, address } = args ;
11
23
const Factory = await hre . ethers . getContractFactory ( factory ) ;
@@ -23,8 +35,20 @@ task("validate_upgrade")
23
35
} ) ;
24
36
25
37
task ( "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
+ )
28
52
. addParam ( "fromIdx" , "the index of sender" , 0 , types . int )
29
53
. setAction ( async function ( args : TaskArguments , hre ) {
30
54
const { factory, address } = args ;
@@ -52,8 +76,20 @@ task("prepare_upgrade")
52
76
} ) ;
53
77
54
78
task ( "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
+ )
57
93
. addParam ( "fromIdx" , "the index of sender" , 0 , types . int )
58
94
. setAction ( async function ( args : TaskArguments , hre ) {
59
95
const signer = ( await hre . ethers . getSigners ( ) ) [ args . fromIdx ] ;
@@ -64,7 +100,10 @@ task("upgrade:testnet")
64
100
const Factory = await hre . ethers . getContractFactory ( factory ) ;
65
101
66
102
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
+ ) ;
68
107
69
108
const impl = await hre . upgrades . upgradeProxy ( address , Factory , {
70
109
unsafeAllowRenames : true ,
0 commit comments