1use borsh::BorshSerialize;
9use borsh::BorshDeserialize;
10
11pub const EXECUTE_PUBLIC_AUTOMATION_DISCRIMINATOR: [u8; 8] = [212, 191, 100, 136, 18, 213, 42, 72];
12
13#[derive(Debug)]
15pub struct ExecutePublicAutomation {
16 pub authority: solana_address::Address,
22
23
24 pub satrush_config: solana_address::Address,
25
26
27 pub board: solana_address::Address,
28 pub round: solana_address::Address,
33 pub public_automation: solana_address::Address,
40
41
42 pub usd_mint: solana_address::Address,
43 pub automation_usd_ata: solana_address::Address,
48 pub board_usd_ata: solana_address::Address,
53 pub public_deployment: solana_address::Address,
59 pub miner: solana_address::Address,
65 pub slot_hashes: solana_address::Address,
71
72
73 pub token_program: solana_address::Address,
74
75
76 pub system_program: solana_address::Address,
77
78
79 pub event_authority: solana_address::Address,
80
81
82 pub program: solana_address::Address,
83 }
84
85impl ExecutePublicAutomation {
86 pub fn instruction(&self, args: ExecutePublicAutomationInstructionArgs) -> solana_instruction::Instruction {
87 self.instruction_with_remaining_accounts(args, &[])
88 }
89 #[allow(clippy::arithmetic_side_effects)]
90 #[allow(clippy::vec_init_then_push)]
91 pub fn instruction_with_remaining_accounts(&self, args: ExecutePublicAutomationInstructionArgs, remaining_accounts: &[solana_instruction::AccountMeta]) -> solana_instruction::Instruction {
92 let mut accounts = Vec::with_capacity(15+ remaining_accounts.len());
93 accounts.push(solana_instruction::AccountMeta::new(
94 self.authority,
95 true
96 ));
97 accounts.push(solana_instruction::AccountMeta::new_readonly(
98 self.satrush_config,
99 false
100 ));
101 accounts.push(solana_instruction::AccountMeta::new(
102 self.board,
103 false
104 ));
105 accounts.push(solana_instruction::AccountMeta::new(
106 self.round,
107 false
108 ));
109 accounts.push(solana_instruction::AccountMeta::new(
110 self.public_automation,
111 false
112 ));
113 accounts.push(solana_instruction::AccountMeta::new_readonly(
114 self.usd_mint,
115 false
116 ));
117 accounts.push(solana_instruction::AccountMeta::new(
118 self.automation_usd_ata,
119 false
120 ));
121 accounts.push(solana_instruction::AccountMeta::new(
122 self.board_usd_ata,
123 false
124 ));
125 accounts.push(solana_instruction::AccountMeta::new(
126 self.public_deployment,
127 false
128 ));
129 accounts.push(solana_instruction::AccountMeta::new(
130 self.miner,
131 false
132 ));
133 accounts.push(solana_instruction::AccountMeta::new_readonly(
134 self.slot_hashes,
135 false
136 ));
137 accounts.push(solana_instruction::AccountMeta::new_readonly(
138 self.token_program,
139 false
140 ));
141 accounts.push(solana_instruction::AccountMeta::new_readonly(
142 self.system_program,
143 false
144 ));
145 accounts.push(solana_instruction::AccountMeta::new_readonly(
146 self.event_authority,
147 false
148 ));
149 accounts.push(solana_instruction::AccountMeta::new_readonly(
150 self.program,
151 false
152 ));
153 accounts.extend_from_slice(remaining_accounts);
154 let mut data = ExecutePublicAutomationInstructionData::new().try_to_vec().unwrap();
155 let mut args = args.try_to_vec().unwrap();
156 data.append(&mut args);
157
158 solana_instruction::Instruction {
159 program_id: crate::SATRUSH_ID,
160 accounts,
161 data,
162 }
163 }
164}
165
166#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
167 pub struct ExecutePublicAutomationInstructionData {
168 discriminator: [u8; 8],
169 }
170
171impl ExecutePublicAutomationInstructionData {
172 pub fn new() -> Self {
173 Self {
174 discriminator: [212, 191, 100, 136, 18, 213, 42, 72],
175 }
176 }
177
178 pub(crate) fn try_to_vec(&self) -> Result<Vec<u8>, std::io::Error> {
179 borsh::to_vec(self)
180 }
181 }
182
183impl Default for ExecutePublicAutomationInstructionData {
184 fn default() -> Self {
185 Self::new()
186 }
187}
188
189#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
190 pub struct ExecutePublicAutomationInstructionArgs {
191 pub selection_mask: Option<u32>,
192 }
193
194impl ExecutePublicAutomationInstructionArgs {
195 pub(crate) fn try_to_vec(&self) -> Result<Vec<u8>, std::io::Error> {
196 borsh::to_vec(self)
197 }
198}
199
200
201#[derive(Clone, Debug, Default)]
221pub struct ExecutePublicAutomationBuilder {
222 authority: Option<solana_address::Address>,
223 satrush_config: Option<solana_address::Address>,
224 board: Option<solana_address::Address>,
225 round: Option<solana_address::Address>,
226 public_automation: Option<solana_address::Address>,
227 usd_mint: Option<solana_address::Address>,
228 automation_usd_ata: Option<solana_address::Address>,
229 board_usd_ata: Option<solana_address::Address>,
230 public_deployment: Option<solana_address::Address>,
231 miner: Option<solana_address::Address>,
232 slot_hashes: Option<solana_address::Address>,
233 token_program: Option<solana_address::Address>,
234 system_program: Option<solana_address::Address>,
235 event_authority: Option<solana_address::Address>,
236 program: Option<solana_address::Address>,
237 selection_mask: Option<u32>,
238 __remaining_accounts: Vec<solana_instruction::AccountMeta>,
239}
240
241impl ExecutePublicAutomationBuilder {
242 pub fn new() -> Self {
243 Self::default()
244 }
245 #[inline(always)]
248 pub fn authority(&mut self, authority: solana_address::Address) -> &mut Self {
249 self.authority = Some(authority);
250 self
251 }
252 #[inline(always)]
253 pub fn satrush_config(&mut self, satrush_config: solana_address::Address) -> &mut Self {
254 self.satrush_config = Some(satrush_config);
255 self
256 }
257 #[inline(always)]
258 pub fn board(&mut self, board: solana_address::Address) -> &mut Self {
259 self.board = Some(board);
260 self
261 }
262 #[inline(always)]
264 pub fn round(&mut self, round: solana_address::Address) -> &mut Self {
265 self.round = Some(round);
266 self
267 }
268 #[inline(always)]
272 pub fn public_automation(&mut self, public_automation: solana_address::Address) -> &mut Self {
273 self.public_automation = Some(public_automation);
274 self
275 }
276 #[inline(always)]
277 pub fn usd_mint(&mut self, usd_mint: solana_address::Address) -> &mut Self {
278 self.usd_mint = Some(usd_mint);
279 self
280 }
281 #[inline(always)]
283 pub fn automation_usd_ata(&mut self, automation_usd_ata: solana_address::Address) -> &mut Self {
284 self.automation_usd_ata = Some(automation_usd_ata);
285 self
286 }
287 #[inline(always)]
289 pub fn board_usd_ata(&mut self, board_usd_ata: solana_address::Address) -> &mut Self {
290 self.board_usd_ata = Some(board_usd_ata);
291 self
292 }
293 #[inline(always)]
296 pub fn public_deployment(&mut self, public_deployment: solana_address::Address) -> &mut Self {
297 self.public_deployment = Some(public_deployment);
298 self
299 }
300 #[inline(always)]
303 pub fn miner(&mut self, miner: solana_address::Address) -> &mut Self {
304 self.miner = Some(miner);
305 self
306 }
307 #[inline(always)]
311 pub fn slot_hashes(&mut self, slot_hashes: solana_address::Address) -> &mut Self {
312 self.slot_hashes = Some(slot_hashes);
313 self
314 }
315 #[inline(always)]
317 pub fn token_program(&mut self, token_program: solana_address::Address) -> &mut Self {
318 self.token_program = Some(token_program);
319 self
320 }
321 #[inline(always)]
323 pub fn system_program(&mut self, system_program: solana_address::Address) -> &mut Self {
324 self.system_program = Some(system_program);
325 self
326 }
327 #[inline(always)]
328 pub fn event_authority(&mut self, event_authority: solana_address::Address) -> &mut Self {
329 self.event_authority = Some(event_authority);
330 self
331 }
332 #[inline(always)]
333 pub fn program(&mut self, program: solana_address::Address) -> &mut Self {
334 self.program = Some(program);
335 self
336 }
337 #[inline(always)]
339 pub fn selection_mask(&mut self, selection_mask: u32) -> &mut Self {
340 self.selection_mask = Some(selection_mask);
341 self
342 }
343 #[inline(always)]
345 pub fn add_remaining_account(&mut self, account: solana_instruction::AccountMeta) -> &mut Self {
346 self.__remaining_accounts.push(account);
347 self
348 }
349 #[inline(always)]
351 pub fn add_remaining_accounts(&mut self, accounts: &[solana_instruction::AccountMeta]) -> &mut Self {
352 self.__remaining_accounts.extend_from_slice(accounts);
353 self
354 }
355 #[allow(clippy::clone_on_copy)]
356 pub fn instruction(&self) -> solana_instruction::Instruction {
357 let accounts = ExecutePublicAutomation {
358 authority: self.authority.expect("authority is not set"),
359 satrush_config: self.satrush_config.expect("satrush_config is not set"),
360 board: self.board.expect("board is not set"),
361 round: self.round.expect("round is not set"),
362 public_automation: self.public_automation.expect("public_automation is not set"),
363 usd_mint: self.usd_mint.expect("usd_mint is not set"),
364 automation_usd_ata: self.automation_usd_ata.expect("automation_usd_ata is not set"),
365 board_usd_ata: self.board_usd_ata.expect("board_usd_ata is not set"),
366 public_deployment: self.public_deployment.expect("public_deployment is not set"),
367 miner: self.miner.expect("miner is not set"),
368 slot_hashes: self.slot_hashes.unwrap_or(solana_address::address!("SysvarS1otHashes111111111111111111111111111")),
369 token_program: self.token_program.unwrap_or(solana_address::address!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA")),
370 system_program: self.system_program.unwrap_or(solana_address::address!("11111111111111111111111111111111")),
371 event_authority: self.event_authority.expect("event_authority is not set"),
372 program: self.program.expect("program is not set"),
373 };
374 let args = ExecutePublicAutomationInstructionArgs {
375 selection_mask: self.selection_mask.clone(),
376 };
377
378 accounts.instruction_with_remaining_accounts(args, &self.__remaining_accounts)
379 }
380}
381
382 pub struct ExecutePublicAutomationCpiAccounts<'a, 'b> {
384 pub authority: &'b solana_account_info::AccountInfo<'a>,
390
391
392 pub satrush_config: &'b solana_account_info::AccountInfo<'a>,
393
394
395 pub board: &'b solana_account_info::AccountInfo<'a>,
396 pub round: &'b solana_account_info::AccountInfo<'a>,
401 pub public_automation: &'b solana_account_info::AccountInfo<'a>,
408
409
410 pub usd_mint: &'b solana_account_info::AccountInfo<'a>,
411 pub automation_usd_ata: &'b solana_account_info::AccountInfo<'a>,
416 pub board_usd_ata: &'b solana_account_info::AccountInfo<'a>,
421 pub public_deployment: &'b solana_account_info::AccountInfo<'a>,
427 pub miner: &'b solana_account_info::AccountInfo<'a>,
433 pub slot_hashes: &'b solana_account_info::AccountInfo<'a>,
439
440
441 pub token_program: &'b solana_account_info::AccountInfo<'a>,
442
443
444 pub system_program: &'b solana_account_info::AccountInfo<'a>,
445
446
447 pub event_authority: &'b solana_account_info::AccountInfo<'a>,
448
449
450 pub program: &'b solana_account_info::AccountInfo<'a>,
451 }
452
453pub struct ExecutePublicAutomationCpi<'a, 'b> {
455 pub __program: &'b solana_account_info::AccountInfo<'a>,
457 pub authority: &'b solana_account_info::AccountInfo<'a>,
463
464
465 pub satrush_config: &'b solana_account_info::AccountInfo<'a>,
466
467
468 pub board: &'b solana_account_info::AccountInfo<'a>,
469 pub round: &'b solana_account_info::AccountInfo<'a>,
474 pub public_automation: &'b solana_account_info::AccountInfo<'a>,
481
482
483 pub usd_mint: &'b solana_account_info::AccountInfo<'a>,
484 pub automation_usd_ata: &'b solana_account_info::AccountInfo<'a>,
489 pub board_usd_ata: &'b solana_account_info::AccountInfo<'a>,
494 pub public_deployment: &'b solana_account_info::AccountInfo<'a>,
500 pub miner: &'b solana_account_info::AccountInfo<'a>,
506 pub slot_hashes: &'b solana_account_info::AccountInfo<'a>,
512
513
514 pub token_program: &'b solana_account_info::AccountInfo<'a>,
515
516
517 pub system_program: &'b solana_account_info::AccountInfo<'a>,
518
519
520 pub event_authority: &'b solana_account_info::AccountInfo<'a>,
521
522
523 pub program: &'b solana_account_info::AccountInfo<'a>,
524 pub __args: ExecutePublicAutomationInstructionArgs,
526 }
527
528impl<'a, 'b> ExecutePublicAutomationCpi<'a, 'b> {
529 pub fn new(
530 program: &'b solana_account_info::AccountInfo<'a>,
531 accounts: ExecutePublicAutomationCpiAccounts<'a, 'b>,
532 args: ExecutePublicAutomationInstructionArgs,
533 ) -> Self {
534 Self {
535 __program: program,
536 authority: accounts.authority,
537 satrush_config: accounts.satrush_config,
538 board: accounts.board,
539 round: accounts.round,
540 public_automation: accounts.public_automation,
541 usd_mint: accounts.usd_mint,
542 automation_usd_ata: accounts.automation_usd_ata,
543 board_usd_ata: accounts.board_usd_ata,
544 public_deployment: accounts.public_deployment,
545 miner: accounts.miner,
546 slot_hashes: accounts.slot_hashes,
547 token_program: accounts.token_program,
548 system_program: accounts.system_program,
549 event_authority: accounts.event_authority,
550 program: accounts.program,
551 __args: args,
552 }
553 }
554 #[inline(always)]
555 pub fn invoke(&self) -> solana_program_error::ProgramResult {
556 self.invoke_signed_with_remaining_accounts(&[], &[])
557 }
558 #[inline(always)]
559 pub fn invoke_with_remaining_accounts(&self, remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> solana_program_error::ProgramResult {
560 self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
561 }
562 #[inline(always)]
563 pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program_error::ProgramResult {
564 self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
565 }
566 #[allow(clippy::arithmetic_side_effects)]
567 #[allow(clippy::clone_on_copy)]
568 #[allow(clippy::vec_init_then_push)]
569 pub fn invoke_signed_with_remaining_accounts(
570 &self,
571 signers_seeds: &[&[&[u8]]],
572 remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]
573 ) -> solana_program_error::ProgramResult {
574 let mut accounts = Vec::with_capacity(15+ remaining_accounts.len());
575 accounts.push(solana_instruction::AccountMeta::new(
576 *self.authority.key,
577 true
578 ));
579 accounts.push(solana_instruction::AccountMeta::new_readonly(
580 *self.satrush_config.key,
581 false
582 ));
583 accounts.push(solana_instruction::AccountMeta::new(
584 *self.board.key,
585 false
586 ));
587 accounts.push(solana_instruction::AccountMeta::new(
588 *self.round.key,
589 false
590 ));
591 accounts.push(solana_instruction::AccountMeta::new(
592 *self.public_automation.key,
593 false
594 ));
595 accounts.push(solana_instruction::AccountMeta::new_readonly(
596 *self.usd_mint.key,
597 false
598 ));
599 accounts.push(solana_instruction::AccountMeta::new(
600 *self.automation_usd_ata.key,
601 false
602 ));
603 accounts.push(solana_instruction::AccountMeta::new(
604 *self.board_usd_ata.key,
605 false
606 ));
607 accounts.push(solana_instruction::AccountMeta::new(
608 *self.public_deployment.key,
609 false
610 ));
611 accounts.push(solana_instruction::AccountMeta::new(
612 *self.miner.key,
613 false
614 ));
615 accounts.push(solana_instruction::AccountMeta::new_readonly(
616 *self.slot_hashes.key,
617 false
618 ));
619 accounts.push(solana_instruction::AccountMeta::new_readonly(
620 *self.token_program.key,
621 false
622 ));
623 accounts.push(solana_instruction::AccountMeta::new_readonly(
624 *self.system_program.key,
625 false
626 ));
627 accounts.push(solana_instruction::AccountMeta::new_readonly(
628 *self.event_authority.key,
629 false
630 ));
631 accounts.push(solana_instruction::AccountMeta::new_readonly(
632 *self.program.key,
633 false
634 ));
635 remaining_accounts.iter().for_each(|remaining_account| {
636 accounts.push(solana_instruction::AccountMeta {
637 pubkey: *remaining_account.0.key,
638 is_signer: remaining_account.1,
639 is_writable: remaining_account.2,
640 })
641 });
642 let mut data = ExecutePublicAutomationInstructionData::new().try_to_vec().unwrap();
643 let mut args = self.__args.try_to_vec().unwrap();
644 data.append(&mut args);
645
646 let instruction = solana_instruction::Instruction {
647 program_id: crate::SATRUSH_ID,
648 accounts,
649 data,
650 };
651 let mut account_infos = Vec::with_capacity(16 + remaining_accounts.len());
652 account_infos.push(self.__program.clone());
653 account_infos.push(self.authority.clone());
654 account_infos.push(self.satrush_config.clone());
655 account_infos.push(self.board.clone());
656 account_infos.push(self.round.clone());
657 account_infos.push(self.public_automation.clone());
658 account_infos.push(self.usd_mint.clone());
659 account_infos.push(self.automation_usd_ata.clone());
660 account_infos.push(self.board_usd_ata.clone());
661 account_infos.push(self.public_deployment.clone());
662 account_infos.push(self.miner.clone());
663 account_infos.push(self.slot_hashes.clone());
664 account_infos.push(self.token_program.clone());
665 account_infos.push(self.system_program.clone());
666 account_infos.push(self.event_authority.clone());
667 account_infos.push(self.program.clone());
668 remaining_accounts.iter().for_each(|remaining_account| account_infos.push(remaining_account.0.clone()));
669
670 if signers_seeds.is_empty() {
671 solana_cpi::invoke(&instruction, &account_infos)
672 } else {
673 solana_cpi::invoke_signed(&instruction, &account_infos, signers_seeds)
674 }
675 }
676}
677
678#[derive(Clone, Debug)]
698pub struct ExecutePublicAutomationCpiBuilder<'a, 'b> {
699 instruction: Box<ExecutePublicAutomationCpiBuilderInstruction<'a, 'b>>,
700}
701
702impl<'a, 'b> ExecutePublicAutomationCpiBuilder<'a, 'b> {
703 pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
704 let instruction = Box::new(ExecutePublicAutomationCpiBuilderInstruction {
705 __program: program,
706 authority: None,
707 satrush_config: None,
708 board: None,
709 round: None,
710 public_automation: None,
711 usd_mint: None,
712 automation_usd_ata: None,
713 board_usd_ata: None,
714 public_deployment: None,
715 miner: None,
716 slot_hashes: None,
717 token_program: None,
718 system_program: None,
719 event_authority: None,
720 program: None,
721 selection_mask: None,
722 __remaining_accounts: Vec::new(),
723 });
724 Self { instruction }
725 }
726 #[inline(always)]
729 pub fn authority(&mut self, authority: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
730 self.instruction.authority = Some(authority);
731 self
732 }
733 #[inline(always)]
734 pub fn satrush_config(&mut self, satrush_config: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
735 self.instruction.satrush_config = Some(satrush_config);
736 self
737 }
738 #[inline(always)]
739 pub fn board(&mut self, board: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
740 self.instruction.board = Some(board);
741 self
742 }
743 #[inline(always)]
745 pub fn round(&mut self, round: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
746 self.instruction.round = Some(round);
747 self
748 }
749 #[inline(always)]
753 pub fn public_automation(&mut self, public_automation: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
754 self.instruction.public_automation = Some(public_automation);
755 self
756 }
757 #[inline(always)]
758 pub fn usd_mint(&mut self, usd_mint: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
759 self.instruction.usd_mint = Some(usd_mint);
760 self
761 }
762 #[inline(always)]
764 pub fn automation_usd_ata(&mut self, automation_usd_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
765 self.instruction.automation_usd_ata = Some(automation_usd_ata);
766 self
767 }
768 #[inline(always)]
770 pub fn board_usd_ata(&mut self, board_usd_ata: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
771 self.instruction.board_usd_ata = Some(board_usd_ata);
772 self
773 }
774 #[inline(always)]
777 pub fn public_deployment(&mut self, public_deployment: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
778 self.instruction.public_deployment = Some(public_deployment);
779 self
780 }
781 #[inline(always)]
784 pub fn miner(&mut self, miner: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
785 self.instruction.miner = Some(miner);
786 self
787 }
788 #[inline(always)]
791 pub fn slot_hashes(&mut self, slot_hashes: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
792 self.instruction.slot_hashes = Some(slot_hashes);
793 self
794 }
795 #[inline(always)]
796 pub fn token_program(&mut self, token_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
797 self.instruction.token_program = Some(token_program);
798 self
799 }
800 #[inline(always)]
801 pub fn system_program(&mut self, system_program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
802 self.instruction.system_program = Some(system_program);
803 self
804 }
805 #[inline(always)]
806 pub fn event_authority(&mut self, event_authority: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
807 self.instruction.event_authority = Some(event_authority);
808 self
809 }
810 #[inline(always)]
811 pub fn program(&mut self, program: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
812 self.instruction.program = Some(program);
813 self
814 }
815 #[inline(always)]
817 pub fn selection_mask(&mut self, selection_mask: u32) -> &mut Self {
818 self.instruction.selection_mask = Some(selection_mask);
819 self
820 }
821 #[inline(always)]
823 pub fn add_remaining_account(&mut self, account: &'b solana_account_info::AccountInfo<'a>, is_writable: bool, is_signer: bool) -> &mut Self {
824 self.instruction.__remaining_accounts.push((account, is_writable, is_signer));
825 self
826 }
827 #[inline(always)]
832 pub fn add_remaining_accounts(&mut self, accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> &mut Self {
833 self.instruction.__remaining_accounts.extend_from_slice(accounts);
834 self
835 }
836 #[inline(always)]
837 pub fn invoke(&self) -> solana_program_error::ProgramResult {
838 self.invoke_signed(&[])
839 }
840 #[allow(clippy::clone_on_copy)]
841 #[allow(clippy::vec_init_then_push)]
842 pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program_error::ProgramResult {
843 let args = ExecutePublicAutomationInstructionArgs {
844 selection_mask: self.instruction.selection_mask.clone(),
845 };
846 let instruction = ExecutePublicAutomationCpi {
847 __program: self.instruction.__program,
848
849 authority: self.instruction.authority.expect("authority is not set"),
850
851 satrush_config: self.instruction.satrush_config.expect("satrush_config is not set"),
852
853 board: self.instruction.board.expect("board is not set"),
854
855 round: self.instruction.round.expect("round is not set"),
856
857 public_automation: self.instruction.public_automation.expect("public_automation is not set"),
858
859 usd_mint: self.instruction.usd_mint.expect("usd_mint is not set"),
860
861 automation_usd_ata: self.instruction.automation_usd_ata.expect("automation_usd_ata is not set"),
862
863 board_usd_ata: self.instruction.board_usd_ata.expect("board_usd_ata is not set"),
864
865 public_deployment: self.instruction.public_deployment.expect("public_deployment is not set"),
866
867 miner: self.instruction.miner.expect("miner is not set"),
868
869 slot_hashes: self.instruction.slot_hashes.expect("slot_hashes is not set"),
870
871 token_program: self.instruction.token_program.expect("token_program is not set"),
872
873 system_program: self.instruction.system_program.expect("system_program is not set"),
874
875 event_authority: self.instruction.event_authority.expect("event_authority is not set"),
876
877 program: self.instruction.program.expect("program is not set"),
878 __args: args,
879 };
880 instruction.invoke_signed_with_remaining_accounts(signers_seeds, &self.instruction.__remaining_accounts)
881 }
882}
883
884#[derive(Clone, Debug)]
885struct ExecutePublicAutomationCpiBuilderInstruction<'a, 'b> {
886 __program: &'b solana_account_info::AccountInfo<'a>,
887 authority: Option<&'b solana_account_info::AccountInfo<'a>>,
888 satrush_config: Option<&'b solana_account_info::AccountInfo<'a>>,
889 board: Option<&'b solana_account_info::AccountInfo<'a>>,
890 round: Option<&'b solana_account_info::AccountInfo<'a>>,
891 public_automation: Option<&'b solana_account_info::AccountInfo<'a>>,
892 usd_mint: Option<&'b solana_account_info::AccountInfo<'a>>,
893 automation_usd_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
894 board_usd_ata: Option<&'b solana_account_info::AccountInfo<'a>>,
895 public_deployment: Option<&'b solana_account_info::AccountInfo<'a>>,
896 miner: Option<&'b solana_account_info::AccountInfo<'a>>,
897 slot_hashes: Option<&'b solana_account_info::AccountInfo<'a>>,
898 token_program: Option<&'b solana_account_info::AccountInfo<'a>>,
899 system_program: Option<&'b solana_account_info::AccountInfo<'a>>,
900 event_authority: Option<&'b solana_account_info::AccountInfo<'a>>,
901 program: Option<&'b solana_account_info::AccountInfo<'a>>,
902 selection_mask: Option<u32>,
903 __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
905}
906