File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
target_chains/solana/cli/src Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ pub enum Action {
6767 about = "Initialize a wormhole receiver contract by sequentially replaying the guardian set updates"
6868 ) ]
6969 InitializeWormholeReceiver { } ,
70+ #[ clap( about = "Update the guardian set TTL to 24h" ) ]
71+ UpdateGuardianSetTtl { } ,
7072 InitializePythReceiver {
7173 #[ clap( short = 'f' , long, help = "Fee in lamports" ) ]
7274 fee : u64 ,
Original file line number Diff line number Diff line change 1616 solana_sdk:: {
1717 commitment_config:: CommitmentConfig ,
1818 compute_budget:: ComputeBudgetInstruction ,
19- instruction:: Instruction ,
19+ instruction:: { AccountMeta , Instruction } ,
2020 pubkey:: Pubkey ,
2121 rent:: Rent ,
2222 signature:: { read_keypair_file, Keypair } ,
@@ -195,6 +195,20 @@ fn main() -> Result<()> {
195195 }
196196 }
197197
198+ Action :: UpdateGuardianSetTtl { } => {
199+ let rpc_client = RpcClient :: new ( url) ;
200+ let payer =
201+ read_keypair_file ( & * shellexpand:: tilde ( & keypair) ) . expect ( "Keypair not found" ) ;
202+ let wormhole_config = BridgeConfig :: key ( & wormhole, ( ) ) ;
203+
204+ let instruction = Instruction {
205+ program_id : wormhole,
206+ accounts : vec ! [ AccountMeta :: new( wormhole_config, false ) ] ,
207+ data : vec ! [ 9 ] , // UpdateGuardianSetTtl
208+ } ;
209+ process_transaction ( & rpc_client, vec ! [ instruction] , & vec ! [ & payer] ) ?;
210+ }
211+
198212 Action :: InitializePythReceiver {
199213 fee,
200214 emitter,
You can’t perform that action at this time.
0 commit comments