Skip to main content

satrush_client/generated/instructions/
swap_strike_stake.rs

1//! This code was AUTOGENERATED using the codama library.
2//! Please DO NOT EDIT THIS FILE, instead use visitors
3//! to add features, then rerun codama to update it.
4//!
5//! <https://github.com/codama-idl/codama>
6//!
7
8use borsh::BorshSerialize;
9use borsh::BorshDeserialize;
10
11pub const SWAP_STRIKE_STAKE_DISCRIMINATOR: [u8; 8] = [129, 112, 9, 43, 91, 154, 157, 135];
12
13/// Accounts.
14#[derive(Debug)]
15pub struct SwapStrikeStake {
16            /// The jackpots-swap keeper (the configured round authority).
17
18    
19              
20          pub authority: solana_address::Address,
21          
22              
23          pub satrush_config: solana_address::Address,
24                /// PDA that owns the token pools, holds the jackpots counters, and signs the swap CPI.
25
26    
27              
28          pub board: solana_address::Address,
29          
30              
31          pub usd_mint: solana_address::Address,
32          
33              
34          pub btc_mint: solana_address::Address,
35                /// Board's USD pool — the swap source.
36
37    
38              
39          pub board_usd_ata: solana_address::Address,
40                /// Board's BTC reserves — the swap destination.
41
42    
43              
44          pub board_btc_ata: solana_address::Address,
45                /// hardcoded `jupiter_program()` (mock under the `mock-swap` feature).
46
47    
48              
49          pub swap_program: solana_address::Address,
50          
51              
52          pub token_program: solana_address::Address,
53      }
54
55impl SwapStrikeStake {
56  pub fn instruction(&self, args: SwapStrikeStakeInstructionArgs) -> solana_instruction::Instruction {
57    self.instruction_with_remaining_accounts(args, &[])
58  }
59  #[allow(clippy::arithmetic_side_effects)]
60  #[allow(clippy::vec_init_then_push)]
61  pub fn instruction_with_remaining_accounts(&self, args: SwapStrikeStakeInstructionArgs, remaining_accounts: &[solana_instruction::AccountMeta]) -> solana_instruction::Instruction {
62    let mut accounts = Vec::with_capacity(9+ remaining_accounts.len());
63                            accounts.push(solana_instruction::AccountMeta::new_readonly(
64            self.authority,
65            true
66          ));
67                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
68            self.satrush_config,
69            false
70          ));
71                                          accounts.push(solana_instruction::AccountMeta::new(
72            self.board,
73            false
74          ));
75                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
76            self.usd_mint,
77            false
78          ));
79                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
80            self.btc_mint,
81            false
82          ));
83                                          accounts.push(solana_instruction::AccountMeta::new(
84            self.board_usd_ata,
85            false
86          ));
87                                          accounts.push(solana_instruction::AccountMeta::new(
88            self.board_btc_ata,
89            false
90          ));
91                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
92            self.swap_program,
93            false
94          ));
95                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
96            self.token_program,
97            false
98          ));
99                      accounts.extend_from_slice(remaining_accounts);
100    let mut data = SwapStrikeStakeInstructionData::new().try_to_vec().unwrap();
101          let mut args = args.try_to_vec().unwrap();
102      data.append(&mut args);
103    
104    solana_instruction::Instruction {
105      program_id: crate::SATRUSH_ID,
106      accounts,
107      data,
108    }
109  }
110}
111
112#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
113 pub struct SwapStrikeStakeInstructionData {
114            discriminator: [u8; 8],
115                  }
116
117impl SwapStrikeStakeInstructionData {
118  pub fn new() -> Self {
119    Self {
120                        discriminator: [129, 112, 9, 43, 91, 154, 157, 135],
121                                              }
122  }
123
124    pub(crate) fn try_to_vec(&self) -> Result<Vec<u8>, std::io::Error> {
125    borsh::to_vec(self)
126  }
127  }
128
129impl Default for SwapStrikeStakeInstructionData {
130  fn default() -> Self {
131    Self::new()
132  }
133}
134
135#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
136 pub struct SwapStrikeStakeInstructionArgs {
137                  pub min_btc_out: u64,
138                pub swap_data: Vec<u8>,
139      }
140
141impl SwapStrikeStakeInstructionArgs {
142  pub(crate) fn try_to_vec(&self) -> Result<Vec<u8>, std::io::Error> {
143    borsh::to_vec(self)
144  }
145}
146
147
148/// Instruction builder for `SwapStrikeStake`.
149///
150/// ### Accounts:
151///
152                ///   0. `[signer]` authority
153          ///   1. `[]` satrush_config
154                ///   2. `[writable]` board
155          ///   3. `[]` usd_mint
156          ///   4. `[]` btc_mint
157                ///   5. `[writable]` board_usd_ata
158                ///   6. `[writable]` board_btc_ata
159                ///   7. `[optional]` swap_program (default to `JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4`)
160                ///   8. `[optional]` token_program (default to `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`)
161#[derive(Clone, Debug, Default)]
162pub struct SwapStrikeStakeBuilder {
163            authority: Option<solana_address::Address>,
164                satrush_config: Option<solana_address::Address>,
165                board: Option<solana_address::Address>,
166                usd_mint: Option<solana_address::Address>,
167                btc_mint: Option<solana_address::Address>,
168                board_usd_ata: Option<solana_address::Address>,
169                board_btc_ata: Option<solana_address::Address>,
170                swap_program: Option<solana_address::Address>,
171                token_program: Option<solana_address::Address>,
172                        min_btc_out: Option<u64>,
173                swap_data: Option<Vec<u8>>,
174        __remaining_accounts: Vec<solana_instruction::AccountMeta>,
175}
176
177impl SwapStrikeStakeBuilder {
178  pub fn new() -> Self {
179    Self::default()
180  }
181            /// The jackpots-swap keeper (the configured round authority).
182#[inline(always)]
183    pub fn authority(&mut self, authority: solana_address::Address) -> &mut Self {
184                        self.authority = Some(authority);
185                    self
186    }
187            #[inline(always)]
188    pub fn satrush_config(&mut self, satrush_config: solana_address::Address) -> &mut Self {
189                        self.satrush_config = Some(satrush_config);
190                    self
191    }
192            /// PDA that owns the token pools, holds the jackpots counters, and signs the swap CPI.
193#[inline(always)]
194    pub fn board(&mut self, board: solana_address::Address) -> &mut Self {
195                        self.board = Some(board);
196                    self
197    }
198            #[inline(always)]
199    pub fn usd_mint(&mut self, usd_mint: solana_address::Address) -> &mut Self {
200                        self.usd_mint = Some(usd_mint);
201                    self
202    }
203            #[inline(always)]
204    pub fn btc_mint(&mut self, btc_mint: solana_address::Address) -> &mut Self {
205                        self.btc_mint = Some(btc_mint);
206                    self
207    }
208            /// Board's USD pool — the swap source.
209#[inline(always)]
210    pub fn board_usd_ata(&mut self, board_usd_ata: solana_address::Address) -> &mut Self {
211                        self.board_usd_ata = Some(board_usd_ata);
212                    self
213    }
214            /// Board's BTC reserves — the swap destination.
215#[inline(always)]
216    pub fn board_btc_ata(&mut self, board_btc_ata: solana_address::Address) -> &mut Self {
217                        self.board_btc_ata = Some(board_btc_ata);
218                    self
219    }
220            /// `[optional account, default to 'JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4']`
221/// hardcoded `jupiter_program()` (mock under the `mock-swap` feature).
222#[inline(always)]
223    pub fn swap_program(&mut self, swap_program: solana_address::Address) -> &mut Self {
224                        self.swap_program = Some(swap_program);
225                    self
226    }
227            /// `[optional account, default to 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA']`
228#[inline(always)]
229    pub fn token_program(&mut self, token_program: solana_address::Address) -> &mut Self {
230                        self.token_program = Some(token_program);
231                    self
232    }
233                    #[inline(always)]
234      pub fn min_btc_out(&mut self, min_btc_out: u64) -> &mut Self {
235        self.min_btc_out = Some(min_btc_out);
236        self
237      }
238                #[inline(always)]
239      pub fn swap_data(&mut self, swap_data: Vec<u8>) -> &mut Self {
240        self.swap_data = Some(swap_data);
241        self
242      }
243        /// Add an additional account to the instruction.
244  #[inline(always)]
245  pub fn add_remaining_account(&mut self, account: solana_instruction::AccountMeta) -> &mut Self {
246    self.__remaining_accounts.push(account);
247    self
248  }
249  /// Add additional accounts to the instruction.
250  #[inline(always)]
251  pub fn add_remaining_accounts(&mut self, accounts: &[solana_instruction::AccountMeta]) -> &mut Self {
252    self.__remaining_accounts.extend_from_slice(accounts);
253    self
254  }
255  #[allow(clippy::clone_on_copy)]
256  pub fn instruction(&self) -> solana_instruction::Instruction {
257    let accounts = SwapStrikeStake {
258                              authority: self.authority.expect("authority is not set"),
259                                        satrush_config: self.satrush_config.expect("satrush_config is not set"),
260                                        board: self.board.expect("board is not set"),
261                                        usd_mint: self.usd_mint.expect("usd_mint is not set"),
262                                        btc_mint: self.btc_mint.expect("btc_mint is not set"),
263                                        board_usd_ata: self.board_usd_ata.expect("board_usd_ata is not set"),
264                                        board_btc_ata: self.board_btc_ata.expect("board_btc_ata is not set"),
265                                        swap_program: self.swap_program.unwrap_or(solana_address::address!("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4")),
266                                        token_program: self.token_program.unwrap_or(solana_address::address!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA")),
267                      };
268          let args = SwapStrikeStakeInstructionArgs {
269                                                              min_btc_out: self.min_btc_out.clone().expect("min_btc_out is not set"),
270                                                                  swap_data: self.swap_data.clone().expect("swap_data is not set"),
271                                    };
272    
273    accounts.instruction_with_remaining_accounts(args, &self.__remaining_accounts)
274  }
275}
276
277  /// `swap_strike_stake` CPI accounts.
278  pub struct SwapStrikeStakeCpiAccounts<'a, 'b> {
279                  /// The jackpots-swap keeper (the configured round authority).
280
281      
282                    
283              pub authority: &'b solana_account_info::AccountInfo<'a>,
284                
285                    
286              pub satrush_config: &'b solana_account_info::AccountInfo<'a>,
287                        /// PDA that owns the token pools, holds the jackpots counters, and signs the swap CPI.
288
289      
290                    
291              pub board: &'b solana_account_info::AccountInfo<'a>,
292                
293                    
294              pub usd_mint: &'b solana_account_info::AccountInfo<'a>,
295                
296                    
297              pub btc_mint: &'b solana_account_info::AccountInfo<'a>,
298                        /// Board's USD pool — the swap source.
299
300      
301                    
302              pub board_usd_ata: &'b solana_account_info::AccountInfo<'a>,
303                        /// Board's BTC reserves — the swap destination.
304
305      
306                    
307              pub board_btc_ata: &'b solana_account_info::AccountInfo<'a>,
308                        /// hardcoded `jupiter_program()` (mock under the `mock-swap` feature).
309
310      
311                    
312              pub swap_program: &'b solana_account_info::AccountInfo<'a>,
313                
314                    
315              pub token_program: &'b solana_account_info::AccountInfo<'a>,
316            }
317
318/// `swap_strike_stake` CPI instruction.
319pub struct SwapStrikeStakeCpi<'a, 'b> {
320  /// The program to invoke.
321  pub __program: &'b solana_account_info::AccountInfo<'a>,
322            /// The jackpots-swap keeper (the configured round authority).
323
324    
325              
326          pub authority: &'b solana_account_info::AccountInfo<'a>,
327          
328              
329          pub satrush_config: &'b solana_account_info::AccountInfo<'a>,
330                /// PDA that owns the token pools, holds the jackpots counters, and signs the swap CPI.
331
332    
333              
334          pub board: &'b solana_account_info::AccountInfo<'a>,
335          
336              
337          pub usd_mint: &'b solana_account_info::AccountInfo<'a>,
338          
339              
340          pub btc_mint: &'b solana_account_info::AccountInfo<'a>,
341                /// Board's USD pool — the swap source.
342
343    
344              
345          pub board_usd_ata: &'b solana_account_info::AccountInfo<'a>,
346                /// Board's BTC reserves — the swap destination.
347
348    
349              
350          pub board_btc_ata: &'b solana_account_info::AccountInfo<'a>,
351                /// hardcoded `jupiter_program()` (mock under the `mock-swap` feature).
352
353    
354              
355          pub swap_program: &'b solana_account_info::AccountInfo<'a>,
356          
357              
358          pub token_program: &'b solana_account_info::AccountInfo<'a>,
359            /// The arguments for the instruction.
360    pub __args: SwapStrikeStakeInstructionArgs,
361  }
362
363impl<'a, 'b> SwapStrikeStakeCpi<'a, 'b> {
364  pub fn new(
365    program: &'b solana_account_info::AccountInfo<'a>,
366          accounts: SwapStrikeStakeCpiAccounts<'a, 'b>,
367              args: SwapStrikeStakeInstructionArgs,
368      ) -> Self {
369    Self {
370      __program: program,
371              authority: accounts.authority,
372              satrush_config: accounts.satrush_config,
373              board: accounts.board,
374              usd_mint: accounts.usd_mint,
375              btc_mint: accounts.btc_mint,
376              board_usd_ata: accounts.board_usd_ata,
377              board_btc_ata: accounts.board_btc_ata,
378              swap_program: accounts.swap_program,
379              token_program: accounts.token_program,
380                    __args: args,
381          }
382  }
383  #[inline(always)]
384  pub fn invoke(&self) -> solana_program_error::ProgramResult {
385    self.invoke_signed_with_remaining_accounts(&[], &[])
386  }
387  #[inline(always)]
388  pub fn invoke_with_remaining_accounts(&self, remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> solana_program_error::ProgramResult {
389    self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
390  }
391  #[inline(always)]
392  pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program_error::ProgramResult {
393    self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
394  }
395  #[allow(clippy::arithmetic_side_effects)]
396  #[allow(clippy::clone_on_copy)]
397  #[allow(clippy::vec_init_then_push)]
398  pub fn invoke_signed_with_remaining_accounts(
399    &self,
400    signers_seeds: &[&[&[u8]]],
401    remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]
402  ) -> solana_program_error::ProgramResult {
403    let mut accounts = Vec::with_capacity(9+ remaining_accounts.len());
404                            accounts.push(solana_instruction::AccountMeta::new_readonly(
405            *self.authority.key,
406            true
407          ));
408                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
409            *self.satrush_config.key,
410            false
411          ));
412                                          accounts.push(solana_instruction::AccountMeta::new(
413            *self.board.key,
414            false
415          ));
416                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
417            *self.usd_mint.key,
418            false
419          ));
420                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
421            *self.btc_mint.key,
422            false
423          ));
424                                          accounts.push(solana_instruction::AccountMeta::new(
425            *self.board_usd_ata.key,
426            false
427          ));
428                                          accounts.push(solana_instruction::AccountMeta::new(
429            *self.board_btc_ata.key,
430            false
431          ));
432                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
433            *self.swap_program.key,
434            false
435          ));
436                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
437            *self.token_program.key,
438            false
439          ));
440                      remaining_accounts.iter().for_each(|remaining_account| {
441      accounts.push(solana_instruction::AccountMeta {
442          pubkey: *remaining_account.0.key,
443          is_signer: remaining_account.1,
444          is_writable: remaining_account.2,
445      })
446    });
447    let mut data = SwapStrikeStakeInstructionData::new().try_to_vec().unwrap();
448          let mut args = self.__args.try_to_vec().unwrap();
449      data.append(&mut args);
450    
451    let instruction = solana_instruction::Instruction {
452      program_id: crate::SATRUSH_ID,
453      accounts,
454      data,
455    };
456    let mut account_infos = Vec::with_capacity(10 + remaining_accounts.len());
457    account_infos.push(self.__program.clone());
458                  account_infos.push(self.authority.clone());
459                        account_infos.push(self.satrush_config.clone());
460                        account_infos.push(self.board.clone());
461                        account_infos.push(self.usd_mint.clone());
462                        account_infos.push(self.btc_mint.clone());
463                        account_infos.push(self.board_usd_ata.clone());
464                        account_infos.push(self.board_btc_ata.clone());
465                        account_infos.push(self.swap_program.clone());
466                        account_infos.push(self.token_program.clone());
467              remaining_accounts.iter().for_each(|remaining_account| account_infos.push(remaining_account.0.clone()));
468
469    if signers_seeds.is_empty() {
470      solana_cpi::invoke(&instruction, &account_infos)
471    } else {
472      solana_cpi::invoke_signed(&instruction, &account_infos, signers_seeds)
473    }
474  }
475}
476
477/// Instruction builder for `SwapStrikeStake` via CPI.
478///
479/// ### Accounts:
480///
481                ///   0. `[signer]` authority
482          ///   1. `[]` satrush_config
483                ///   2. `[writable]` board
484          ///   3. `[]` usd_mint
485          ///   4. `[]` btc_mint
486                ///   5. `[writable]` board_usd_ata
487                ///   6. `[writable]` board_btc_ata
488          ///   7. `[]` swap_program
489          ///   8. `[]` token_program
490#[derive(Clone, Debug)]
491pub struct SwapStrikeStakeCpiBuilder<'a, 'b> {
492  instruction: Box<SwapStrikeStakeCpiBuilderInstruction<'a, 'b>>,
493}
494
495impl<'a, 'b> SwapStrikeStakeCpiBuilder<'a, 'b> {
496  pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
497    let instruction = Box::new(SwapStrikeStakeCpiBuilderInstruction {
498      __program: program,
499              authority: None,
500              satrush_config: None,
501              board: None,
502              usd_mint: None,
503              btc_mint: None,
504              board_usd_ata: None,
505              board_btc_ata: None,
506              swap_program: None,
507              token_program: None,
508                                            min_btc_out: None,
509                                swap_data: None,
510                    __remaining_accounts: Vec::new(),
511    });
512    Self { instruction }
513  }
514      /// The jackpots-swap keeper (the configured round authority).
515#[inline(always)]
516    pub fn authority(&mut self, authority: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
517                        self.instruction.authority = Some(authority);
518                    self
519    }
520      #[inline(always)]
521    pub fn satrush_config(&mut self, satrush_config: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
522                        self.instruction.satrush_config = Some(satrush_config);
523                    self
524    }
525      /// PDA that owns the token pools, holds the jackpots counters, and signs the swap CPI.
526#[inline(always)]
527    pub fn board(&mut self, board: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
528                        self.instruction.board = Some(board);
529                    self
530    }
531      #[inline(always)]
532    pub fn usd_mint(&mut self, usd_mint: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
533                        self.instruction.usd_mint = Some(usd_mint);
534                    self
535    }
536      #[inline(always)]
537    pub fn btc_mint(&mut self, btc_mint: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
538                        self.instruction.btc_mint = Some(btc_mint);
539                    self
540    }
541      /// Board's USD pool — the swap source.
542#[inline(always)]
543    pub fn board_usd_ata(&mut self, board_usd_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
544                        self.instruction.board_usd_ata = Some(board_usd_ata);
545                    self
546    }
547      /// Board's BTC reserves — the swap destination.
548#[inline(always)]
549    pub fn board_btc_ata(&mut self, board_btc_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
550                        self.instruction.board_btc_ata = Some(board_btc_ata);
551                    self
552    }
553      /// hardcoded `jupiter_program()` (mock under the `mock-swap` feature).
554#[inline(always)]
555    pub fn swap_program(&mut self, swap_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
556                        self.instruction.swap_program = Some(swap_program);
557                    self
558    }
559      #[inline(always)]
560    pub fn token_program(&mut self, token_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
561                        self.instruction.token_program = Some(token_program);
562                    self
563    }
564                    #[inline(always)]
565      pub fn min_btc_out(&mut self, min_btc_out: u64) -> &mut Self {
566        self.instruction.min_btc_out = Some(min_btc_out);
567        self
568      }
569                #[inline(always)]
570      pub fn swap_data(&mut self, swap_data: Vec<u8>) -> &mut Self {
571        self.instruction.swap_data = Some(swap_data);
572        self
573      }
574        /// Add an additional account to the instruction.
575  #[inline(always)]
576  pub fn add_remaining_account(&mut self, account: &'b solana_account_info::AccountInfo<'a>, is_writable: bool, is_signer: bool) -> &mut Self {
577    self.instruction.__remaining_accounts.push((account, is_writable, is_signer));
578    self
579  }
580  /// Add additional accounts to the instruction.
581  ///
582  /// Each account is represented by a tuple of the `AccountInfo`, a `bool` indicating whether the account is writable or not,
583  /// and a `bool` indicating whether the account is a signer or not.
584  #[inline(always)]
585  pub fn add_remaining_accounts(&mut self, accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> &mut Self {
586    self.instruction.__remaining_accounts.extend_from_slice(accounts);
587    self
588  }
589  #[inline(always)]
590  pub fn invoke(&self) -> solana_program_error::ProgramResult {
591    self.invoke_signed(&[])
592  }
593  #[allow(clippy::clone_on_copy)]
594  #[allow(clippy::vec_init_then_push)]
595  pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program_error::ProgramResult {
596          let args = SwapStrikeStakeInstructionArgs {
597                                                              min_btc_out: self.instruction.min_btc_out.clone().expect("min_btc_out is not set"),
598                                                                  swap_data: self.instruction.swap_data.clone().expect("swap_data is not set"),
599                                    };
600        let instruction = SwapStrikeStakeCpi {
601        __program: self.instruction.__program,
602                  
603          authority: self.instruction.authority.expect("authority is not set"),
604                  
605          satrush_config: self.instruction.satrush_config.expect("satrush_config is not set"),
606                  
607          board: self.instruction.board.expect("board is not set"),
608                  
609          usd_mint: self.instruction.usd_mint.expect("usd_mint is not set"),
610                  
611          btc_mint: self.instruction.btc_mint.expect("btc_mint is not set"),
612                  
613          board_usd_ata: self.instruction.board_usd_ata.expect("board_usd_ata is not set"),
614                  
615          board_btc_ata: self.instruction.board_btc_ata.expect("board_btc_ata is not set"),
616                  
617          swap_program: self.instruction.swap_program.expect("swap_program is not set"),
618                  
619          token_program: self.instruction.token_program.expect("token_program is not set"),
620                          __args: args,
621            };
622    instruction.invoke_signed_with_remaining_accounts(signers_seeds, &self.instruction.__remaining_accounts)
623  }
624}
625
626#[derive(Clone, Debug)]
627struct SwapStrikeStakeCpiBuilderInstruction<'a, 'b> {
628  __program: &'b solana_account_info::AccountInfo<'a>,
629            authority: Option<&'b solana_account_info::AccountInfo<'a>>,
630                satrush_config: Option<&'b solana_account_info::AccountInfo<'a>>,
631                board: Option<&'b solana_account_info::AccountInfo<'a>>,
632                usd_mint: Option<&'b solana_account_info::AccountInfo<'a>>,
633                btc_mint: Option<&'b solana_account_info::AccountInfo<'a>>,
634                board_usd_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
635                board_btc_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
636                swap_program: Option<&'b solana_account_info::AccountInfo<'a>>,
637                token_program: Option<&'b solana_account_info::AccountInfo<'a>>,
638                        min_btc_out: Option<u64>,
639                swap_data: Option<Vec<u8>>,
640        /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
641  __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
642}
643