Skip to main content

satrush_client/generated/instructions/
rotate_round.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 ROTATE_ROUND_DISCRIMINATOR: [u8; 8] = [3, 245, 202, 88, 161, 29, 51, 141];
12
13/// Accounts.
14#[derive(Debug)]
15pub struct RotateRound {
16      
17              
18          pub authority: solana_address::Address,
19          
20              
21          pub satrush_config: solana_address::Address,
22                /// Stays a regular `Account`: `get_next_round_id()` feeds `next_round`'s
23/// PDA seeds, which `LazyAccount` cannot serve.
24
25    
26              
27          pub board: solana_address::Address,
28                /// The current round being closed out (revealed). Lazy for the same stack
29/// reason as the config; its PDA derives from `board.round_id` (a plain
30/// field path the IDL seed parser can encode), which pins it to the
31/// board's current round with no separate id constraint.
32
33    
34              
35          pub current_round: solana_address::Address,
36                /// The freshly deployed next round, which becomes the board's active round.
37/// Its id is fixed by the seeds (`board.get_next_round_id()`); the handler
38/// populates it via `Round::try_new`.
39
40    
41              
42          pub next_round: solana_address::Address,
43                /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
44
45    
46              
47          pub usd_mint: solana_address::Address,
48                /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
49
50    
51              
52          pub btc_mint: solana_address::Address,
53                /// Board's USD pool where every deploy's full amount landed — the sweep source.
54
55    
56              
57          pub board_usd_ata: solana_address::Address,
58                /// Board's BTC jackpot reserves — the strike skim's BTC source.
59/// program validates mint and ownership on the transfer CPI. Unchecked for
60/// `try_accounts` stack headroom.
61
62    
63              
64          pub board_btc_ata: solana_address::Address,
65                /// Epoch Vault singleton — receives the round's accumulated epoch fee leg.
66
67    
68              
69          pub epoch_vault: solana_address::Address,
70          
71              
72          pub epoch_vault_usd_ata: solana_address::Address,
73                /// program validates mint and ownership on the transfer CPI. Unchecked for
74/// `try_accounts` stack headroom.
75
76    
77              
78          pub epoch_vault_btc_ata: solana_address::Address,
79                /// 1 BTC Vault singleton — receives the round's accumulated 1 BTC fee leg.
80
81    
82              
83          pub one_btc_vault: solana_address::Address,
84                /// transfer destination — the token program validates mint and ownership on
85/// the CPI. Unchecked for `try_accounts` stack headroom.
86
87    
88              
89          pub one_btc_vault_usd_ata: solana_address::Address,
90                /// Treasury singleton — receives the round's accumulated protocol fee leg.
91/// No seeds constraint: discriminator + owner checks pin the one Treasury
92/// instance that can ever exist (`init` on fixed seeds).
93
94    
95              
96          pub treasury: solana_address::Address,
97          
98              
99          pub treasury_usd_ata: solana_address::Address,
100                /// (`[b"rotor", b"round"]` under the rng program) and parsed manually —
101/// its settled randomness is the round's reveal entropy. Unchecked keeps
102/// this at the slot the SlotHashes sysvar used to occupy (`try_accounts`
103/// stack headroom).
104
105    
106              
107          pub round_rotor: solana_address::Address,
108          
109              
110          pub token_program: solana_address::Address,
111          
112              
113          pub system_program: solana_address::Address,
114          
115              
116          pub event_authority: solana_address::Address,
117          
118              
119          pub program: solana_address::Address,
120      }
121
122impl RotateRound {
123  pub fn instruction(&self) -> solana_instruction::Instruction {
124    self.instruction_with_remaining_accounts(&[])
125  }
126  #[allow(clippy::arithmetic_side_effects)]
127  #[allow(clippy::vec_init_then_push)]
128  pub fn instruction_with_remaining_accounts(&self, remaining_accounts: &[solana_instruction::AccountMeta]) -> solana_instruction::Instruction {
129    let mut accounts = Vec::with_capacity(21+ remaining_accounts.len());
130                            accounts.push(solana_instruction::AccountMeta::new(
131            self.authority,
132            true
133          ));
134                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
135            self.satrush_config,
136            false
137          ));
138                                          accounts.push(solana_instruction::AccountMeta::new(
139            self.board,
140            false
141          ));
142                                          accounts.push(solana_instruction::AccountMeta::new(
143            self.current_round,
144            false
145          ));
146                                          accounts.push(solana_instruction::AccountMeta::new(
147            self.next_round,
148            false
149          ));
150                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
151            self.usd_mint,
152            false
153          ));
154                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
155            self.btc_mint,
156            false
157          ));
158                                          accounts.push(solana_instruction::AccountMeta::new(
159            self.board_usd_ata,
160            false
161          ));
162                                          accounts.push(solana_instruction::AccountMeta::new(
163            self.board_btc_ata,
164            false
165          ));
166                                          accounts.push(solana_instruction::AccountMeta::new(
167            self.epoch_vault,
168            false
169          ));
170                                          accounts.push(solana_instruction::AccountMeta::new(
171            self.epoch_vault_usd_ata,
172            false
173          ));
174                                          accounts.push(solana_instruction::AccountMeta::new(
175            self.epoch_vault_btc_ata,
176            false
177          ));
178                                          accounts.push(solana_instruction::AccountMeta::new(
179            self.one_btc_vault,
180            false
181          ));
182                                          accounts.push(solana_instruction::AccountMeta::new(
183            self.one_btc_vault_usd_ata,
184            false
185          ));
186                                          accounts.push(solana_instruction::AccountMeta::new(
187            self.treasury,
188            false
189          ));
190                                          accounts.push(solana_instruction::AccountMeta::new(
191            self.treasury_usd_ata,
192            false
193          ));
194                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
195            self.round_rotor,
196            false
197          ));
198                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
199            self.token_program,
200            false
201          ));
202                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
203            self.system_program,
204            false
205          ));
206                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
207            self.event_authority,
208            false
209          ));
210                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
211            self.program,
212            false
213          ));
214                      accounts.extend_from_slice(remaining_accounts);
215    let data = RotateRoundInstructionData::new().try_to_vec().unwrap();
216    
217    solana_instruction::Instruction {
218      program_id: crate::SATRUSH_ID,
219      accounts,
220      data,
221    }
222  }
223}
224
225#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
226 pub struct RotateRoundInstructionData {
227            discriminator: [u8; 8],
228      }
229
230impl RotateRoundInstructionData {
231  pub fn new() -> Self {
232    Self {
233                        discriminator: [3, 245, 202, 88, 161, 29, 51, 141],
234                  }
235  }
236
237    pub(crate) fn try_to_vec(&self) -> Result<Vec<u8>, std::io::Error> {
238    borsh::to_vec(self)
239  }
240  }
241
242impl Default for RotateRoundInstructionData {
243  fn default() -> Self {
244    Self::new()
245  }
246}
247
248
249
250/// Instruction builder for `RotateRound`.
251///
252/// ### Accounts:
253///
254                      ///   0. `[writable, signer]` authority
255          ///   1. `[]` satrush_config
256                ///   2. `[writable]` board
257                ///   3. `[writable]` current_round
258                ///   4. `[writable]` next_round
259          ///   5. `[]` usd_mint
260          ///   6. `[]` btc_mint
261                ///   7. `[writable]` board_usd_ata
262                ///   8. `[writable]` board_btc_ata
263                ///   9. `[writable]` epoch_vault
264                ///   10. `[writable]` epoch_vault_usd_ata
265                ///   11. `[writable]` epoch_vault_btc_ata
266                ///   12. `[writable]` one_btc_vault
267                ///   13. `[writable]` one_btc_vault_usd_ata
268                ///   14. `[writable]` treasury
269                ///   15. `[writable]` treasury_usd_ata
270                ///   16. `[optional]` round_rotor (default to `CqkM3g59d36sE563dekRndGAufRQv6mH2BQPUgvS6m6s`)
271                ///   17. `[optional]` token_program (default to `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`)
272                ///   18. `[optional]` system_program (default to `11111111111111111111111111111111`)
273          ///   19. `[]` event_authority
274          ///   20. `[]` program
275#[derive(Clone, Debug, Default)]
276pub struct RotateRoundBuilder {
277            authority: Option<solana_address::Address>,
278                satrush_config: Option<solana_address::Address>,
279                board: Option<solana_address::Address>,
280                current_round: Option<solana_address::Address>,
281                next_round: Option<solana_address::Address>,
282                usd_mint: Option<solana_address::Address>,
283                btc_mint: Option<solana_address::Address>,
284                board_usd_ata: Option<solana_address::Address>,
285                board_btc_ata: Option<solana_address::Address>,
286                epoch_vault: Option<solana_address::Address>,
287                epoch_vault_usd_ata: Option<solana_address::Address>,
288                epoch_vault_btc_ata: Option<solana_address::Address>,
289                one_btc_vault: Option<solana_address::Address>,
290                one_btc_vault_usd_ata: Option<solana_address::Address>,
291                treasury: Option<solana_address::Address>,
292                treasury_usd_ata: Option<solana_address::Address>,
293                round_rotor: Option<solana_address::Address>,
294                token_program: Option<solana_address::Address>,
295                system_program: Option<solana_address::Address>,
296                event_authority: Option<solana_address::Address>,
297                program: Option<solana_address::Address>,
298                __remaining_accounts: Vec<solana_instruction::AccountMeta>,
299}
300
301impl RotateRoundBuilder {
302  pub fn new() -> Self {
303    Self::default()
304  }
305            #[inline(always)]
306    pub fn authority(&mut self, authority: solana_address::Address) -> &mut Self {
307                        self.authority = Some(authority);
308                    self
309    }
310            #[inline(always)]
311    pub fn satrush_config(&mut self, satrush_config: solana_address::Address) -> &mut Self {
312                        self.satrush_config = Some(satrush_config);
313                    self
314    }
315            /// Stays a regular `Account`: `get_next_round_id()` feeds `next_round`'s
316/// PDA seeds, which `LazyAccount` cannot serve.
317#[inline(always)]
318    pub fn board(&mut self, board: solana_address::Address) -> &mut Self {
319                        self.board = Some(board);
320                    self
321    }
322            /// The current round being closed out (revealed). Lazy for the same stack
323/// reason as the config; its PDA derives from `board.round_id` (a plain
324/// field path the IDL seed parser can encode), which pins it to the
325/// board's current round with no separate id constraint.
326#[inline(always)]
327    pub fn current_round(&mut self, current_round: solana_address::Address) -> &mut Self {
328                        self.current_round = Some(current_round);
329                    self
330    }
331            /// The freshly deployed next round, which becomes the board's active round.
332/// Its id is fixed by the seeds (`board.get_next_round_id()`); the handler
333/// populates it via `Round::try_new`.
334#[inline(always)]
335    pub fn next_round(&mut self, next_round: solana_address::Address) -> &mut Self {
336                        self.next_round = Some(next_round);
337                    self
338    }
339            /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
340#[inline(always)]
341    pub fn usd_mint(&mut self, usd_mint: solana_address::Address) -> &mut Self {
342                        self.usd_mint = Some(usd_mint);
343                    self
344    }
345            /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
346#[inline(always)]
347    pub fn btc_mint(&mut self, btc_mint: solana_address::Address) -> &mut Self {
348                        self.btc_mint = Some(btc_mint);
349                    self
350    }
351            /// Board's USD pool where every deploy's full amount landed — the sweep source.
352#[inline(always)]
353    pub fn board_usd_ata(&mut self, board_usd_ata: solana_address::Address) -> &mut Self {
354                        self.board_usd_ata = Some(board_usd_ata);
355                    self
356    }
357            /// Board's BTC jackpot reserves — the strike skim's BTC source.
358/// program validates mint and ownership on the transfer CPI. Unchecked for
359/// `try_accounts` stack headroom.
360#[inline(always)]
361    pub fn board_btc_ata(&mut self, board_btc_ata: solana_address::Address) -> &mut Self {
362                        self.board_btc_ata = Some(board_btc_ata);
363                    self
364    }
365            /// Epoch Vault singleton — receives the round's accumulated epoch fee leg.
366#[inline(always)]
367    pub fn epoch_vault(&mut self, epoch_vault: solana_address::Address) -> &mut Self {
368                        self.epoch_vault = Some(epoch_vault);
369                    self
370    }
371            #[inline(always)]
372    pub fn epoch_vault_usd_ata(&mut self, epoch_vault_usd_ata: solana_address::Address) -> &mut Self {
373                        self.epoch_vault_usd_ata = Some(epoch_vault_usd_ata);
374                    self
375    }
376            /// program validates mint and ownership on the transfer CPI. Unchecked for
377/// `try_accounts` stack headroom.
378#[inline(always)]
379    pub fn epoch_vault_btc_ata(&mut self, epoch_vault_btc_ata: solana_address::Address) -> &mut Self {
380                        self.epoch_vault_btc_ata = Some(epoch_vault_btc_ata);
381                    self
382    }
383            /// 1 BTC Vault singleton — receives the round's accumulated 1 BTC fee leg.
384#[inline(always)]
385    pub fn one_btc_vault(&mut self, one_btc_vault: solana_address::Address) -> &mut Self {
386                        self.one_btc_vault = Some(one_btc_vault);
387                    self
388    }
389            /// transfer destination — the token program validates mint and ownership on
390/// the CPI. Unchecked for `try_accounts` stack headroom.
391#[inline(always)]
392    pub fn one_btc_vault_usd_ata(&mut self, one_btc_vault_usd_ata: solana_address::Address) -> &mut Self {
393                        self.one_btc_vault_usd_ata = Some(one_btc_vault_usd_ata);
394                    self
395    }
396            /// Treasury singleton — receives the round's accumulated protocol fee leg.
397/// No seeds constraint: discriminator + owner checks pin the one Treasury
398/// instance that can ever exist (`init` on fixed seeds).
399#[inline(always)]
400    pub fn treasury(&mut self, treasury: solana_address::Address) -> &mut Self {
401                        self.treasury = Some(treasury);
402                    self
403    }
404            #[inline(always)]
405    pub fn treasury_usd_ata(&mut self, treasury_usd_ata: solana_address::Address) -> &mut Self {
406                        self.treasury_usd_ata = Some(treasury_usd_ata);
407                    self
408    }
409            /// `[optional account, default to 'CqkM3g59d36sE563dekRndGAufRQv6mH2BQPUgvS6m6s']`
410/// (`[b"rotor", b"round"]` under the rng program) and parsed manually —
411/// its settled randomness is the round's reveal entropy. Unchecked keeps
412/// this at the slot the SlotHashes sysvar used to occupy (`try_accounts`
413/// stack headroom).
414#[inline(always)]
415    pub fn round_rotor(&mut self, round_rotor: solana_address::Address) -> &mut Self {
416                        self.round_rotor = Some(round_rotor);
417                    self
418    }
419            /// `[optional account, default to 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA']`
420#[inline(always)]
421    pub fn token_program(&mut self, token_program: solana_address::Address) -> &mut Self {
422                        self.token_program = Some(token_program);
423                    self
424    }
425            /// `[optional account, default to '11111111111111111111111111111111']`
426#[inline(always)]
427    pub fn system_program(&mut self, system_program: solana_address::Address) -> &mut Self {
428                        self.system_program = Some(system_program);
429                    self
430    }
431            #[inline(always)]
432    pub fn event_authority(&mut self, event_authority: solana_address::Address) -> &mut Self {
433                        self.event_authority = Some(event_authority);
434                    self
435    }
436            #[inline(always)]
437    pub fn program(&mut self, program: solana_address::Address) -> &mut Self {
438                        self.program = Some(program);
439                    self
440    }
441            /// Add an additional account to the instruction.
442  #[inline(always)]
443  pub fn add_remaining_account(&mut self, account: solana_instruction::AccountMeta) -> &mut Self {
444    self.__remaining_accounts.push(account);
445    self
446  }
447  /// Add additional accounts to the instruction.
448  #[inline(always)]
449  pub fn add_remaining_accounts(&mut self, accounts: &[solana_instruction::AccountMeta]) -> &mut Self {
450    self.__remaining_accounts.extend_from_slice(accounts);
451    self
452  }
453  #[allow(clippy::clone_on_copy)]
454  pub fn instruction(&self) -> solana_instruction::Instruction {
455    let accounts = RotateRound {
456                              authority: self.authority.expect("authority is not set"),
457                                        satrush_config: self.satrush_config.expect("satrush_config is not set"),
458                                        board: self.board.expect("board is not set"),
459                                        current_round: self.current_round.expect("current_round is not set"),
460                                        next_round: self.next_round.expect("next_round is not set"),
461                                        usd_mint: self.usd_mint.expect("usd_mint is not set"),
462                                        btc_mint: self.btc_mint.expect("btc_mint is not set"),
463                                        board_usd_ata: self.board_usd_ata.expect("board_usd_ata is not set"),
464                                        board_btc_ata: self.board_btc_ata.expect("board_btc_ata is not set"),
465                                        epoch_vault: self.epoch_vault.expect("epoch_vault is not set"),
466                                        epoch_vault_usd_ata: self.epoch_vault_usd_ata.expect("epoch_vault_usd_ata is not set"),
467                                        epoch_vault_btc_ata: self.epoch_vault_btc_ata.expect("epoch_vault_btc_ata is not set"),
468                                        one_btc_vault: self.one_btc_vault.expect("one_btc_vault is not set"),
469                                        one_btc_vault_usd_ata: self.one_btc_vault_usd_ata.expect("one_btc_vault_usd_ata is not set"),
470                                        treasury: self.treasury.expect("treasury is not set"),
471                                        treasury_usd_ata: self.treasury_usd_ata.expect("treasury_usd_ata is not set"),
472                                        round_rotor: self.round_rotor.unwrap_or(solana_address::address!("CqkM3g59d36sE563dekRndGAufRQv6mH2BQPUgvS6m6s")),
473                                        token_program: self.token_program.unwrap_or(solana_address::address!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA")),
474                                        system_program: self.system_program.unwrap_or(solana_address::address!("11111111111111111111111111111111")),
475                                        event_authority: self.event_authority.expect("event_authority is not set"),
476                                        program: self.program.expect("program is not set"),
477                      };
478    
479    accounts.instruction_with_remaining_accounts(&self.__remaining_accounts)
480  }
481}
482
483  /// `rotate_round` CPI accounts.
484  pub struct RotateRoundCpiAccounts<'a, 'b> {
485          
486                    
487              pub authority: &'b solana_account_info::AccountInfo<'a>,
488                
489                    
490              pub satrush_config: &'b solana_account_info::AccountInfo<'a>,
491                        /// Stays a regular `Account`: `get_next_round_id()` feeds `next_round`'s
492/// PDA seeds, which `LazyAccount` cannot serve.
493
494      
495                    
496              pub board: &'b solana_account_info::AccountInfo<'a>,
497                        /// The current round being closed out (revealed). Lazy for the same stack
498/// reason as the config; its PDA derives from `board.round_id` (a plain
499/// field path the IDL seed parser can encode), which pins it to the
500/// board's current round with no separate id constraint.
501
502      
503                    
504              pub current_round: &'b solana_account_info::AccountInfo<'a>,
505                        /// The freshly deployed next round, which becomes the board's active round.
506/// Its id is fixed by the seeds (`board.get_next_round_id()`); the handler
507/// populates it via `Round::try_new`.
508
509      
510                    
511              pub next_round: &'b solana_account_info::AccountInfo<'a>,
512                        /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
513
514      
515                    
516              pub usd_mint: &'b solana_account_info::AccountInfo<'a>,
517                        /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
518
519      
520                    
521              pub btc_mint: &'b solana_account_info::AccountInfo<'a>,
522                        /// Board's USD pool where every deploy's full amount landed — the sweep source.
523
524      
525                    
526              pub board_usd_ata: &'b solana_account_info::AccountInfo<'a>,
527                        /// Board's BTC jackpot reserves — the strike skim's BTC source.
528/// program validates mint and ownership on the transfer CPI. Unchecked for
529/// `try_accounts` stack headroom.
530
531      
532                    
533              pub board_btc_ata: &'b solana_account_info::AccountInfo<'a>,
534                        /// Epoch Vault singleton — receives the round's accumulated epoch fee leg.
535
536      
537                    
538              pub epoch_vault: &'b solana_account_info::AccountInfo<'a>,
539                
540                    
541              pub epoch_vault_usd_ata: &'b solana_account_info::AccountInfo<'a>,
542                        /// program validates mint and ownership on the transfer CPI. Unchecked for
543/// `try_accounts` stack headroom.
544
545      
546                    
547              pub epoch_vault_btc_ata: &'b solana_account_info::AccountInfo<'a>,
548                        /// 1 BTC Vault singleton — receives the round's accumulated 1 BTC fee leg.
549
550      
551                    
552              pub one_btc_vault: &'b solana_account_info::AccountInfo<'a>,
553                        /// transfer destination — the token program validates mint and ownership on
554/// the CPI. Unchecked for `try_accounts` stack headroom.
555
556      
557                    
558              pub one_btc_vault_usd_ata: &'b solana_account_info::AccountInfo<'a>,
559                        /// Treasury singleton — receives the round's accumulated protocol fee leg.
560/// No seeds constraint: discriminator + owner checks pin the one Treasury
561/// instance that can ever exist (`init` on fixed seeds).
562
563      
564                    
565              pub treasury: &'b solana_account_info::AccountInfo<'a>,
566                
567                    
568              pub treasury_usd_ata: &'b solana_account_info::AccountInfo<'a>,
569                        /// (`[b"rotor", b"round"]` under the rng program) and parsed manually —
570/// its settled randomness is the round's reveal entropy. Unchecked keeps
571/// this at the slot the SlotHashes sysvar used to occupy (`try_accounts`
572/// stack headroom).
573
574      
575                    
576              pub round_rotor: &'b solana_account_info::AccountInfo<'a>,
577                
578                    
579              pub token_program: &'b solana_account_info::AccountInfo<'a>,
580                
581                    
582              pub system_program: &'b solana_account_info::AccountInfo<'a>,
583                
584                    
585              pub event_authority: &'b solana_account_info::AccountInfo<'a>,
586                
587                    
588              pub program: &'b solana_account_info::AccountInfo<'a>,
589            }
590
591/// `rotate_round` CPI instruction.
592pub struct RotateRoundCpi<'a, 'b> {
593  /// The program to invoke.
594  pub __program: &'b solana_account_info::AccountInfo<'a>,
595      
596              
597          pub authority: &'b solana_account_info::AccountInfo<'a>,
598          
599              
600          pub satrush_config: &'b solana_account_info::AccountInfo<'a>,
601                /// Stays a regular `Account`: `get_next_round_id()` feeds `next_round`'s
602/// PDA seeds, which `LazyAccount` cannot serve.
603
604    
605              
606          pub board: &'b solana_account_info::AccountInfo<'a>,
607                /// The current round being closed out (revealed). Lazy for the same stack
608/// reason as the config; its PDA derives from `board.round_id` (a plain
609/// field path the IDL seed parser can encode), which pins it to the
610/// board's current round with no separate id constraint.
611
612    
613              
614          pub current_round: &'b solana_account_info::AccountInfo<'a>,
615                /// The freshly deployed next round, which becomes the board's active round.
616/// Its id is fixed by the seeds (`board.get_next_round_id()`); the handler
617/// populates it via `Round::try_new`.
618
619    
620              
621          pub next_round: &'b solana_account_info::AccountInfo<'a>,
622                /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
623
624    
625              
626          pub usd_mint: &'b solana_account_info::AccountInfo<'a>,
627                /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
628
629    
630              
631          pub btc_mint: &'b solana_account_info::AccountInfo<'a>,
632                /// Board's USD pool where every deploy's full amount landed — the sweep source.
633
634    
635              
636          pub board_usd_ata: &'b solana_account_info::AccountInfo<'a>,
637                /// Board's BTC jackpot reserves — the strike skim's BTC source.
638/// program validates mint and ownership on the transfer CPI. Unchecked for
639/// `try_accounts` stack headroom.
640
641    
642              
643          pub board_btc_ata: &'b solana_account_info::AccountInfo<'a>,
644                /// Epoch Vault singleton — receives the round's accumulated epoch fee leg.
645
646    
647              
648          pub epoch_vault: &'b solana_account_info::AccountInfo<'a>,
649          
650              
651          pub epoch_vault_usd_ata: &'b solana_account_info::AccountInfo<'a>,
652                /// program validates mint and ownership on the transfer CPI. Unchecked for
653/// `try_accounts` stack headroom.
654
655    
656              
657          pub epoch_vault_btc_ata: &'b solana_account_info::AccountInfo<'a>,
658                /// 1 BTC Vault singleton — receives the round's accumulated 1 BTC fee leg.
659
660    
661              
662          pub one_btc_vault: &'b solana_account_info::AccountInfo<'a>,
663                /// transfer destination — the token program validates mint and ownership on
664/// the CPI. Unchecked for `try_accounts` stack headroom.
665
666    
667              
668          pub one_btc_vault_usd_ata: &'b solana_account_info::AccountInfo<'a>,
669                /// Treasury singleton — receives the round's accumulated protocol fee leg.
670/// No seeds constraint: discriminator + owner checks pin the one Treasury
671/// instance that can ever exist (`init` on fixed seeds).
672
673    
674              
675          pub treasury: &'b solana_account_info::AccountInfo<'a>,
676          
677              
678          pub treasury_usd_ata: &'b solana_account_info::AccountInfo<'a>,
679                /// (`[b"rotor", b"round"]` under the rng program) and parsed manually —
680/// its settled randomness is the round's reveal entropy. Unchecked keeps
681/// this at the slot the SlotHashes sysvar used to occupy (`try_accounts`
682/// stack headroom).
683
684    
685              
686          pub round_rotor: &'b solana_account_info::AccountInfo<'a>,
687          
688              
689          pub token_program: &'b solana_account_info::AccountInfo<'a>,
690          
691              
692          pub system_program: &'b solana_account_info::AccountInfo<'a>,
693          
694              
695          pub event_authority: &'b solana_account_info::AccountInfo<'a>,
696          
697              
698          pub program: &'b solana_account_info::AccountInfo<'a>,
699        }
700
701impl<'a, 'b> RotateRoundCpi<'a, 'b> {
702  pub fn new(
703    program: &'b solana_account_info::AccountInfo<'a>,
704          accounts: RotateRoundCpiAccounts<'a, 'b>,
705          ) -> Self {
706    Self {
707      __program: program,
708              authority: accounts.authority,
709              satrush_config: accounts.satrush_config,
710              board: accounts.board,
711              current_round: accounts.current_round,
712              next_round: accounts.next_round,
713              usd_mint: accounts.usd_mint,
714              btc_mint: accounts.btc_mint,
715              board_usd_ata: accounts.board_usd_ata,
716              board_btc_ata: accounts.board_btc_ata,
717              epoch_vault: accounts.epoch_vault,
718              epoch_vault_usd_ata: accounts.epoch_vault_usd_ata,
719              epoch_vault_btc_ata: accounts.epoch_vault_btc_ata,
720              one_btc_vault: accounts.one_btc_vault,
721              one_btc_vault_usd_ata: accounts.one_btc_vault_usd_ata,
722              treasury: accounts.treasury,
723              treasury_usd_ata: accounts.treasury_usd_ata,
724              round_rotor: accounts.round_rotor,
725              token_program: accounts.token_program,
726              system_program: accounts.system_program,
727              event_authority: accounts.event_authority,
728              program: accounts.program,
729                }
730  }
731  #[inline(always)]
732  pub fn invoke(&self) -> solana_program_error::ProgramResult {
733    self.invoke_signed_with_remaining_accounts(&[], &[])
734  }
735  #[inline(always)]
736  pub fn invoke_with_remaining_accounts(&self, remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> solana_program_error::ProgramResult {
737    self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
738  }
739  #[inline(always)]
740  pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program_error::ProgramResult {
741    self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
742  }
743  #[allow(clippy::arithmetic_side_effects)]
744  #[allow(clippy::clone_on_copy)]
745  #[allow(clippy::vec_init_then_push)]
746  pub fn invoke_signed_with_remaining_accounts(
747    &self,
748    signers_seeds: &[&[&[u8]]],
749    remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]
750  ) -> solana_program_error::ProgramResult {
751    let mut accounts = Vec::with_capacity(21+ remaining_accounts.len());
752                            accounts.push(solana_instruction::AccountMeta::new(
753            *self.authority.key,
754            true
755          ));
756                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
757            *self.satrush_config.key,
758            false
759          ));
760                                          accounts.push(solana_instruction::AccountMeta::new(
761            *self.board.key,
762            false
763          ));
764                                          accounts.push(solana_instruction::AccountMeta::new(
765            *self.current_round.key,
766            false
767          ));
768                                          accounts.push(solana_instruction::AccountMeta::new(
769            *self.next_round.key,
770            false
771          ));
772                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
773            *self.usd_mint.key,
774            false
775          ));
776                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
777            *self.btc_mint.key,
778            false
779          ));
780                                          accounts.push(solana_instruction::AccountMeta::new(
781            *self.board_usd_ata.key,
782            false
783          ));
784                                          accounts.push(solana_instruction::AccountMeta::new(
785            *self.board_btc_ata.key,
786            false
787          ));
788                                          accounts.push(solana_instruction::AccountMeta::new(
789            *self.epoch_vault.key,
790            false
791          ));
792                                          accounts.push(solana_instruction::AccountMeta::new(
793            *self.epoch_vault_usd_ata.key,
794            false
795          ));
796                                          accounts.push(solana_instruction::AccountMeta::new(
797            *self.epoch_vault_btc_ata.key,
798            false
799          ));
800                                          accounts.push(solana_instruction::AccountMeta::new(
801            *self.one_btc_vault.key,
802            false
803          ));
804                                          accounts.push(solana_instruction::AccountMeta::new(
805            *self.one_btc_vault_usd_ata.key,
806            false
807          ));
808                                          accounts.push(solana_instruction::AccountMeta::new(
809            *self.treasury.key,
810            false
811          ));
812                                          accounts.push(solana_instruction::AccountMeta::new(
813            *self.treasury_usd_ata.key,
814            false
815          ));
816                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
817            *self.round_rotor.key,
818            false
819          ));
820                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
821            *self.token_program.key,
822            false
823          ));
824                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
825            *self.system_program.key,
826            false
827          ));
828                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
829            *self.event_authority.key,
830            false
831          ));
832                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
833            *self.program.key,
834            false
835          ));
836                      remaining_accounts.iter().for_each(|remaining_account| {
837      accounts.push(solana_instruction::AccountMeta {
838          pubkey: *remaining_account.0.key,
839          is_signer: remaining_account.1,
840          is_writable: remaining_account.2,
841      })
842    });
843    let data = RotateRoundInstructionData::new().try_to_vec().unwrap();
844    
845    let instruction = solana_instruction::Instruction {
846      program_id: crate::SATRUSH_ID,
847      accounts,
848      data,
849    };
850    let mut account_infos = Vec::with_capacity(22 + remaining_accounts.len());
851    account_infos.push(self.__program.clone());
852                  account_infos.push(self.authority.clone());
853                        account_infos.push(self.satrush_config.clone());
854                        account_infos.push(self.board.clone());
855                        account_infos.push(self.current_round.clone());
856                        account_infos.push(self.next_round.clone());
857                        account_infos.push(self.usd_mint.clone());
858                        account_infos.push(self.btc_mint.clone());
859                        account_infos.push(self.board_usd_ata.clone());
860                        account_infos.push(self.board_btc_ata.clone());
861                        account_infos.push(self.epoch_vault.clone());
862                        account_infos.push(self.epoch_vault_usd_ata.clone());
863                        account_infos.push(self.epoch_vault_btc_ata.clone());
864                        account_infos.push(self.one_btc_vault.clone());
865                        account_infos.push(self.one_btc_vault_usd_ata.clone());
866                        account_infos.push(self.treasury.clone());
867                        account_infos.push(self.treasury_usd_ata.clone());
868                        account_infos.push(self.round_rotor.clone());
869                        account_infos.push(self.token_program.clone());
870                        account_infos.push(self.system_program.clone());
871                        account_infos.push(self.event_authority.clone());
872                        account_infos.push(self.program.clone());
873              remaining_accounts.iter().for_each(|remaining_account| account_infos.push(remaining_account.0.clone()));
874
875    if signers_seeds.is_empty() {
876      solana_cpi::invoke(&instruction, &account_infos)
877    } else {
878      solana_cpi::invoke_signed(&instruction, &account_infos, signers_seeds)
879    }
880  }
881}
882
883/// Instruction builder for `RotateRound` via CPI.
884///
885/// ### Accounts:
886///
887                      ///   0. `[writable, signer]` authority
888          ///   1. `[]` satrush_config
889                ///   2. `[writable]` board
890                ///   3. `[writable]` current_round
891                ///   4. `[writable]` next_round
892          ///   5. `[]` usd_mint
893          ///   6. `[]` btc_mint
894                ///   7. `[writable]` board_usd_ata
895                ///   8. `[writable]` board_btc_ata
896                ///   9. `[writable]` epoch_vault
897                ///   10. `[writable]` epoch_vault_usd_ata
898                ///   11. `[writable]` epoch_vault_btc_ata
899                ///   12. `[writable]` one_btc_vault
900                ///   13. `[writable]` one_btc_vault_usd_ata
901                ///   14. `[writable]` treasury
902                ///   15. `[writable]` treasury_usd_ata
903          ///   16. `[]` round_rotor
904          ///   17. `[]` token_program
905          ///   18. `[]` system_program
906          ///   19. `[]` event_authority
907          ///   20. `[]` program
908#[derive(Clone, Debug)]
909pub struct RotateRoundCpiBuilder<'a, 'b> {
910  instruction: Box<RotateRoundCpiBuilderInstruction<'a, 'b>>,
911}
912
913impl<'a, 'b> RotateRoundCpiBuilder<'a, 'b> {
914  pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
915    let instruction = Box::new(RotateRoundCpiBuilderInstruction {
916      __program: program,
917              authority: None,
918              satrush_config: None,
919              board: None,
920              current_round: None,
921              next_round: None,
922              usd_mint: None,
923              btc_mint: None,
924              board_usd_ata: None,
925              board_btc_ata: None,
926              epoch_vault: None,
927              epoch_vault_usd_ata: None,
928              epoch_vault_btc_ata: None,
929              one_btc_vault: None,
930              one_btc_vault_usd_ata: None,
931              treasury: None,
932              treasury_usd_ata: None,
933              round_rotor: None,
934              token_program: None,
935              system_program: None,
936              event_authority: None,
937              program: None,
938                                __remaining_accounts: Vec::new(),
939    });
940    Self { instruction }
941  }
942      #[inline(always)]
943    pub fn authority(&mut self, authority: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
944                        self.instruction.authority = Some(authority);
945                    self
946    }
947      #[inline(always)]
948    pub fn satrush_config(&mut self, satrush_config: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
949                        self.instruction.satrush_config = Some(satrush_config);
950                    self
951    }
952      /// Stays a regular `Account`: `get_next_round_id()` feeds `next_round`'s
953/// PDA seeds, which `LazyAccount` cannot serve.
954#[inline(always)]
955    pub fn board(&mut self, board: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
956                        self.instruction.board = Some(board);
957                    self
958    }
959      /// The current round being closed out (revealed). Lazy for the same stack
960/// reason as the config; its PDA derives from `board.round_id` (a plain
961/// field path the IDL seed parser can encode), which pins it to the
962/// board's current round with no separate id constraint.
963#[inline(always)]
964    pub fn current_round(&mut self, current_round: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
965                        self.instruction.current_round = Some(current_round);
966                    self
967    }
968      /// The freshly deployed next round, which becomes the board's active round.
969/// Its id is fixed by the seeds (`board.get_next_round_id()`); the handler
970/// populates it via `Round::try_new`.
971#[inline(always)]
972    pub fn next_round(&mut self, next_round: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
973                        self.instruction.next_round = Some(next_round);
974                    self
975    }
976      /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
977#[inline(always)]
978    pub fn usd_mint(&mut self, usd_mint: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
979                        self.instruction.usd_mint = Some(usd_mint);
980                    self
981    }
982      /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
983#[inline(always)]
984    pub fn btc_mint(&mut self, btc_mint: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
985                        self.instruction.btc_mint = Some(btc_mint);
986                    self
987    }
988      /// Board's USD pool where every deploy's full amount landed — the sweep source.
989#[inline(always)]
990    pub fn board_usd_ata(&mut self, board_usd_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
991                        self.instruction.board_usd_ata = Some(board_usd_ata);
992                    self
993    }
994      /// Board's BTC jackpot reserves — the strike skim's BTC source.
995/// program validates mint and ownership on the transfer CPI. Unchecked for
996/// `try_accounts` stack headroom.
997#[inline(always)]
998    pub fn board_btc_ata(&mut self, board_btc_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
999                        self.instruction.board_btc_ata = Some(board_btc_ata);
1000                    self
1001    }
1002      /// Epoch Vault singleton — receives the round's accumulated epoch fee leg.
1003#[inline(always)]
1004    pub fn epoch_vault(&mut self, epoch_vault: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1005                        self.instruction.epoch_vault = Some(epoch_vault);
1006                    self
1007    }
1008      #[inline(always)]
1009    pub fn epoch_vault_usd_ata(&mut self, epoch_vault_usd_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1010                        self.instruction.epoch_vault_usd_ata = Some(epoch_vault_usd_ata);
1011                    self
1012    }
1013      /// program validates mint and ownership on the transfer CPI. Unchecked for
1014/// `try_accounts` stack headroom.
1015#[inline(always)]
1016    pub fn epoch_vault_btc_ata(&mut self, epoch_vault_btc_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1017                        self.instruction.epoch_vault_btc_ata = Some(epoch_vault_btc_ata);
1018                    self
1019    }
1020      /// 1 BTC Vault singleton — receives the round's accumulated 1 BTC fee leg.
1021#[inline(always)]
1022    pub fn one_btc_vault(&mut self, one_btc_vault: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1023                        self.instruction.one_btc_vault = Some(one_btc_vault);
1024                    self
1025    }
1026      /// transfer destination — the token program validates mint and ownership on
1027/// the CPI. Unchecked for `try_accounts` stack headroom.
1028#[inline(always)]
1029    pub fn one_btc_vault_usd_ata(&mut self, one_btc_vault_usd_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1030                        self.instruction.one_btc_vault_usd_ata = Some(one_btc_vault_usd_ata);
1031                    self
1032    }
1033      /// Treasury singleton — receives the round's accumulated protocol fee leg.
1034/// No seeds constraint: discriminator + owner checks pin the one Treasury
1035/// instance that can ever exist (`init` on fixed seeds).
1036#[inline(always)]
1037    pub fn treasury(&mut self, treasury: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1038                        self.instruction.treasury = Some(treasury);
1039                    self
1040    }
1041      #[inline(always)]
1042    pub fn treasury_usd_ata(&mut self, treasury_usd_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1043                        self.instruction.treasury_usd_ata = Some(treasury_usd_ata);
1044                    self
1045    }
1046      /// (`[b"rotor", b"round"]` under the rng program) and parsed manually —
1047/// its settled randomness is the round's reveal entropy. Unchecked keeps
1048/// this at the slot the SlotHashes sysvar used to occupy (`try_accounts`
1049/// stack headroom).
1050#[inline(always)]
1051    pub fn round_rotor(&mut self, round_rotor: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1052                        self.instruction.round_rotor = Some(round_rotor);
1053                    self
1054    }
1055      #[inline(always)]
1056    pub fn token_program(&mut self, token_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1057                        self.instruction.token_program = Some(token_program);
1058                    self
1059    }
1060      #[inline(always)]
1061    pub fn system_program(&mut self, system_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1062                        self.instruction.system_program = Some(system_program);
1063                    self
1064    }
1065      #[inline(always)]
1066    pub fn event_authority(&mut self, event_authority: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1067                        self.instruction.event_authority = Some(event_authority);
1068                    self
1069    }
1070      #[inline(always)]
1071    pub fn program(&mut self, program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1072                        self.instruction.program = Some(program);
1073                    self
1074    }
1075            /// Add an additional account to the instruction.
1076  #[inline(always)]
1077  pub fn add_remaining_account(&mut self, account: &'b solana_account_info::AccountInfo<'a>, is_writable: bool, is_signer: bool) -> &mut Self {
1078    self.instruction.__remaining_accounts.push((account, is_writable, is_signer));
1079    self
1080  }
1081  /// Add additional accounts to the instruction.
1082  ///
1083  /// Each account is represented by a tuple of the `AccountInfo`, a `bool` indicating whether the account is writable or not,
1084  /// and a `bool` indicating whether the account is a signer or not.
1085  #[inline(always)]
1086  pub fn add_remaining_accounts(&mut self, accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> &mut Self {
1087    self.instruction.__remaining_accounts.extend_from_slice(accounts);
1088    self
1089  }
1090  #[inline(always)]
1091  pub fn invoke(&self) -> solana_program_error::ProgramResult {
1092    self.invoke_signed(&[])
1093  }
1094  #[allow(clippy::clone_on_copy)]
1095  #[allow(clippy::vec_init_then_push)]
1096  pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program_error::ProgramResult {
1097        let instruction = RotateRoundCpi {
1098        __program: self.instruction.__program,
1099                  
1100          authority: self.instruction.authority.expect("authority is not set"),
1101                  
1102          satrush_config: self.instruction.satrush_config.expect("satrush_config is not set"),
1103                  
1104          board: self.instruction.board.expect("board is not set"),
1105                  
1106          current_round: self.instruction.current_round.expect("current_round is not set"),
1107                  
1108          next_round: self.instruction.next_round.expect("next_round is not set"),
1109                  
1110          usd_mint: self.instruction.usd_mint.expect("usd_mint is not set"),
1111                  
1112          btc_mint: self.instruction.btc_mint.expect("btc_mint is not set"),
1113                  
1114          board_usd_ata: self.instruction.board_usd_ata.expect("board_usd_ata is not set"),
1115                  
1116          board_btc_ata: self.instruction.board_btc_ata.expect("board_btc_ata is not set"),
1117                  
1118          epoch_vault: self.instruction.epoch_vault.expect("epoch_vault is not set"),
1119                  
1120          epoch_vault_usd_ata: self.instruction.epoch_vault_usd_ata.expect("epoch_vault_usd_ata is not set"),
1121                  
1122          epoch_vault_btc_ata: self.instruction.epoch_vault_btc_ata.expect("epoch_vault_btc_ata is not set"),
1123                  
1124          one_btc_vault: self.instruction.one_btc_vault.expect("one_btc_vault is not set"),
1125                  
1126          one_btc_vault_usd_ata: self.instruction.one_btc_vault_usd_ata.expect("one_btc_vault_usd_ata is not set"),
1127                  
1128          treasury: self.instruction.treasury.expect("treasury is not set"),
1129                  
1130          treasury_usd_ata: self.instruction.treasury_usd_ata.expect("treasury_usd_ata is not set"),
1131                  
1132          round_rotor: self.instruction.round_rotor.expect("round_rotor is not set"),
1133                  
1134          token_program: self.instruction.token_program.expect("token_program is not set"),
1135                  
1136          system_program: self.instruction.system_program.expect("system_program is not set"),
1137                  
1138          event_authority: self.instruction.event_authority.expect("event_authority is not set"),
1139                  
1140          program: self.instruction.program.expect("program is not set"),
1141                    };
1142    instruction.invoke_signed_with_remaining_accounts(signers_seeds, &self.instruction.__remaining_accounts)
1143  }
1144}
1145
1146#[derive(Clone, Debug)]
1147struct RotateRoundCpiBuilderInstruction<'a, 'b> {
1148  __program: &'b solana_account_info::AccountInfo<'a>,
1149            authority: Option<&'b solana_account_info::AccountInfo<'a>>,
1150                satrush_config: Option<&'b solana_account_info::AccountInfo<'a>>,
1151                board: Option<&'b solana_account_info::AccountInfo<'a>>,
1152                current_round: Option<&'b solana_account_info::AccountInfo<'a>>,
1153                next_round: Option<&'b solana_account_info::AccountInfo<'a>>,
1154                usd_mint: Option<&'b solana_account_info::AccountInfo<'a>>,
1155                btc_mint: Option<&'b solana_account_info::AccountInfo<'a>>,
1156                board_usd_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
1157                board_btc_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
1158                epoch_vault: Option<&'b solana_account_info::AccountInfo<'a>>,
1159                epoch_vault_usd_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
1160                epoch_vault_btc_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
1161                one_btc_vault: Option<&'b solana_account_info::AccountInfo<'a>>,
1162                one_btc_vault_usd_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
1163                treasury: Option<&'b solana_account_info::AccountInfo<'a>>,
1164                treasury_usd_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
1165                round_rotor: Option<&'b solana_account_info::AccountInfo<'a>>,
1166                token_program: Option<&'b solana_account_info::AccountInfo<'a>>,
1167                system_program: Option<&'b solana_account_info::AccountInfo<'a>>,
1168                event_authority: Option<&'b solana_account_info::AccountInfo<'a>>,
1169                program: Option<&'b solana_account_info::AccountInfo<'a>>,
1170                /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
1171  __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
1172}
1173