mpl_waffle/generated/instructions/
initialize_with_token.rs

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