Skip to main content

satrush_client/generated/instructions/
settle_deploy_public.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 SETTLE_DEPLOY_PUBLIC_DISCRIMINATOR: [u8; 8] = [249, 111, 122, 103, 93, 86, 76, 198];
12
13/// Accounts.
14#[derive(Debug)]
15pub struct SettleDeployPublic {
16            /// Settler: the deployment's owner (manual claim) or the round authority
17/// (crank settling automated deployments).
18
19    
20              
21          pub authority: solana_address::Address,
22          
23              
24          pub satrush_config: solana_address::Address,
25                /// Round the deployment belongs to. Must be fully settled.
26
27    
28              
29          pub round: solana_address::Address,
30                /// PDA that owns `board_btc_ata`; signs the deposit transfer into the vault.
31
32    
33              
34          pub board: solana_address::Address,
35                /// independent of the signer: the crank for automated deployments (it paid
36/// at execute), the user for manual ones.
37
38    
39              
40          pub rent_recipient: solana_address::Address,
41                /// The settled deployment; PDA re-keyed off its stored authority so a
42/// crank signer can settle it. Closed to `rent_recipient`.
43
44    
45              
46          pub public_deployment: solana_address::Address,
47                /// Miner profile of the deployment's owner (not the signer).
48
49    
50              
51          pub miner: solana_address::Address,
52                /// address is derived, so a client cannot dodge reload routing by omitting
53/// it); may be closed/empty, in which case winnings fall back to the miner
54/// profile. Deserialized manually in the handler when live.
55
56    
57              
58          pub public_automation: solana_address::Address,
59                /// reload branch only (owner must be the automation PDA, mint the USD
60/// mint). May be closed/empty when the automation is gone.
61
62    
63              
64          pub automation_usd_ata: solana_address::Address,
65                /// ATA address in the grubstake-winnings branch only (it necessarily
66/// exists there — the grubstake claim created it). Unused otherwise.
67
68    
69              
70          pub miner_usd_ata: solana_address::Address,
71                /// The affiliate credited with the deployment's frozen points. Required
72/// (and matched against the miner's bound affiliate) whenever the
73/// deployment carries points; ignored otherwise. Required rather than
74/// forfeited: the backing USD was swept into the treasury at rotation,
75/// and skipping the credit would strand it with no points to redeem it.
76/// The account can never be closed and its address is stored on the
77/// miner, so a missing account is always a client slip a retry fixes.
78
79    
80              
81          pub affiliate: Option<solana_address::Address>,
82                /// The Sats Vault the winner's BTC is deposited into for shares.
83
84    
85              
86          pub sats_vault: solana_address::Address,
87                /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
88
89    
90              
91          pub btc_mint: solana_address::Address,
92                /// USD mint — read only to size hashrate points by the stake's whole-USD
93/// unit and for the transfer decimals.
94/// decimals byte are read. Unchecked for `try_accounts` stack headroom.
95
96    
97              
98          pub usd_mint: solana_address::Address,
99                /// Board's USD pool — the reload transfer source (winnings sit there until
100/// claimed or reloaded).
101/// program validates mint and ownership on the transfer CPI. Unchecked for
102/// `try_accounts` stack headroom.
103
104    
105              
106          pub board_usd_ata: solana_address::Address,
107                /// Board's BTC reserves — the round's post-swap BTC, source of the deposit.
108/// program validates mint and ownership on the transfer CPI. Unchecked for
109/// `try_accounts` stack headroom.
110
111    
112              
113          pub board_btc_ata: solana_address::Address,
114                /// Vault's BTC reserves — the deposit destination.
115
116    
117              
118          pub sats_vault_btc_ata: solana_address::Address,
119                /// The Token Vault the miner's token rewards are deposited into for shares.
120
121    
122              
123          pub token_vault: solana_address::Address,
124          
125              
126          pub token_program: solana_address::Address,
127          
128              
129          pub associated_token_program: solana_address::Address,
130          
131              
132          pub system_program: solana_address::Address,
133          
134              
135          pub event_authority: solana_address::Address,
136          
137              
138          pub program: solana_address::Address,
139      }
140
141impl SettleDeployPublic {
142  pub fn instruction(&self) -> solana_instruction::Instruction {
143    self.instruction_with_remaining_accounts(&[])
144  }
145  #[allow(clippy::arithmetic_side_effects)]
146  #[allow(clippy::vec_init_then_push)]
147  pub fn instruction_with_remaining_accounts(&self, remaining_accounts: &[solana_instruction::AccountMeta]) -> solana_instruction::Instruction {
148    let mut accounts = Vec::with_capacity(23+ remaining_accounts.len());
149                            accounts.push(solana_instruction::AccountMeta::new(
150            self.authority,
151            true
152          ));
153                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
154            self.satrush_config,
155            false
156          ));
157                                          accounts.push(solana_instruction::AccountMeta::new(
158            self.round,
159            false
160          ));
161                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
162            self.board,
163            false
164          ));
165                                          accounts.push(solana_instruction::AccountMeta::new(
166            self.rent_recipient,
167            false
168          ));
169                                          accounts.push(solana_instruction::AccountMeta::new(
170            self.public_deployment,
171            false
172          ));
173                                          accounts.push(solana_instruction::AccountMeta::new(
174            self.miner,
175            false
176          ));
177                                          accounts.push(solana_instruction::AccountMeta::new(
178            self.public_automation,
179            false
180          ));
181                                          accounts.push(solana_instruction::AccountMeta::new(
182            self.automation_usd_ata,
183            false
184          ));
185                                          accounts.push(solana_instruction::AccountMeta::new(
186            self.miner_usd_ata,
187            false
188          ));
189                                                      if let Some(affiliate) = self.affiliate {
190              accounts.push(solana_instruction::AccountMeta::new(
191                affiliate,
192                false,
193              ));
194            } else {
195              accounts.push(solana_instruction::AccountMeta::new_readonly(
196                crate::SATRUSH_ID,
197                false,
198              ));
199            }
200                                                    accounts.push(solana_instruction::AccountMeta::new(
201            self.sats_vault,
202            false
203          ));
204                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
205            self.btc_mint,
206            false
207          ));
208                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
209            self.usd_mint,
210            false
211          ));
212                                          accounts.push(solana_instruction::AccountMeta::new(
213            self.board_usd_ata,
214            false
215          ));
216                                          accounts.push(solana_instruction::AccountMeta::new(
217            self.board_btc_ata,
218            false
219          ));
220                                          accounts.push(solana_instruction::AccountMeta::new(
221            self.sats_vault_btc_ata,
222            false
223          ));
224                                          accounts.push(solana_instruction::AccountMeta::new(
225            self.token_vault,
226            false
227          ));
228                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
229            self.token_program,
230            false
231          ));
232                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
233            self.associated_token_program,
234            false
235          ));
236                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
237            self.system_program,
238            false
239          ));
240                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
241            self.event_authority,
242            false
243          ));
244                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
245            self.program,
246            false
247          ));
248                      accounts.extend_from_slice(remaining_accounts);
249    let data = SettleDeployPublicInstructionData::new().try_to_vec().unwrap();
250    
251    solana_instruction::Instruction {
252      program_id: crate::SATRUSH_ID,
253      accounts,
254      data,
255    }
256  }
257}
258
259#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
260 pub struct SettleDeployPublicInstructionData {
261            discriminator: [u8; 8],
262      }
263
264impl SettleDeployPublicInstructionData {
265  pub fn new() -> Self {
266    Self {
267                        discriminator: [249, 111, 122, 103, 93, 86, 76, 198],
268                  }
269  }
270
271    pub(crate) fn try_to_vec(&self) -> Result<Vec<u8>, std::io::Error> {
272    borsh::to_vec(self)
273  }
274  }
275
276impl Default for SettleDeployPublicInstructionData {
277  fn default() -> Self {
278    Self::new()
279  }
280}
281
282
283
284/// Instruction builder for `SettleDeployPublic`.
285///
286/// ### Accounts:
287///
288                      ///   0. `[writable, signer]` authority
289          ///   1. `[]` satrush_config
290                ///   2. `[writable]` round
291          ///   3. `[]` board
292                ///   4. `[writable]` rent_recipient
293                ///   5. `[writable]` public_deployment
294                ///   6. `[writable]` miner
295                ///   7. `[writable]` public_automation
296                ///   8. `[writable]` automation_usd_ata
297                ///   9. `[writable]` miner_usd_ata
298                      ///   10. `[writable, optional]` affiliate
299                ///   11. `[writable]` sats_vault
300          ///   12. `[]` btc_mint
301          ///   13. `[]` usd_mint
302                ///   14. `[writable]` board_usd_ata
303                ///   15. `[writable]` board_btc_ata
304                ///   16. `[writable]` sats_vault_btc_ata
305                ///   17. `[writable]` token_vault
306                ///   18. `[optional]` token_program (default to `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`)
307                ///   19. `[optional]` associated_token_program (default to `ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL`)
308                ///   20. `[optional]` system_program (default to `11111111111111111111111111111111`)
309          ///   21. `[]` event_authority
310          ///   22. `[]` program
311#[derive(Clone, Debug, Default)]
312pub struct SettleDeployPublicBuilder {
313            authority: Option<solana_address::Address>,
314                satrush_config: Option<solana_address::Address>,
315                round: Option<solana_address::Address>,
316                board: Option<solana_address::Address>,
317                rent_recipient: Option<solana_address::Address>,
318                public_deployment: Option<solana_address::Address>,
319                miner: Option<solana_address::Address>,
320                public_automation: Option<solana_address::Address>,
321                automation_usd_ata: Option<solana_address::Address>,
322                miner_usd_ata: Option<solana_address::Address>,
323                affiliate: Option<solana_address::Address>,
324                sats_vault: Option<solana_address::Address>,
325                btc_mint: Option<solana_address::Address>,
326                usd_mint: Option<solana_address::Address>,
327                board_usd_ata: Option<solana_address::Address>,
328                board_btc_ata: Option<solana_address::Address>,
329                sats_vault_btc_ata: Option<solana_address::Address>,
330                token_vault: Option<solana_address::Address>,
331                token_program: Option<solana_address::Address>,
332                associated_token_program: Option<solana_address::Address>,
333                system_program: Option<solana_address::Address>,
334                event_authority: Option<solana_address::Address>,
335                program: Option<solana_address::Address>,
336                __remaining_accounts: Vec<solana_instruction::AccountMeta>,
337}
338
339impl SettleDeployPublicBuilder {
340  pub fn new() -> Self {
341    Self::default()
342  }
343            /// Settler: the deployment's owner (manual claim) or the round authority
344/// (crank settling automated deployments).
345#[inline(always)]
346    pub fn authority(&mut self, authority: solana_address::Address) -> &mut Self {
347                        self.authority = Some(authority);
348                    self
349    }
350            #[inline(always)]
351    pub fn satrush_config(&mut self, satrush_config: solana_address::Address) -> &mut Self {
352                        self.satrush_config = Some(satrush_config);
353                    self
354    }
355            /// Round the deployment belongs to. Must be fully settled.
356#[inline(always)]
357    pub fn round(&mut self, round: solana_address::Address) -> &mut Self {
358                        self.round = Some(round);
359                    self
360    }
361            /// PDA that owns `board_btc_ata`; signs the deposit transfer into the vault.
362#[inline(always)]
363    pub fn board(&mut self, board: solana_address::Address) -> &mut Self {
364                        self.board = Some(board);
365                    self
366    }
367            /// independent of the signer: the crank for automated deployments (it paid
368/// at execute), the user for manual ones.
369#[inline(always)]
370    pub fn rent_recipient(&mut self, rent_recipient: solana_address::Address) -> &mut Self {
371                        self.rent_recipient = Some(rent_recipient);
372                    self
373    }
374            /// The settled deployment; PDA re-keyed off its stored authority so a
375/// crank signer can settle it. Closed to `rent_recipient`.
376#[inline(always)]
377    pub fn public_deployment(&mut self, public_deployment: solana_address::Address) -> &mut Self {
378                        self.public_deployment = Some(public_deployment);
379                    self
380    }
381            /// Miner profile of the deployment's owner (not the signer).
382#[inline(always)]
383    pub fn miner(&mut self, miner: solana_address::Address) -> &mut Self {
384                        self.miner = Some(miner);
385                    self
386    }
387            /// address is derived, so a client cannot dodge reload routing by omitting
388/// it); may be closed/empty, in which case winnings fall back to the miner
389/// profile. Deserialized manually in the handler when live.
390#[inline(always)]
391    pub fn public_automation(&mut self, public_automation: solana_address::Address) -> &mut Self {
392                        self.public_automation = Some(public_automation);
393                    self
394    }
395            /// reload branch only (owner must be the automation PDA, mint the USD
396/// mint). May be closed/empty when the automation is gone.
397#[inline(always)]
398    pub fn automation_usd_ata(&mut self, automation_usd_ata: solana_address::Address) -> &mut Self {
399                        self.automation_usd_ata = Some(automation_usd_ata);
400                    self
401    }
402            /// ATA address in the grubstake-winnings branch only (it necessarily
403/// exists there — the grubstake claim created it). Unused otherwise.
404#[inline(always)]
405    pub fn miner_usd_ata(&mut self, miner_usd_ata: solana_address::Address) -> &mut Self {
406                        self.miner_usd_ata = Some(miner_usd_ata);
407                    self
408    }
409            /// `[optional account]`
410/// The affiliate credited with the deployment's frozen points. Required
411/// (and matched against the miner's bound affiliate) whenever the
412/// deployment carries points; ignored otherwise. Required rather than
413/// forfeited: the backing USD was swept into the treasury at rotation,
414/// and skipping the credit would strand it with no points to redeem it.
415/// The account can never be closed and its address is stored on the
416/// miner, so a missing account is always a client slip a retry fixes.
417#[inline(always)]
418    pub fn affiliate(&mut self, affiliate: Option<solana_address::Address>) -> &mut Self {
419                        self.affiliate = affiliate;
420                    self
421    }
422            /// The Sats Vault the winner's BTC is deposited into for shares.
423#[inline(always)]
424    pub fn sats_vault(&mut self, sats_vault: solana_address::Address) -> &mut Self {
425                        self.sats_vault = Some(sats_vault);
426                    self
427    }
428            /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
429#[inline(always)]
430    pub fn btc_mint(&mut self, btc_mint: solana_address::Address) -> &mut Self {
431                        self.btc_mint = Some(btc_mint);
432                    self
433    }
434            /// USD mint — read only to size hashrate points by the stake's whole-USD
435/// unit and for the transfer decimals.
436/// decimals byte are read. Unchecked for `try_accounts` stack headroom.
437#[inline(always)]
438    pub fn usd_mint(&mut self, usd_mint: solana_address::Address) -> &mut Self {
439                        self.usd_mint = Some(usd_mint);
440                    self
441    }
442            /// Board's USD pool — the reload transfer source (winnings sit there until
443/// claimed or reloaded).
444/// program validates mint and ownership on the transfer CPI. Unchecked for
445/// `try_accounts` stack headroom.
446#[inline(always)]
447    pub fn board_usd_ata(&mut self, board_usd_ata: solana_address::Address) -> &mut Self {
448                        self.board_usd_ata = Some(board_usd_ata);
449                    self
450    }
451            /// Board's BTC reserves — the round's post-swap BTC, source of the deposit.
452/// program validates mint and ownership on the transfer CPI. Unchecked for
453/// `try_accounts` stack headroom.
454#[inline(always)]
455    pub fn board_btc_ata(&mut self, board_btc_ata: solana_address::Address) -> &mut Self {
456                        self.board_btc_ata = Some(board_btc_ata);
457                    self
458    }
459            /// Vault's BTC reserves — the deposit destination.
460#[inline(always)]
461    pub fn sats_vault_btc_ata(&mut self, sats_vault_btc_ata: solana_address::Address) -> &mut Self {
462                        self.sats_vault_btc_ata = Some(sats_vault_btc_ata);
463                    self
464    }
465            /// The Token Vault the miner's token rewards are deposited into for shares.
466#[inline(always)]
467    pub fn token_vault(&mut self, token_vault: solana_address::Address) -> &mut Self {
468                        self.token_vault = Some(token_vault);
469                    self
470    }
471            /// `[optional account, default to 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA']`
472#[inline(always)]
473    pub fn token_program(&mut self, token_program: solana_address::Address) -> &mut Self {
474                        self.token_program = Some(token_program);
475                    self
476    }
477            /// `[optional account, default to 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL']`
478#[inline(always)]
479    pub fn associated_token_program(&mut self, associated_token_program: solana_address::Address) -> &mut Self {
480                        self.associated_token_program = Some(associated_token_program);
481                    self
482    }
483            /// `[optional account, default to '11111111111111111111111111111111']`
484#[inline(always)]
485    pub fn system_program(&mut self, system_program: solana_address::Address) -> &mut Self {
486                        self.system_program = Some(system_program);
487                    self
488    }
489            #[inline(always)]
490    pub fn event_authority(&mut self, event_authority: solana_address::Address) -> &mut Self {
491                        self.event_authority = Some(event_authority);
492                    self
493    }
494            #[inline(always)]
495    pub fn program(&mut self, program: solana_address::Address) -> &mut Self {
496                        self.program = Some(program);
497                    self
498    }
499            /// Add an additional account to the instruction.
500  #[inline(always)]
501  pub fn add_remaining_account(&mut self, account: solana_instruction::AccountMeta) -> &mut Self {
502    self.__remaining_accounts.push(account);
503    self
504  }
505  /// Add additional accounts to the instruction.
506  #[inline(always)]
507  pub fn add_remaining_accounts(&mut self, accounts: &[solana_instruction::AccountMeta]) -> &mut Self {
508    self.__remaining_accounts.extend_from_slice(accounts);
509    self
510  }
511  #[allow(clippy::clone_on_copy)]
512  pub fn instruction(&self) -> solana_instruction::Instruction {
513    let accounts = SettleDeployPublic {
514                              authority: self.authority.expect("authority is not set"),
515                                        satrush_config: self.satrush_config.expect("satrush_config is not set"),
516                                        round: self.round.expect("round is not set"),
517                                        board: self.board.expect("board is not set"),
518                                        rent_recipient: self.rent_recipient.expect("rent_recipient is not set"),
519                                        public_deployment: self.public_deployment.expect("public_deployment is not set"),
520                                        miner: self.miner.expect("miner is not set"),
521                                        public_automation: self.public_automation.expect("public_automation is not set"),
522                                        automation_usd_ata: self.automation_usd_ata.expect("automation_usd_ata is not set"),
523                                        miner_usd_ata: self.miner_usd_ata.expect("miner_usd_ata is not set"),
524                                        affiliate: self.affiliate,
525                                        sats_vault: self.sats_vault.expect("sats_vault is not set"),
526                                        btc_mint: self.btc_mint.expect("btc_mint is not set"),
527                                        usd_mint: self.usd_mint.expect("usd_mint is not set"),
528                                        board_usd_ata: self.board_usd_ata.expect("board_usd_ata is not set"),
529                                        board_btc_ata: self.board_btc_ata.expect("board_btc_ata is not set"),
530                                        sats_vault_btc_ata: self.sats_vault_btc_ata.expect("sats_vault_btc_ata is not set"),
531                                        token_vault: self.token_vault.expect("token_vault is not set"),
532                                        token_program: self.token_program.unwrap_or(solana_address::address!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA")),
533                                        associated_token_program: self.associated_token_program.unwrap_or(solana_address::address!("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL")),
534                                        system_program: self.system_program.unwrap_or(solana_address::address!("11111111111111111111111111111111")),
535                                        event_authority: self.event_authority.expect("event_authority is not set"),
536                                        program: self.program.expect("program is not set"),
537                      };
538    
539    accounts.instruction_with_remaining_accounts(&self.__remaining_accounts)
540  }
541}
542
543  /// `settle_deploy_public` CPI accounts.
544  pub struct SettleDeployPublicCpiAccounts<'a, 'b> {
545                  /// Settler: the deployment's owner (manual claim) or the round authority
546/// (crank settling automated deployments).
547
548      
549                    
550              pub authority: &'b solana_account_info::AccountInfo<'a>,
551                
552                    
553              pub satrush_config: &'b solana_account_info::AccountInfo<'a>,
554                        /// Round the deployment belongs to. Must be fully settled.
555
556      
557                    
558              pub round: &'b solana_account_info::AccountInfo<'a>,
559                        /// PDA that owns `board_btc_ata`; signs the deposit transfer into the vault.
560
561      
562                    
563              pub board: &'b solana_account_info::AccountInfo<'a>,
564                        /// independent of the signer: the crank for automated deployments (it paid
565/// at execute), the user for manual ones.
566
567      
568                    
569              pub rent_recipient: &'b solana_account_info::AccountInfo<'a>,
570                        /// The settled deployment; PDA re-keyed off its stored authority so a
571/// crank signer can settle it. Closed to `rent_recipient`.
572
573      
574                    
575              pub public_deployment: &'b solana_account_info::AccountInfo<'a>,
576                        /// Miner profile of the deployment's owner (not the signer).
577
578      
579                    
580              pub miner: &'b solana_account_info::AccountInfo<'a>,
581                        /// address is derived, so a client cannot dodge reload routing by omitting
582/// it); may be closed/empty, in which case winnings fall back to the miner
583/// profile. Deserialized manually in the handler when live.
584
585      
586                    
587              pub public_automation: &'b solana_account_info::AccountInfo<'a>,
588                        /// reload branch only (owner must be the automation PDA, mint the USD
589/// mint). May be closed/empty when the automation is gone.
590
591      
592                    
593              pub automation_usd_ata: &'b solana_account_info::AccountInfo<'a>,
594                        /// ATA address in the grubstake-winnings branch only (it necessarily
595/// exists there — the grubstake claim created it). Unused otherwise.
596
597      
598                    
599              pub miner_usd_ata: &'b solana_account_info::AccountInfo<'a>,
600                        /// The affiliate credited with the deployment's frozen points. Required
601/// (and matched against the miner's bound affiliate) whenever the
602/// deployment carries points; ignored otherwise. Required rather than
603/// forfeited: the backing USD was swept into the treasury at rotation,
604/// and skipping the credit would strand it with no points to redeem it.
605/// The account can never be closed and its address is stored on the
606/// miner, so a missing account is always a client slip a retry fixes.
607
608      
609                    
610              pub affiliate: Option<&'b solana_account_info::AccountInfo<'a>>,
611                        /// The Sats Vault the winner's BTC is deposited into for shares.
612
613      
614                    
615              pub sats_vault: &'b solana_account_info::AccountInfo<'a>,
616                        /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
617
618      
619                    
620              pub btc_mint: &'b solana_account_info::AccountInfo<'a>,
621                        /// USD mint — read only to size hashrate points by the stake's whole-USD
622/// unit and for the transfer decimals.
623/// decimals byte are read. Unchecked for `try_accounts` stack headroom.
624
625      
626                    
627              pub usd_mint: &'b solana_account_info::AccountInfo<'a>,
628                        /// Board's USD pool — the reload transfer source (winnings sit there until
629/// claimed or reloaded).
630/// program validates mint and ownership on the transfer CPI. Unchecked for
631/// `try_accounts` stack headroom.
632
633      
634                    
635              pub board_usd_ata: &'b solana_account_info::AccountInfo<'a>,
636                        /// Board's BTC reserves — the round's post-swap BTC, source of the deposit.
637/// program validates mint and ownership on the transfer CPI. Unchecked for
638/// `try_accounts` stack headroom.
639
640      
641                    
642              pub board_btc_ata: &'b solana_account_info::AccountInfo<'a>,
643                        /// Vault's BTC reserves — the deposit destination.
644
645      
646                    
647              pub sats_vault_btc_ata: &'b solana_account_info::AccountInfo<'a>,
648                        /// The Token Vault the miner's token rewards are deposited into for shares.
649
650      
651                    
652              pub token_vault: &'b solana_account_info::AccountInfo<'a>,
653                
654                    
655              pub token_program: &'b solana_account_info::AccountInfo<'a>,
656                
657                    
658              pub associated_token_program: &'b solana_account_info::AccountInfo<'a>,
659                
660                    
661              pub system_program: &'b solana_account_info::AccountInfo<'a>,
662                
663                    
664              pub event_authority: &'b solana_account_info::AccountInfo<'a>,
665                
666                    
667              pub program: &'b solana_account_info::AccountInfo<'a>,
668            }
669
670/// `settle_deploy_public` CPI instruction.
671pub struct SettleDeployPublicCpi<'a, 'b> {
672  /// The program to invoke.
673  pub __program: &'b solana_account_info::AccountInfo<'a>,
674            /// Settler: the deployment's owner (manual claim) or the round authority
675/// (crank settling automated deployments).
676
677    
678              
679          pub authority: &'b solana_account_info::AccountInfo<'a>,
680          
681              
682          pub satrush_config: &'b solana_account_info::AccountInfo<'a>,
683                /// Round the deployment belongs to. Must be fully settled.
684
685    
686              
687          pub round: &'b solana_account_info::AccountInfo<'a>,
688                /// PDA that owns `board_btc_ata`; signs the deposit transfer into the vault.
689
690    
691              
692          pub board: &'b solana_account_info::AccountInfo<'a>,
693                /// independent of the signer: the crank for automated deployments (it paid
694/// at execute), the user for manual ones.
695
696    
697              
698          pub rent_recipient: &'b solana_account_info::AccountInfo<'a>,
699                /// The settled deployment; PDA re-keyed off its stored authority so a
700/// crank signer can settle it. Closed to `rent_recipient`.
701
702    
703              
704          pub public_deployment: &'b solana_account_info::AccountInfo<'a>,
705                /// Miner profile of the deployment's owner (not the signer).
706
707    
708              
709          pub miner: &'b solana_account_info::AccountInfo<'a>,
710                /// address is derived, so a client cannot dodge reload routing by omitting
711/// it); may be closed/empty, in which case winnings fall back to the miner
712/// profile. Deserialized manually in the handler when live.
713
714    
715              
716          pub public_automation: &'b solana_account_info::AccountInfo<'a>,
717                /// reload branch only (owner must be the automation PDA, mint the USD
718/// mint). May be closed/empty when the automation is gone.
719
720    
721              
722          pub automation_usd_ata: &'b solana_account_info::AccountInfo<'a>,
723                /// ATA address in the grubstake-winnings branch only (it necessarily
724/// exists there — the grubstake claim created it). Unused otherwise.
725
726    
727              
728          pub miner_usd_ata: &'b solana_account_info::AccountInfo<'a>,
729                /// The affiliate credited with the deployment's frozen points. Required
730/// (and matched against the miner's bound affiliate) whenever the
731/// deployment carries points; ignored otherwise. Required rather than
732/// forfeited: the backing USD was swept into the treasury at rotation,
733/// and skipping the credit would strand it with no points to redeem it.
734/// The account can never be closed and its address is stored on the
735/// miner, so a missing account is always a client slip a retry fixes.
736
737    
738              
739          pub affiliate: Option<&'b solana_account_info::AccountInfo<'a>>,
740                /// The Sats Vault the winner's BTC is deposited into for shares.
741
742    
743              
744          pub sats_vault: &'b solana_account_info::AccountInfo<'a>,
745                /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
746
747    
748              
749          pub btc_mint: &'b solana_account_info::AccountInfo<'a>,
750                /// USD mint — read only to size hashrate points by the stake's whole-USD
751/// unit and for the transfer decimals.
752/// decimals byte are read. Unchecked for `try_accounts` stack headroom.
753
754    
755              
756          pub usd_mint: &'b solana_account_info::AccountInfo<'a>,
757                /// Board's USD pool — the reload transfer source (winnings sit there until
758/// claimed or reloaded).
759/// program validates mint and ownership on the transfer CPI. Unchecked for
760/// `try_accounts` stack headroom.
761
762    
763              
764          pub board_usd_ata: &'b solana_account_info::AccountInfo<'a>,
765                /// Board's BTC reserves — the round's post-swap BTC, source of the deposit.
766/// program validates mint and ownership on the transfer CPI. Unchecked for
767/// `try_accounts` stack headroom.
768
769    
770              
771          pub board_btc_ata: &'b solana_account_info::AccountInfo<'a>,
772                /// Vault's BTC reserves — the deposit destination.
773
774    
775              
776          pub sats_vault_btc_ata: &'b solana_account_info::AccountInfo<'a>,
777                /// The Token Vault the miner's token rewards are deposited into for shares.
778
779    
780              
781          pub token_vault: &'b solana_account_info::AccountInfo<'a>,
782          
783              
784          pub token_program: &'b solana_account_info::AccountInfo<'a>,
785          
786              
787          pub associated_token_program: &'b solana_account_info::AccountInfo<'a>,
788          
789              
790          pub system_program: &'b solana_account_info::AccountInfo<'a>,
791          
792              
793          pub event_authority: &'b solana_account_info::AccountInfo<'a>,
794          
795              
796          pub program: &'b solana_account_info::AccountInfo<'a>,
797        }
798
799impl<'a, 'b> SettleDeployPublicCpi<'a, 'b> {
800  pub fn new(
801    program: &'b solana_account_info::AccountInfo<'a>,
802          accounts: SettleDeployPublicCpiAccounts<'a, 'b>,
803          ) -> Self {
804    Self {
805      __program: program,
806              authority: accounts.authority,
807              satrush_config: accounts.satrush_config,
808              round: accounts.round,
809              board: accounts.board,
810              rent_recipient: accounts.rent_recipient,
811              public_deployment: accounts.public_deployment,
812              miner: accounts.miner,
813              public_automation: accounts.public_automation,
814              automation_usd_ata: accounts.automation_usd_ata,
815              miner_usd_ata: accounts.miner_usd_ata,
816              affiliate: accounts.affiliate,
817              sats_vault: accounts.sats_vault,
818              btc_mint: accounts.btc_mint,
819              usd_mint: accounts.usd_mint,
820              board_usd_ata: accounts.board_usd_ata,
821              board_btc_ata: accounts.board_btc_ata,
822              sats_vault_btc_ata: accounts.sats_vault_btc_ata,
823              token_vault: accounts.token_vault,
824              token_program: accounts.token_program,
825              associated_token_program: accounts.associated_token_program,
826              system_program: accounts.system_program,
827              event_authority: accounts.event_authority,
828              program: accounts.program,
829                }
830  }
831  #[inline(always)]
832  pub fn invoke(&self) -> solana_program_error::ProgramResult {
833    self.invoke_signed_with_remaining_accounts(&[], &[])
834  }
835  #[inline(always)]
836  pub fn invoke_with_remaining_accounts(&self, remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> solana_program_error::ProgramResult {
837    self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
838  }
839  #[inline(always)]
840  pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program_error::ProgramResult {
841    self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
842  }
843  #[allow(clippy::arithmetic_side_effects)]
844  #[allow(clippy::clone_on_copy)]
845  #[allow(clippy::vec_init_then_push)]
846  pub fn invoke_signed_with_remaining_accounts(
847    &self,
848    signers_seeds: &[&[&[u8]]],
849    remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]
850  ) -> solana_program_error::ProgramResult {
851    let mut accounts = Vec::with_capacity(23+ remaining_accounts.len());
852                            accounts.push(solana_instruction::AccountMeta::new(
853            *self.authority.key,
854            true
855          ));
856                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
857            *self.satrush_config.key,
858            false
859          ));
860                                          accounts.push(solana_instruction::AccountMeta::new(
861            *self.round.key,
862            false
863          ));
864                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
865            *self.board.key,
866            false
867          ));
868                                          accounts.push(solana_instruction::AccountMeta::new(
869            *self.rent_recipient.key,
870            false
871          ));
872                                          accounts.push(solana_instruction::AccountMeta::new(
873            *self.public_deployment.key,
874            false
875          ));
876                                          accounts.push(solana_instruction::AccountMeta::new(
877            *self.miner.key,
878            false
879          ));
880                                          accounts.push(solana_instruction::AccountMeta::new(
881            *self.public_automation.key,
882            false
883          ));
884                                          accounts.push(solana_instruction::AccountMeta::new(
885            *self.automation_usd_ata.key,
886            false
887          ));
888                                          accounts.push(solana_instruction::AccountMeta::new(
889            *self.miner_usd_ata.key,
890            false
891          ));
892                                          if let Some(affiliate) = self.affiliate {
893            accounts.push(solana_instruction::AccountMeta::new(
894              *affiliate.key,
895              false,
896            ));
897          } else {
898            accounts.push(solana_instruction::AccountMeta::new_readonly(
899              crate::SATRUSH_ID,
900              false,
901            ));
902          }
903                                          accounts.push(solana_instruction::AccountMeta::new(
904            *self.sats_vault.key,
905            false
906          ));
907                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
908            *self.btc_mint.key,
909            false
910          ));
911                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
912            *self.usd_mint.key,
913            false
914          ));
915                                          accounts.push(solana_instruction::AccountMeta::new(
916            *self.board_usd_ata.key,
917            false
918          ));
919                                          accounts.push(solana_instruction::AccountMeta::new(
920            *self.board_btc_ata.key,
921            false
922          ));
923                                          accounts.push(solana_instruction::AccountMeta::new(
924            *self.sats_vault_btc_ata.key,
925            false
926          ));
927                                          accounts.push(solana_instruction::AccountMeta::new(
928            *self.token_vault.key,
929            false
930          ));
931                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
932            *self.token_program.key,
933            false
934          ));
935                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
936            *self.associated_token_program.key,
937            false
938          ));
939                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
940            *self.system_program.key,
941            false
942          ));
943                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
944            *self.event_authority.key,
945            false
946          ));
947                                          accounts.push(solana_instruction::AccountMeta::new_readonly(
948            *self.program.key,
949            false
950          ));
951                      remaining_accounts.iter().for_each(|remaining_account| {
952      accounts.push(solana_instruction::AccountMeta {
953          pubkey: *remaining_account.0.key,
954          is_signer: remaining_account.1,
955          is_writable: remaining_account.2,
956      })
957    });
958    let data = SettleDeployPublicInstructionData::new().try_to_vec().unwrap();
959    
960    let instruction = solana_instruction::Instruction {
961      program_id: crate::SATRUSH_ID,
962      accounts,
963      data,
964    };
965    let mut account_infos = Vec::with_capacity(24 + remaining_accounts.len());
966    account_infos.push(self.__program.clone());
967                  account_infos.push(self.authority.clone());
968                        account_infos.push(self.satrush_config.clone());
969                        account_infos.push(self.round.clone());
970                        account_infos.push(self.board.clone());
971                        account_infos.push(self.rent_recipient.clone());
972                        account_infos.push(self.public_deployment.clone());
973                        account_infos.push(self.miner.clone());
974                        account_infos.push(self.public_automation.clone());
975                        account_infos.push(self.automation_usd_ata.clone());
976                        account_infos.push(self.miner_usd_ata.clone());
977                        if let Some(affiliate) = self.affiliate {
978          account_infos.push(affiliate.clone());
979        }
980                        account_infos.push(self.sats_vault.clone());
981                        account_infos.push(self.btc_mint.clone());
982                        account_infos.push(self.usd_mint.clone());
983                        account_infos.push(self.board_usd_ata.clone());
984                        account_infos.push(self.board_btc_ata.clone());
985                        account_infos.push(self.sats_vault_btc_ata.clone());
986                        account_infos.push(self.token_vault.clone());
987                        account_infos.push(self.token_program.clone());
988                        account_infos.push(self.associated_token_program.clone());
989                        account_infos.push(self.system_program.clone());
990                        account_infos.push(self.event_authority.clone());
991                        account_infos.push(self.program.clone());
992              remaining_accounts.iter().for_each(|remaining_account| account_infos.push(remaining_account.0.clone()));
993
994    if signers_seeds.is_empty() {
995      solana_cpi::invoke(&instruction, &account_infos)
996    } else {
997      solana_cpi::invoke_signed(&instruction, &account_infos, signers_seeds)
998    }
999  }
1000}
1001
1002/// Instruction builder for `SettleDeployPublic` via CPI.
1003///
1004/// ### Accounts:
1005///
1006                      ///   0. `[writable, signer]` authority
1007          ///   1. `[]` satrush_config
1008                ///   2. `[writable]` round
1009          ///   3. `[]` board
1010                ///   4. `[writable]` rent_recipient
1011                ///   5. `[writable]` public_deployment
1012                ///   6. `[writable]` miner
1013                ///   7. `[writable]` public_automation
1014                ///   8. `[writable]` automation_usd_ata
1015                ///   9. `[writable]` miner_usd_ata
1016                      ///   10. `[writable, optional]` affiliate
1017                ///   11. `[writable]` sats_vault
1018          ///   12. `[]` btc_mint
1019          ///   13. `[]` usd_mint
1020                ///   14. `[writable]` board_usd_ata
1021                ///   15. `[writable]` board_btc_ata
1022                ///   16. `[writable]` sats_vault_btc_ata
1023                ///   17. `[writable]` token_vault
1024          ///   18. `[]` token_program
1025          ///   19. `[]` associated_token_program
1026          ///   20. `[]` system_program
1027          ///   21. `[]` event_authority
1028          ///   22. `[]` program
1029#[derive(Clone, Debug)]
1030pub struct SettleDeployPublicCpiBuilder<'a, 'b> {
1031  instruction: Box<SettleDeployPublicCpiBuilderInstruction<'a, 'b>>,
1032}
1033
1034impl<'a, 'b> SettleDeployPublicCpiBuilder<'a, 'b> {
1035  pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
1036    let instruction = Box::new(SettleDeployPublicCpiBuilderInstruction {
1037      __program: program,
1038              authority: None,
1039              satrush_config: None,
1040              round: None,
1041              board: None,
1042              rent_recipient: None,
1043              public_deployment: None,
1044              miner: None,
1045              public_automation: None,
1046              automation_usd_ata: None,
1047              miner_usd_ata: None,
1048              affiliate: None,
1049              sats_vault: None,
1050              btc_mint: None,
1051              usd_mint: None,
1052              board_usd_ata: None,
1053              board_btc_ata: None,
1054              sats_vault_btc_ata: None,
1055              token_vault: None,
1056              token_program: None,
1057              associated_token_program: None,
1058              system_program: None,
1059              event_authority: None,
1060              program: None,
1061                                __remaining_accounts: Vec::new(),
1062    });
1063    Self { instruction }
1064  }
1065      /// Settler: the deployment's owner (manual claim) or the round authority
1066/// (crank settling automated deployments).
1067#[inline(always)]
1068    pub fn authority(&mut self, authority: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1069                        self.instruction.authority = Some(authority);
1070                    self
1071    }
1072      #[inline(always)]
1073    pub fn satrush_config(&mut self, satrush_config: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1074                        self.instruction.satrush_config = Some(satrush_config);
1075                    self
1076    }
1077      /// Round the deployment belongs to. Must be fully settled.
1078#[inline(always)]
1079    pub fn round(&mut self, round: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1080                        self.instruction.round = Some(round);
1081                    self
1082    }
1083      /// PDA that owns `board_btc_ata`; signs the deposit transfer into the vault.
1084#[inline(always)]
1085    pub fn board(&mut self, board: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1086                        self.instruction.board = Some(board);
1087                    self
1088    }
1089      /// independent of the signer: the crank for automated deployments (it paid
1090/// at execute), the user for manual ones.
1091#[inline(always)]
1092    pub fn rent_recipient(&mut self, rent_recipient: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1093                        self.instruction.rent_recipient = Some(rent_recipient);
1094                    self
1095    }
1096      /// The settled deployment; PDA re-keyed off its stored authority so a
1097/// crank signer can settle it. Closed to `rent_recipient`.
1098#[inline(always)]
1099    pub fn public_deployment(&mut self, public_deployment: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1100                        self.instruction.public_deployment = Some(public_deployment);
1101                    self
1102    }
1103      /// Miner profile of the deployment's owner (not the signer).
1104#[inline(always)]
1105    pub fn miner(&mut self, miner: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1106                        self.instruction.miner = Some(miner);
1107                    self
1108    }
1109      /// address is derived, so a client cannot dodge reload routing by omitting
1110/// it); may be closed/empty, in which case winnings fall back to the miner
1111/// profile. Deserialized manually in the handler when live.
1112#[inline(always)]
1113    pub fn public_automation(&mut self, public_automation: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1114                        self.instruction.public_automation = Some(public_automation);
1115                    self
1116    }
1117      /// reload branch only (owner must be the automation PDA, mint the USD
1118/// mint). May be closed/empty when the automation is gone.
1119#[inline(always)]
1120    pub fn automation_usd_ata(&mut self, automation_usd_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1121                        self.instruction.automation_usd_ata = Some(automation_usd_ata);
1122                    self
1123    }
1124      /// ATA address in the grubstake-winnings branch only (it necessarily
1125/// exists there — the grubstake claim created it). Unused otherwise.
1126#[inline(always)]
1127    pub fn miner_usd_ata(&mut self, miner_usd_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1128                        self.instruction.miner_usd_ata = Some(miner_usd_ata);
1129                    self
1130    }
1131      /// `[optional account]`
1132/// The affiliate credited with the deployment's frozen points. Required
1133/// (and matched against the miner's bound affiliate) whenever the
1134/// deployment carries points; ignored otherwise. Required rather than
1135/// forfeited: the backing USD was swept into the treasury at rotation,
1136/// and skipping the credit would strand it with no points to redeem it.
1137/// The account can never be closed and its address is stored on the
1138/// miner, so a missing account is always a client slip a retry fixes.
1139#[inline(always)]
1140    pub fn affiliate(&mut self, affiliate: Option<&'b solana_account_info::AccountInfo<'a>>) -> &mut Self {
1141                        self.instruction.affiliate = affiliate;
1142                    self
1143    }
1144      /// The Sats Vault the winner's BTC is deposited into for shares.
1145#[inline(always)]
1146    pub fn sats_vault(&mut self, sats_vault: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1147                        self.instruction.sats_vault = Some(sats_vault);
1148                    self
1149    }
1150      /// decimals byte are read. Unchecked for `try_accounts` stack headroom.
1151#[inline(always)]
1152    pub fn btc_mint(&mut self, btc_mint: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1153                        self.instruction.btc_mint = Some(btc_mint);
1154                    self
1155    }
1156      /// USD mint — read only to size hashrate points by the stake's whole-USD
1157/// unit and for the transfer decimals.
1158/// decimals byte are read. Unchecked for `try_accounts` stack headroom.
1159#[inline(always)]
1160    pub fn usd_mint(&mut self, usd_mint: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1161                        self.instruction.usd_mint = Some(usd_mint);
1162                    self
1163    }
1164      /// Board's USD pool — the reload transfer source (winnings sit there until
1165/// claimed or reloaded).
1166/// program validates mint and ownership on the transfer CPI. Unchecked for
1167/// `try_accounts` stack headroom.
1168#[inline(always)]
1169    pub fn board_usd_ata(&mut self, board_usd_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1170                        self.instruction.board_usd_ata = Some(board_usd_ata);
1171                    self
1172    }
1173      /// Board's BTC reserves — the round's post-swap BTC, source of the deposit.
1174/// program validates mint and ownership on the transfer CPI. Unchecked for
1175/// `try_accounts` stack headroom.
1176#[inline(always)]
1177    pub fn board_btc_ata(&mut self, board_btc_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1178                        self.instruction.board_btc_ata = Some(board_btc_ata);
1179                    self
1180    }
1181      /// Vault's BTC reserves — the deposit destination.
1182#[inline(always)]
1183    pub fn sats_vault_btc_ata(&mut self, sats_vault_btc_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1184                        self.instruction.sats_vault_btc_ata = Some(sats_vault_btc_ata);
1185                    self
1186    }
1187      /// The Token Vault the miner's token rewards are deposited into for shares.
1188#[inline(always)]
1189    pub fn token_vault(&mut self, token_vault: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1190                        self.instruction.token_vault = Some(token_vault);
1191                    self
1192    }
1193      #[inline(always)]
1194    pub fn token_program(&mut self, token_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1195                        self.instruction.token_program = Some(token_program);
1196                    self
1197    }
1198      #[inline(always)]
1199    pub fn associated_token_program(&mut self, associated_token_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1200                        self.instruction.associated_token_program = Some(associated_token_program);
1201                    self
1202    }
1203      #[inline(always)]
1204    pub fn system_program(&mut self, system_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1205                        self.instruction.system_program = Some(system_program);
1206                    self
1207    }
1208      #[inline(always)]
1209    pub fn event_authority(&mut self, event_authority: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1210                        self.instruction.event_authority = Some(event_authority);
1211                    self
1212    }
1213      #[inline(always)]
1214    pub fn program(&mut self, program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
1215                        self.instruction.program = Some(program);
1216                    self
1217    }
1218            /// Add an additional account to the instruction.
1219  #[inline(always)]
1220  pub fn add_remaining_account(&mut self, account: &'b solana_account_info::AccountInfo<'a>, is_writable: bool, is_signer: bool) -> &mut Self {
1221    self.instruction.__remaining_accounts.push((account, is_writable, is_signer));
1222    self
1223  }
1224  /// Add additional accounts to the instruction.
1225  ///
1226  /// Each account is represented by a tuple of the `AccountInfo`, a `bool` indicating whether the account is writable or not,
1227  /// and a `bool` indicating whether the account is a signer or not.
1228  #[inline(always)]
1229  pub fn add_remaining_accounts(&mut self, accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> &mut Self {
1230    self.instruction.__remaining_accounts.extend_from_slice(accounts);
1231    self
1232  }
1233  #[inline(always)]
1234  pub fn invoke(&self) -> solana_program_error::ProgramResult {
1235    self.invoke_signed(&[])
1236  }
1237  #[allow(clippy::clone_on_copy)]
1238  #[allow(clippy::vec_init_then_push)]
1239  pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program_error::ProgramResult {
1240        let instruction = SettleDeployPublicCpi {
1241        __program: self.instruction.__program,
1242                  
1243          authority: self.instruction.authority.expect("authority is not set"),
1244                  
1245          satrush_config: self.instruction.satrush_config.expect("satrush_config is not set"),
1246                  
1247          round: self.instruction.round.expect("round is not set"),
1248                  
1249          board: self.instruction.board.expect("board is not set"),
1250                  
1251          rent_recipient: self.instruction.rent_recipient.expect("rent_recipient is not set"),
1252                  
1253          public_deployment: self.instruction.public_deployment.expect("public_deployment is not set"),
1254                  
1255          miner: self.instruction.miner.expect("miner is not set"),
1256                  
1257          public_automation: self.instruction.public_automation.expect("public_automation is not set"),
1258                  
1259          automation_usd_ata: self.instruction.automation_usd_ata.expect("automation_usd_ata is not set"),
1260                  
1261          miner_usd_ata: self.instruction.miner_usd_ata.expect("miner_usd_ata is not set"),
1262                  
1263          affiliate: self.instruction.affiliate,
1264                  
1265          sats_vault: self.instruction.sats_vault.expect("sats_vault is not set"),
1266                  
1267          btc_mint: self.instruction.btc_mint.expect("btc_mint is not set"),
1268                  
1269          usd_mint: self.instruction.usd_mint.expect("usd_mint is not set"),
1270                  
1271          board_usd_ata: self.instruction.board_usd_ata.expect("board_usd_ata is not set"),
1272                  
1273          board_btc_ata: self.instruction.board_btc_ata.expect("board_btc_ata is not set"),
1274                  
1275          sats_vault_btc_ata: self.instruction.sats_vault_btc_ata.expect("sats_vault_btc_ata is not set"),
1276                  
1277          token_vault: self.instruction.token_vault.expect("token_vault is not set"),
1278                  
1279          token_program: self.instruction.token_program.expect("token_program is not set"),
1280                  
1281          associated_token_program: self.instruction.associated_token_program.expect("associated_token_program is not set"),
1282                  
1283          system_program: self.instruction.system_program.expect("system_program is not set"),
1284                  
1285          event_authority: self.instruction.event_authority.expect("event_authority is not set"),
1286                  
1287          program: self.instruction.program.expect("program is not set"),
1288                    };
1289    instruction.invoke_signed_with_remaining_accounts(signers_seeds, &self.instruction.__remaining_accounts)
1290  }
1291}
1292
1293#[derive(Clone, Debug)]
1294struct SettleDeployPublicCpiBuilderInstruction<'a, 'b> {
1295  __program: &'b solana_account_info::AccountInfo<'a>,
1296            authority: Option<&'b solana_account_info::AccountInfo<'a>>,
1297                satrush_config: Option<&'b solana_account_info::AccountInfo<'a>>,
1298                round: Option<&'b solana_account_info::AccountInfo<'a>>,
1299                board: Option<&'b solana_account_info::AccountInfo<'a>>,
1300                rent_recipient: Option<&'b solana_account_info::AccountInfo<'a>>,
1301                public_deployment: Option<&'b solana_account_info::AccountInfo<'a>>,
1302                miner: Option<&'b solana_account_info::AccountInfo<'a>>,
1303                public_automation: Option<&'b solana_account_info::AccountInfo<'a>>,
1304                automation_usd_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
1305                miner_usd_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
1306                affiliate: Option<&'b solana_account_info::AccountInfo<'a>>,
1307                sats_vault: Option<&'b solana_account_info::AccountInfo<'a>>,
1308                btc_mint: Option<&'b solana_account_info::AccountInfo<'a>>,
1309                usd_mint: Option<&'b solana_account_info::AccountInfo<'a>>,
1310                board_usd_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
1311                board_btc_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
1312                sats_vault_btc_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
1313                token_vault: Option<&'b solana_account_info::AccountInfo<'a>>,
1314                token_program: Option<&'b solana_account_info::AccountInfo<'a>>,
1315                associated_token_program: Option<&'b solana_account_info::AccountInfo<'a>>,
1316                system_program: Option<&'b solana_account_info::AccountInfo<'a>>,
1317                event_authority: Option<&'b solana_account_info::AccountInfo<'a>>,
1318                program: Option<&'b solana_account_info::AccountInfo<'a>>,
1319                /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
1320  __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
1321}
1322