@@ -158,7 +158,11 @@ const options = {
158
158
describe : "Skip contract verification" ,
159
159
type : "boolean" ,
160
160
default : false ,
161
- }
161
+ } ,
162
+ payer : {
163
+ describe : "Path to the payer json file (Solana)" ,
164
+ type : "string" ,
165
+ } ,
162
166
} as const ;
163
167
164
168
@@ -573,23 +577,26 @@ yargs(hideBin(process.argv))
573
577
. option ( "signer-type" , options . signerType )
574
578
. option ( "verbose" , options . verbose )
575
579
. option ( "skip-verify" , options . skipVerify )
580
+ . option ( "payer" , options . payer )
576
581
. example ( "$0 push" , "Push local configuration changes to the blockchain" )
577
582
. example ( "$0 push --signer-type ledger" , "Push changes using a Ledger hardware wallet for signing" )
578
- . example ( "$0 push --skip-verify" , "Push changes without verifying contracts on EVM chains" ) ,
583
+ . example ( "$0 push --skip-verify" , "Push changes without verifying contracts on EVM chains" )
584
+ . example ( "$0 push --payer <SOLANA_KEYPAIR_PATH>" , "Path to the payer json file (Solana), instead of setting SOLANA_PRIVATE_KEY env variable" ) ,
579
585
async ( argv ) => {
580
586
const deployments : Config = loadConfig ( argv [ "path" ] ) ;
581
587
const verbose = argv [ "verbose" ] ;
582
588
const network = deployments . network as Network ;
583
589
const deps : Partial < { [ C in Chain ] : Deployment < Chain > } > = await pullDeployments ( deployments , network , verbose ) ;
584
590
const signerType = argv [ "signer-type" ] as SignerType ;
591
+ const payerPath = argv [ "payer" ] ;
585
592
586
593
const missing = await missingConfigs ( deps , verbose ) ;
587
594
588
595
for ( const [ chain , missingConfig ] of Object . entries ( missing ) ) {
589
596
assertChain ( chain ) ;
590
597
const ntt = deps [ chain ] ! . ntt ;
591
598
const ctx = deps [ chain ] ! . ctx ;
592
- const signer = await getSigner ( ctx , signerType )
599
+ const signer = await getSigner ( ctx , signerType , undefined , payerPath ) ;
593
600
for ( const manager of missingConfig . managerPeers ) {
594
601
const tx = ntt . setPeer ( manager . address , manager . tokenDecimals , manager . inboundLimit , signer . address . address )
595
602
await signSendWait ( ctx , tx , signer . signer )
@@ -613,7 +620,7 @@ yargs(hideBin(process.argv))
613
620
614
621
for ( const [ chain , deployment ] of Object . entries ( depsAfterRegistrations ) ) {
615
622
assertChain ( chain ) ;
616
- await pushDeployment ( deployment as any , signerType , ! argv [ "skip-verify" ] , argv [ "yes" ] ) ;
623
+ await pushDeployment ( deployment as any , signerType , ! argv [ "skip-verify" ] , argv [ "yes" ] , payerPath ) ;
617
624
}
618
625
} )
619
626
. command ( "status" ,
@@ -1129,6 +1136,7 @@ async function deploySolana<N extends Network, C extends SolanaChains>(
1129
1136
binary = `${ pwd } /solana/target/deploy/example_native_token_transfers.so` ;
1130
1137
}
1131
1138
1139
+
1132
1140
await checkSolanaBinary ( binary , wormhole , providedProgramId )
1133
1141
1134
1142
// do the actual deployment
@@ -1254,7 +1262,7 @@ async function missingConfigs(
1254
1262
return missingConfigs ;
1255
1263
}
1256
1264
1257
- async function pushDeployment < C extends Chain > ( deployment : Deployment < C > , signerType : SignerType , evmVerify : boolean , yes : boolean ) : Promise < void > {
1265
+ async function pushDeployment < C extends Chain > ( deployment : Deployment < C > , signerType : SignerType , evmVerify : boolean , yes : boolean , filePath ?: string ) : Promise < void > {
1258
1266
const diff = diffObjects ( deployment . config . local ! , deployment . config . remote ! ) ;
1259
1267
if ( Object . keys ( diff ) . length === 0 ) {
1260
1268
return ;
@@ -1270,7 +1278,7 @@ async function pushDeployment<C extends Chain>(deployment: Deployment<C>, signer
1270
1278
1271
1279
const ctx = deployment . ctx ;
1272
1280
1273
- const signer = await getSigner ( ctx , signerType ) ;
1281
+ const signer = await getSigner ( ctx , signerType , undefined , filePath ) ;
1274
1282
1275
1283
let txs = [ ] ;
1276
1284
// we perform this last to make sure we don't accidentally lock ourselves out
0 commit comments