@@ -29,40 +29,35 @@ yargs(hideBin(process.argv))
29
29
. command (
30
30
"deploy" ,
31
31
"deploy the solana program" ,
32
- ( yargs ) => {
33
- yargs . option ( "network" , NETWORK_OPTIONS )
34
- } ,
32
+ ( yargs ) => yargs . option ( "network" , NETWORK_OPTIONS ) ,
35
33
( argv ) => {
36
34
throw new Error ( "Not implemented" ) ;
37
35
} )
38
36
. command (
39
37
"upgrade" ,
40
38
"upgrade the solana program" ,
41
- ( yargs ) => {
42
- yargs
43
- . option ( "network" , NETWORK_OPTIONS )
44
- . option ( "dir" , {
45
- alias : "d" ,
46
- describe : "Path to the solana workspace" ,
47
- default : "." ,
48
- demandOption : false ,
49
- type : "string" ,
50
- } )
51
- . option ( "keypair" , {
52
- alias : "k" ,
53
- describe : "Path to the keypair" ,
54
- demandOption : true ,
55
- type : "string" ,
56
- } )
57
- } ,
39
+ ( yargs ) => yargs
40
+ . option ( "network" , NETWORK_OPTIONS )
41
+ . option ( "dir" , {
42
+ alias : "d" ,
43
+ describe : "Path to the solana workspace" ,
44
+ default : "." ,
45
+ demandOption : false ,
46
+ type : "string" ,
47
+ } )
48
+ . option ( "keypair" , {
49
+ alias : "k" ,
50
+ describe : "Path to the keypair" ,
51
+ demandOption : true ,
52
+ type : "string" ,
53
+ } ) ,
58
54
async ( argv ) => {
59
55
// TODO: the hardcoded stuff should be factored out once
60
56
// we support other networks and programs
61
57
// TODO: currently the keypair is the upgrade authority. we should support governance program too
62
- // TODO: why does typescript not like the yargs types?
63
- const network : string = argv . network as string ;
64
- const keypair : string = argv . keypair as string ;
65
- const dir : string = argv . dir as string ;
58
+ const network = argv . network ;
59
+ const keypair = argv . keypair ;
60
+ const dir = argv . dir ;
66
61
const objectFile = "example_native_token_transfers.so" ;
67
62
const programId = "nttiK1SepaQt6sZ4WGW5whvc9tEnGXGxuKeptcQPCcS" ;
68
63
assertNetwork ( network ) ;
0 commit comments