소스 검색

refactor(renderers-rust): extract `solana-account-info` from `solana-program` & `solana-account` from `solana-sdk` (#645)

* refactor: extract account-info from solana-program & account from solana-sdk

* chore: add changeset
Sonic 5 달 전
부모
커밋
8caf59d3ce
43개의 변경된 파일503개의 추가작업 그리고 902개의 파일을 삭제
  1. 5 0
      .changeset/whole-poets-knock.md
  2. 1 0
      packages/renderers-rust/e2e/anchor/Cargo.lock
  3. 1 0
      packages/renderers-rust/e2e/anchor/Cargo.toml
  4. 2 4
      packages/renderers-rust/e2e/anchor/src/generated/accounts/guard_v1.rs
  5. 41 57
      packages/renderers-rust/e2e/anchor/src/generated/instructions/create_guard.rs
  6. 37 53
      packages/renderers-rust/e2e/anchor/src/generated/instructions/execute.rs
  7. 33 49
      packages/renderers-rust/e2e/anchor/src/generated/instructions/initialize.rs
  8. 33 49
      packages/renderers-rust/e2e/anchor/src/generated/instructions/update_guard.rs
  9. 1 1
      packages/renderers-rust/e2e/anchor/src/generated/shared.rs
  10. 1 0
      packages/renderers-rust/e2e/dummy/Cargo.lock
  11. 1 0
      packages/renderers-rust/e2e/dummy/Cargo.toml
  12. 9 25
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction1.rs
  13. 9 25
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction2.rs
  14. 9 25
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction3.rs
  15. 9 25
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction4.rs
  16. 9 25
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction5.rs
  17. 13 29
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction6.rs
  18. 13 29
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction7.rs
  19. 1 0
      packages/renderers-rust/e2e/memo/Cargo.lock
  20. 1 0
      packages/renderers-rust/e2e/memo/Cargo.toml
  21. 9 25
      packages/renderers-rust/e2e/memo/src/generated/instructions/add_memo.rs
  22. 2 0
      packages/renderers-rust/e2e/meteora/Cargo.toml
  23. 2 0
      packages/renderers-rust/e2e/system/Cargo.lock
  24. 2 0
      packages/renderers-rust/e2e/system/Cargo.toml
  25. 2 4
      packages/renderers-rust/e2e/system/src/generated/accounts/nonce.rs
  26. 21 37
      packages/renderers-rust/e2e/system/src/generated/instructions/advance_nonce_account.rs
  27. 13 29
      packages/renderers-rust/e2e/system/src/generated/instructions/allocate.rs
  28. 17 33
      packages/renderers-rust/e2e/system/src/generated/instructions/allocate_with_seed.rs
  29. 13 32
      packages/renderers-rust/e2e/system/src/generated/instructions/assign.rs
  30. 17 36
      packages/renderers-rust/e2e/system/src/generated/instructions/assign_with_seed.rs
  31. 17 33
      packages/renderers-rust/e2e/system/src/generated/instructions/authorize_nonce_account.rs
  32. 17 33
      packages/renderers-rust/e2e/system/src/generated/instructions/create_account.rs
  33. 21 37
      packages/renderers-rust/e2e/system/src/generated/instructions/create_account_with_seed.rs
  34. 21 37
      packages/renderers-rust/e2e/system/src/generated/instructions/initialize_nonce_account.rs
  35. 17 36
      packages/renderers-rust/e2e/system/src/generated/instructions/transfer_sol.rs
  36. 21 40
      packages/renderers-rust/e2e/system/src/generated/instructions/transfer_sol_with_seed.rs
  37. 13 29
      packages/renderers-rust/e2e/system/src/generated/instructions/upgrade_nonce_account.rs
  38. 29 45
      packages/renderers-rust/e2e/system/src/generated/instructions/withdraw_nonce_account.rs
  39. 1 1
      packages/renderers-rust/e2e/system/src/generated/shared.rs
  40. 2 2
      packages/renderers-rust/public/templates/accountsPage.njk
  41. 8 8
      packages/renderers-rust/public/templates/instructionsCpiPage.njk
  42. 8 8
      packages/renderers-rust/public/templates/instructionsCpiPageBuilder.njk
  43. 1 1
      packages/renderers-rust/public/templates/sharedPage.njk

+ 5 - 0
.changeset/whole-poets-knock.md

@@ -0,0 +1,5 @@
+---
+'@codama/renderers-rust': minor
+---
+
+extract `solana-account-info` from `solana-program` & `solana-account` from `solana-sdk`

+ 1 - 0
packages/renderers-rust/e2e/anchor/Cargo.lock

@@ -1008,6 +1008,7 @@ dependencies = [
  "num-traits",
  "serde",
  "serde_with 3.12.0",
+ "solana-account-info",
  "solana-client",
  "solana-instruction",
  "solana-program 2.2.1",

+ 1 - 0
packages/renderers-rust/e2e/anchor/Cargo.toml

@@ -18,6 +18,7 @@ num-derive = "^0.3"
 num-traits = "^0.2"
 serde = { version = "^1.0", features = ["derive"], optional = true }
 serde_with = { version = "^3.0", optional = true }
+solana-account-info = "2.2.1"
 solana-program = "2.2.1"
 solana-instruction = "2.2.1"
 solana-pubkey = { version = "2.2.1", features = ["curve25519"] }

+ 2 - 4
packages/renderers-rust/e2e/anchor/src/generated/accounts/guard_v1.rs

@@ -40,12 +40,10 @@ impl GuardV1 {
     }
 }
 
-impl<'a> TryFrom<&solana_program::account_info::AccountInfo<'a>> for GuardV1 {
+impl<'a> TryFrom<&solana_account_info::AccountInfo<'a>> for GuardV1 {
     type Error = std::io::Error;
 
-    fn try_from(
-        account_info: &solana_program::account_info::AccountInfo<'a>,
-    ) -> Result<Self, Self::Error> {
+    fn try_from(account_info: &solana_account_info::AccountInfo<'a>) -> Result<Self, Self::Error> {
         let mut data: &[u8] = &(*account_info.data).borrow();
         Self::deserialize(&mut data)
     }

+ 41 - 57
packages/renderers-rust/e2e/anchor/src/generated/instructions/create_guard.rs

@@ -279,50 +279,50 @@ impl CreateGuardBuilder {
 
 /// `create_guard` CPI accounts.
 pub struct CreateGuardCpiAccounts<'a, 'b> {
-    pub guard: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard: &'b solana_account_info::AccountInfo<'a>,
 
-    pub mint: &'b solana_program::account_info::AccountInfo<'a>,
+    pub mint: &'b solana_account_info::AccountInfo<'a>,
 
-    pub mint_token_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub mint_token_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub guard_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard_authority: &'b solana_account_info::AccountInfo<'a>,
 
-    pub payer: &'b solana_program::account_info::AccountInfo<'a>,
+    pub payer: &'b solana_account_info::AccountInfo<'a>,
 
-    pub associated_token_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub associated_token_program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub token_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub token_program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub system_program: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `create_guard` CPI instruction.
 pub struct CreateGuardCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub guard: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard: &'b solana_account_info::AccountInfo<'a>,
 
-    pub mint: &'b solana_program::account_info::AccountInfo<'a>,
+    pub mint: &'b solana_account_info::AccountInfo<'a>,
 
-    pub mint_token_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub mint_token_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub guard_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard_authority: &'b solana_account_info::AccountInfo<'a>,
 
-    pub payer: &'b solana_program::account_info::AccountInfo<'a>,
+    pub payer: &'b solana_account_info::AccountInfo<'a>,
 
-    pub associated_token_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub associated_token_program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub token_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub token_program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub system_program: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: CreateGuardInstructionArgs,
 }
 
 impl<'a, 'b> CreateGuardCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: CreateGuardCpiAccounts<'a, 'b>,
         args: CreateGuardInstructionArgs,
     ) -> Self {
@@ -346,11 +346,7 @@ impl<'a, 'b> CreateGuardCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -367,11 +363,7 @@ impl<'a, 'b> CreateGuardCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(8 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(*self.guard.key, false));
@@ -453,7 +445,7 @@ pub struct CreateGuardCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> CreateGuardCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(CreateGuardCpiBuilderInstruction {
             __program: program,
             guard: None,
@@ -475,19 +467,19 @@ impl<'a, 'b> CreateGuardCpiBuilder<'a, 'b> {
         Self { instruction }
     }
     #[inline(always)]
-    pub fn guard(&mut self, guard: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn guard(&mut self, guard: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.guard = Some(guard);
         self
     }
     #[inline(always)]
-    pub fn mint(&mut self, mint: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn mint(&mut self, mint: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.mint = Some(mint);
         self
     }
     #[inline(always)]
     pub fn mint_token_account(
         &mut self,
-        mint_token_account: &'b solana_program::account_info::AccountInfo<'a>,
+        mint_token_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.mint_token_account = Some(mint_token_account);
         self
@@ -495,20 +487,20 @@ impl<'a, 'b> CreateGuardCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn guard_authority(
         &mut self,
-        guard_authority: &'b solana_program::account_info::AccountInfo<'a>,
+        guard_authority: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.guard_authority = Some(guard_authority);
         self
     }
     #[inline(always)]
-    pub fn payer(&mut self, payer: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn payer(&mut self, payer: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.payer = Some(payer);
         self
     }
     #[inline(always)]
     pub fn associated_token_program(
         &mut self,
-        associated_token_program: &'b solana_program::account_info::AccountInfo<'a>,
+        associated_token_program: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.associated_token_program = Some(associated_token_program);
         self
@@ -516,7 +508,7 @@ impl<'a, 'b> CreateGuardCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn token_program(
         &mut self,
-        token_program: &'b solana_program::account_info::AccountInfo<'a>,
+        token_program: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.token_program = Some(token_program);
         self
@@ -524,7 +516,7 @@ impl<'a, 'b> CreateGuardCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn system_program(
         &mut self,
-        system_program: &'b solana_program::account_info::AccountInfo<'a>,
+        system_program: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.system_program = Some(system_program);
         self
@@ -568,7 +560,7 @@ impl<'a, 'b> CreateGuardCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -584,11 +576,7 @@ impl<'a, 'b> CreateGuardCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -661,15 +649,15 @@ impl<'a, 'b> CreateGuardCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct CreateGuardCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    guard: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    mint: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    mint_token_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    guard_authority: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    payer: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    associated_token_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    token_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    system_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    guard: Option<&'b solana_account_info::AccountInfo<'a>>,
+    mint: Option<&'b solana_account_info::AccountInfo<'a>>,
+    mint_token_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    guard_authority: Option<&'b solana_account_info::AccountInfo<'a>>,
+    payer: Option<&'b solana_account_info::AccountInfo<'a>>,
+    associated_token_program: Option<&'b solana_account_info::AccountInfo<'a>>,
+    token_program: Option<&'b solana_account_info::AccountInfo<'a>>,
+    system_program: Option<&'b solana_account_info::AccountInfo<'a>>,
     name: Option<String>,
     symbol: Option<String>,
     uri: Option<String>,
@@ -677,9 +665,5 @@ struct CreateGuardCpiBuilderInstruction<'a, 'b> {
     transfer_amount_rule: Option<TransferAmountRule>,
     additional_fields_rule: Option<Vec<MetadataAdditionalFieldRule>>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 37 - 53
packages/renderers-rust/e2e/anchor/src/generated/instructions/execute.rs

@@ -217,46 +217,46 @@ impl ExecuteBuilder {
 
 /// `execute` CPI accounts.
 pub struct ExecuteCpiAccounts<'a, 'b> {
-    pub source_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub source_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub mint: &'b solana_program::account_info::AccountInfo<'a>,
+    pub mint: &'b solana_account_info::AccountInfo<'a>,
 
-    pub destination_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub destination_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub owner_delegate: &'b solana_program::account_info::AccountInfo<'a>,
+    pub owner_delegate: &'b solana_account_info::AccountInfo<'a>,
 
-    pub extra_metas_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub extra_metas_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub guard: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard: &'b solana_account_info::AccountInfo<'a>,
 
-    pub instruction_sysvar_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub instruction_sysvar_account: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `execute` CPI instruction.
 pub struct ExecuteCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub source_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub source_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub mint: &'b solana_program::account_info::AccountInfo<'a>,
+    pub mint: &'b solana_account_info::AccountInfo<'a>,
 
-    pub destination_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub destination_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub owner_delegate: &'b solana_program::account_info::AccountInfo<'a>,
+    pub owner_delegate: &'b solana_account_info::AccountInfo<'a>,
 
-    pub extra_metas_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub extra_metas_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub guard: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard: &'b solana_account_info::AccountInfo<'a>,
 
-    pub instruction_sysvar_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub instruction_sysvar_account: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: ExecuteInstructionArgs,
 }
 
 impl<'a, 'b> ExecuteCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: ExecuteCpiAccounts<'a, 'b>,
         args: ExecuteInstructionArgs,
     ) -> Self {
@@ -279,11 +279,7 @@ impl<'a, 'b> ExecuteCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -300,11 +296,7 @@ impl<'a, 'b> ExecuteCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(7 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new_readonly(
@@ -389,7 +381,7 @@ pub struct ExecuteCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> ExecuteCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(ExecuteCpiBuilderInstruction {
             __program: program,
             source_account: None,
@@ -407,20 +399,20 @@ impl<'a, 'b> ExecuteCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn source_account(
         &mut self,
-        source_account: &'b solana_program::account_info::AccountInfo<'a>,
+        source_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.source_account = Some(source_account);
         self
     }
     #[inline(always)]
-    pub fn mint(&mut self, mint: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn mint(&mut self, mint: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.mint = Some(mint);
         self
     }
     #[inline(always)]
     pub fn destination_account(
         &mut self,
-        destination_account: &'b solana_program::account_info::AccountInfo<'a>,
+        destination_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.destination_account = Some(destination_account);
         self
@@ -428,7 +420,7 @@ impl<'a, 'b> ExecuteCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn owner_delegate(
         &mut self,
-        owner_delegate: &'b solana_program::account_info::AccountInfo<'a>,
+        owner_delegate: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.owner_delegate = Some(owner_delegate);
         self
@@ -436,20 +428,20 @@ impl<'a, 'b> ExecuteCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn extra_metas_account(
         &mut self,
-        extra_metas_account: &'b solana_program::account_info::AccountInfo<'a>,
+        extra_metas_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.extra_metas_account = Some(extra_metas_account);
         self
     }
     #[inline(always)]
-    pub fn guard(&mut self, guard: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn guard(&mut self, guard: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.guard = Some(guard);
         self
     }
     #[inline(always)]
     pub fn instruction_sysvar_account(
         &mut self,
-        instruction_sysvar_account: &'b solana_program::account_info::AccountInfo<'a>,
+        instruction_sysvar_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.instruction_sysvar_account = Some(instruction_sysvar_account);
         self
@@ -463,7 +455,7 @@ impl<'a, 'b> ExecuteCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -479,11 +471,7 @@ impl<'a, 'b> ExecuteCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -545,19 +533,15 @@ impl<'a, 'b> ExecuteCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct ExecuteCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    source_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    mint: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    destination_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    owner_delegate: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    extra_metas_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    guard: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    instruction_sysvar_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    source_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    mint: Option<&'b solana_account_info::AccountInfo<'a>>,
+    destination_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    owner_delegate: Option<&'b solana_account_info::AccountInfo<'a>>,
+    extra_metas_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    guard: Option<&'b solana_account_info::AccountInfo<'a>>,
+    instruction_sysvar_account: Option<&'b solana_account_info::AccountInfo<'a>>,
     amount: Option<u64>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 33 - 49
packages/renderers-rust/e2e/anchor/src/generated/instructions/initialize.rs

@@ -182,40 +182,40 @@ impl InitializeBuilder {
 
 /// `initialize` CPI accounts.
 pub struct InitializeCpiAccounts<'a, 'b> {
-    pub extra_metas_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub extra_metas_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub guard: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard: &'b solana_account_info::AccountInfo<'a>,
 
-    pub mint: &'b solana_program::account_info::AccountInfo<'a>,
+    pub mint: &'b solana_account_info::AccountInfo<'a>,
 
-    pub transfer_hook_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub transfer_hook_authority: &'b solana_account_info::AccountInfo<'a>,
 
-    pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub system_program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub payer: &'b solana_program::account_info::AccountInfo<'a>,
+    pub payer: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `initialize` CPI instruction.
 pub struct InitializeCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub extra_metas_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub extra_metas_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub guard: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard: &'b solana_account_info::AccountInfo<'a>,
 
-    pub mint: &'b solana_program::account_info::AccountInfo<'a>,
+    pub mint: &'b solana_account_info::AccountInfo<'a>,
 
-    pub transfer_hook_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub transfer_hook_authority: &'b solana_account_info::AccountInfo<'a>,
 
-    pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub system_program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub payer: &'b solana_program::account_info::AccountInfo<'a>,
+    pub payer: &'b solana_account_info::AccountInfo<'a>,
 }
 
 impl<'a, 'b> InitializeCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: InitializeCpiAccounts<'a, 'b>,
     ) -> Self {
         Self {
@@ -235,11 +235,7 @@ impl<'a, 'b> InitializeCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -256,11 +252,7 @@ impl<'a, 'b> InitializeCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(6 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -334,7 +326,7 @@ pub struct InitializeCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> InitializeCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(InitializeCpiBuilderInstruction {
             __program: program,
             extra_metas_account: None,
@@ -350,25 +342,25 @@ impl<'a, 'b> InitializeCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn extra_metas_account(
         &mut self,
-        extra_metas_account: &'b solana_program::account_info::AccountInfo<'a>,
+        extra_metas_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.extra_metas_account = Some(extra_metas_account);
         self
     }
     #[inline(always)]
-    pub fn guard(&mut self, guard: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn guard(&mut self, guard: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.guard = Some(guard);
         self
     }
     #[inline(always)]
-    pub fn mint(&mut self, mint: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn mint(&mut self, mint: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.mint = Some(mint);
         self
     }
     #[inline(always)]
     pub fn transfer_hook_authority(
         &mut self,
-        transfer_hook_authority: &'b solana_program::account_info::AccountInfo<'a>,
+        transfer_hook_authority: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.transfer_hook_authority = Some(transfer_hook_authority);
         self
@@ -376,13 +368,13 @@ impl<'a, 'b> InitializeCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn system_program(
         &mut self,
-        system_program: &'b solana_program::account_info::AccountInfo<'a>,
+        system_program: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.system_program = Some(system_program);
         self
     }
     #[inline(always)]
-    pub fn payer(&mut self, payer: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn payer(&mut self, payer: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.payer = Some(payer);
         self
     }
@@ -390,7 +382,7 @@ impl<'a, 'b> InitializeCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -406,11 +398,7 @@ impl<'a, 'b> InitializeCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -460,17 +448,13 @@ impl<'a, 'b> InitializeCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct InitializeCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    extra_metas_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    guard: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    mint: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    transfer_hook_authority: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    system_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    payer: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    extra_metas_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    guard: Option<&'b solana_account_info::AccountInfo<'a>>,
+    mint: Option<&'b solana_account_info::AccountInfo<'a>>,
+    transfer_hook_authority: Option<&'b solana_account_info::AccountInfo<'a>>,
+    system_program: Option<&'b solana_account_info::AccountInfo<'a>>,
+    payer: Option<&'b solana_account_info::AccountInfo<'a>>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 33 - 49
packages/renderers-rust/e2e/anchor/src/generated/instructions/update_guard.rs

@@ -224,42 +224,42 @@ impl UpdateGuardBuilder {
 
 /// `update_guard` CPI accounts.
 pub struct UpdateGuardCpiAccounts<'a, 'b> {
-    pub guard: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard: &'b solana_account_info::AccountInfo<'a>,
 
-    pub mint: &'b solana_program::account_info::AccountInfo<'a>,
+    pub mint: &'b solana_account_info::AccountInfo<'a>,
 
-    pub token_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub token_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub guard_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard_authority: &'b solana_account_info::AccountInfo<'a>,
 
-    pub token_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub token_program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub system_program: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `update_guard` CPI instruction.
 pub struct UpdateGuardCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub guard: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard: &'b solana_account_info::AccountInfo<'a>,
 
-    pub mint: &'b solana_program::account_info::AccountInfo<'a>,
+    pub mint: &'b solana_account_info::AccountInfo<'a>,
 
-    pub token_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub token_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub guard_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub guard_authority: &'b solana_account_info::AccountInfo<'a>,
 
-    pub token_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub token_program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub system_program: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: UpdateGuardInstructionArgs,
 }
 
 impl<'a, 'b> UpdateGuardCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: UpdateGuardCpiAccounts<'a, 'b>,
         args: UpdateGuardInstructionArgs,
     ) -> Self {
@@ -281,11 +281,7 @@ impl<'a, 'b> UpdateGuardCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -302,11 +298,7 @@ impl<'a, 'b> UpdateGuardCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(6 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(*self.guard.key, false));
@@ -382,7 +374,7 @@ pub struct UpdateGuardCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> UpdateGuardCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(UpdateGuardCpiBuilderInstruction {
             __program: program,
             guard: None,
@@ -399,19 +391,19 @@ impl<'a, 'b> UpdateGuardCpiBuilder<'a, 'b> {
         Self { instruction }
     }
     #[inline(always)]
-    pub fn guard(&mut self, guard: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn guard(&mut self, guard: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.guard = Some(guard);
         self
     }
     #[inline(always)]
-    pub fn mint(&mut self, mint: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn mint(&mut self, mint: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.mint = Some(mint);
         self
     }
     #[inline(always)]
     pub fn token_account(
         &mut self,
-        token_account: &'b solana_program::account_info::AccountInfo<'a>,
+        token_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.token_account = Some(token_account);
         self
@@ -419,7 +411,7 @@ impl<'a, 'b> UpdateGuardCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn guard_authority(
         &mut self,
-        guard_authority: &'b solana_program::account_info::AccountInfo<'a>,
+        guard_authority: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.guard_authority = Some(guard_authority);
         self
@@ -427,7 +419,7 @@ impl<'a, 'b> UpdateGuardCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn token_program(
         &mut self,
-        token_program: &'b solana_program::account_info::AccountInfo<'a>,
+        token_program: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.token_program = Some(token_program);
         self
@@ -435,7 +427,7 @@ impl<'a, 'b> UpdateGuardCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn system_program(
         &mut self,
-        system_program: &'b solana_program::account_info::AccountInfo<'a>,
+        system_program: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.system_program = Some(system_program);
         self
@@ -464,7 +456,7 @@ impl<'a, 'b> UpdateGuardCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -480,11 +472,7 @@ impl<'a, 'b> UpdateGuardCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -547,20 +535,16 @@ impl<'a, 'b> UpdateGuardCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct UpdateGuardCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    guard: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    mint: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    token_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    guard_authority: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    token_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    system_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    guard: Option<&'b solana_account_info::AccountInfo<'a>>,
+    mint: Option<&'b solana_account_info::AccountInfo<'a>>,
+    token_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    guard_authority: Option<&'b solana_account_info::AccountInfo<'a>>,
+    token_program: Option<&'b solana_account_info::AccountInfo<'a>>,
+    system_program: Option<&'b solana_account_info::AccountInfo<'a>>,
     cpi_rule: Option<CpiRule>,
     transfer_amount_rule: Option<TransferAmountRule>,
     additional_fields_rule: Option<Vec<MetadataAdditionalFieldRule>>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 1 - 1
packages/renderers-rust/e2e/anchor/src/generated/shared.rs

@@ -9,7 +9,7 @@
 #[derive(Debug, Clone)]
 pub struct DecodedAccount<T> {
     pub address: solana_pubkey::Pubkey,
-    pub account: solana_sdk::account::Account,
+    pub account: solana_account::Account,
     pub data: T,
 }
 

+ 1 - 0
packages/renderers-rust/e2e/dummy/Cargo.lock

@@ -706,6 +706,7 @@ dependencies = [
  "serde",
  "serde-big-array",
  "serde_with",
+ "solana-account-info",
  "solana-instruction",
  "solana-program 2.2.1",
  "solana-pubkey",

+ 1 - 0
packages/renderers-rust/e2e/dummy/Cargo.toml

@@ -17,6 +17,7 @@ num-derive = "^0.3"
 num-traits = "^0.2"
 serde = { version = "^1.0", features = ["derive"], optional = true }
 serde_with = { version = "^3.0", optional = true }
+solana-account-info = "2.2.1"
 solana-program = "2.2.1"
 solana-instruction = "2.2.1"
 solana-pubkey = { version = "2.2.1", features = ["curve25519"] }

+ 9 - 25
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction1.rs

@@ -89,11 +89,11 @@ impl Instruction1Builder {
 /// `instruction1` CPI instruction.
 pub struct Instruction1Cpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 }
 
 impl<'a, 'b> Instruction1Cpi<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         Self { __program: program }
     }
     #[inline(always)]
@@ -103,11 +103,7 @@ impl<'a, 'b> Instruction1Cpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -124,11 +120,7 @@ impl<'a, 'b> Instruction1Cpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(remaining_accounts.len());
         remaining_accounts.iter().for_each(|remaining_account| {
@@ -169,7 +161,7 @@ pub struct Instruction1CpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> Instruction1CpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(Instruction1CpiBuilderInstruction {
             __program: program,
             __remaining_accounts: Vec::new(),
@@ -180,7 +172,7 @@ impl<'a, 'b> Instruction1CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -196,11 +188,7 @@ impl<'a, 'b> Instruction1CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -229,11 +217,7 @@ impl<'a, 'b> Instruction1CpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct Instruction1CpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 9 - 25
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction2.rs

@@ -89,11 +89,11 @@ impl Instruction2Builder {
 /// `instruction2` CPI instruction.
 pub struct Instruction2Cpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 }
 
 impl<'a, 'b> Instruction2Cpi<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         Self { __program: program }
     }
     #[inline(always)]
@@ -103,11 +103,7 @@ impl<'a, 'b> Instruction2Cpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -124,11 +120,7 @@ impl<'a, 'b> Instruction2Cpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(remaining_accounts.len());
         remaining_accounts.iter().for_each(|remaining_account| {
@@ -169,7 +161,7 @@ pub struct Instruction2CpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> Instruction2CpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(Instruction2CpiBuilderInstruction {
             __program: program,
             __remaining_accounts: Vec::new(),
@@ -180,7 +172,7 @@ impl<'a, 'b> Instruction2CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -196,11 +188,7 @@ impl<'a, 'b> Instruction2CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -229,11 +217,7 @@ impl<'a, 'b> Instruction2CpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct Instruction2CpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 9 - 25
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction3.rs

@@ -91,11 +91,11 @@ impl Instruction3Builder {
 /// `instruction3` CPI instruction.
 pub struct Instruction3Cpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 }
 
 impl<'a, 'b> Instruction3Cpi<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         Self { __program: program }
     }
     #[inline(always)]
@@ -105,11 +105,7 @@ impl<'a, 'b> Instruction3Cpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -126,11 +122,7 @@ impl<'a, 'b> Instruction3Cpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(remaining_accounts.len());
         remaining_accounts.iter().for_each(|remaining_account| {
@@ -171,7 +163,7 @@ pub struct Instruction3CpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> Instruction3CpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(Instruction3CpiBuilderInstruction {
             __program: program,
             __remaining_accounts: Vec::new(),
@@ -182,7 +174,7 @@ impl<'a, 'b> Instruction3CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -198,11 +190,7 @@ impl<'a, 'b> Instruction3CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -231,11 +219,7 @@ impl<'a, 'b> Instruction3CpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct Instruction3CpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 9 - 25
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction4.rs

@@ -110,14 +110,14 @@ impl Instruction4Builder {
 /// `instruction4` CPI instruction.
 pub struct Instruction4Cpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: Instruction4InstructionArgs,
 }
 
 impl<'a, 'b> Instruction4Cpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         args: Instruction4InstructionArgs,
     ) -> Self {
         Self {
@@ -132,11 +132,7 @@ impl<'a, 'b> Instruction4Cpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -153,11 +149,7 @@ impl<'a, 'b> Instruction4Cpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(remaining_accounts.len());
         remaining_accounts.iter().for_each(|remaining_account| {
@@ -200,7 +192,7 @@ pub struct Instruction4CpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> Instruction4CpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(Instruction4CpiBuilderInstruction {
             __program: program,
             my_argument: None,
@@ -217,7 +209,7 @@ impl<'a, 'b> Instruction4CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -233,11 +225,7 @@ impl<'a, 'b> Instruction4CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -274,12 +262,8 @@ impl<'a, 'b> Instruction4CpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct Instruction4CpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
     my_argument: Option<u64>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 9 - 25
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction5.rs

@@ -111,14 +111,14 @@ impl Instruction5Builder {
 /// `instruction5` CPI instruction.
 pub struct Instruction5Cpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: Instruction5InstructionArgs,
 }
 
 impl<'a, 'b> Instruction5Cpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         args: Instruction5InstructionArgs,
     ) -> Self {
         Self {
@@ -133,11 +133,7 @@ impl<'a, 'b> Instruction5Cpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -154,11 +150,7 @@ impl<'a, 'b> Instruction5Cpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(remaining_accounts.len());
         remaining_accounts.iter().for_each(|remaining_account| {
@@ -201,7 +193,7 @@ pub struct Instruction5CpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> Instruction5CpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(Instruction5CpiBuilderInstruction {
             __program: program,
             my_argument: None,
@@ -219,7 +211,7 @@ impl<'a, 'b> Instruction5CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -235,11 +227,7 @@ impl<'a, 'b> Instruction5CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -272,12 +260,8 @@ impl<'a, 'b> Instruction5CpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct Instruction5CpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
     my_argument: Option<u64>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 13 - 29
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction6.rs

@@ -100,20 +100,20 @@ impl Instruction6Builder {
 
 /// `instruction6` CPI accounts.
 pub struct Instruction6CpiAccounts<'a, 'b> {
-    pub my_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub my_account: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `instruction6` CPI instruction.
 pub struct Instruction6Cpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub my_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub my_account: &'b solana_account_info::AccountInfo<'a>,
 }
 
 impl<'a, 'b> Instruction6Cpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: Instruction6CpiAccounts<'a, 'b>,
     ) -> Self {
         Self {
@@ -128,11 +128,7 @@ impl<'a, 'b> Instruction6Cpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -149,11 +145,7 @@ impl<'a, 'b> Instruction6Cpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(1 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -200,7 +192,7 @@ pub struct Instruction6CpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> Instruction6CpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(Instruction6CpiBuilderInstruction {
             __program: program,
             my_account: None,
@@ -211,7 +203,7 @@ impl<'a, 'b> Instruction6CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn my_account(
         &mut self,
-        my_account: &'b solana_program::account_info::AccountInfo<'a>,
+        my_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.my_account = Some(my_account);
         self
@@ -220,7 +212,7 @@ impl<'a, 'b> Instruction6CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -236,11 +228,7 @@ impl<'a, 'b> Instruction6CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -271,12 +259,8 @@ impl<'a, 'b> Instruction6CpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct Instruction6CpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    my_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    my_account: Option<&'b solana_account_info::AccountInfo<'a>>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 13 - 29
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction7.rs

@@ -108,20 +108,20 @@ impl Instruction7Builder {
 
 /// `instruction7` CPI accounts.
 pub struct Instruction7CpiAccounts<'a, 'b> {
-    pub my_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    pub my_account: Option<&'b solana_account_info::AccountInfo<'a>>,
 }
 
 /// `instruction7` CPI instruction.
 pub struct Instruction7Cpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub my_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    pub my_account: Option<&'b solana_account_info::AccountInfo<'a>>,
 }
 
 impl<'a, 'b> Instruction7Cpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: Instruction7CpiAccounts<'a, 'b>,
     ) -> Self {
         Self {
@@ -136,11 +136,7 @@ impl<'a, 'b> Instruction7Cpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -157,11 +153,7 @@ impl<'a, 'b> Instruction7Cpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(1 + remaining_accounts.len());
         if let Some(my_account) = self.my_account {
@@ -214,7 +206,7 @@ pub struct Instruction7CpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> Instruction7CpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(Instruction7CpiBuilderInstruction {
             __program: program,
             my_account: None,
@@ -226,7 +218,7 @@ impl<'a, 'b> Instruction7CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn my_account(
         &mut self,
-        my_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+        my_account: Option<&'b solana_account_info::AccountInfo<'a>>,
     ) -> &mut Self {
         self.instruction.my_account = my_account;
         self
@@ -235,7 +227,7 @@ impl<'a, 'b> Instruction7CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -251,11 +243,7 @@ impl<'a, 'b> Instruction7CpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -286,12 +274,8 @@ impl<'a, 'b> Instruction7CpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct Instruction7CpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    my_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    my_account: Option<&'b solana_account_info::AccountInfo<'a>>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 1 - 0
packages/renderers-rust/e2e/memo/Cargo.lock

@@ -694,6 +694,7 @@ dependencies = [
  "serde",
  "serde-big-array",
  "serde_with",
+ "solana-account-info",
  "solana-instruction",
  "solana-program 2.2.1",
  "solana-pubkey",

+ 1 - 0
packages/renderers-rust/e2e/memo/Cargo.toml

@@ -17,6 +17,7 @@ num-derive = "^0.3"
 num-traits = "^0.2"
 serde = { version = "^1.0", features = ["derive"], optional = true }
 serde_with = { version = "^3.0", optional = true }
+solana-account-info = "2.2.1"
 solana-program = "2.2.1"
 solana-instruction = "2.2.1"
 solana-pubkey = { version = "2.2.1", features = ["curve25519"] }

+ 9 - 25
packages/renderers-rust/e2e/memo/src/generated/instructions/add_memo.rs

@@ -108,14 +108,14 @@ impl AddMemoBuilder {
 /// `add_memo` CPI instruction.
 pub struct AddMemoCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: AddMemoInstructionArgs,
 }
 
 impl<'a, 'b> AddMemoCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         args: AddMemoInstructionArgs,
     ) -> Self {
         Self {
@@ -130,11 +130,7 @@ impl<'a, 'b> AddMemoCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -151,11 +147,7 @@ impl<'a, 'b> AddMemoCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(remaining_accounts.len());
         remaining_accounts.iter().for_each(|remaining_account| {
@@ -198,7 +190,7 @@ pub struct AddMemoCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> AddMemoCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(AddMemoCpiBuilderInstruction {
             __program: program,
             memo: None,
@@ -215,7 +207,7 @@ impl<'a, 'b> AddMemoCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -231,11 +223,7 @@ impl<'a, 'b> AddMemoCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -268,12 +256,8 @@ impl<'a, 'b> AddMemoCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct AddMemoCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
     memo: Option<RemainderStr>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 2 - 0
packages/renderers-rust/e2e/meteora/Cargo.toml

@@ -18,11 +18,13 @@ num-derive = "^0.3"
 num-traits = "^0.2"
 serde = { version = "^1.0", features = ["derive"], optional = true }
 serde_with = { version = "^3.0", optional = true }
+solana-account-info = "2.2.1"
 solana-program = "2.2.1"
 solana-instruction = "2.2.1"
 solana-pubkey = { version = "2.2.1", features = ["curve25519"] }
 solana-client = { version = "~1.18", optional = true }
 solana-sdk = { version = "~1.18", optional = true }
+solana-account = { version = "2.2.1", optional = true }
 thiserror = "^1.0"
 
 [dev-dependencies]

+ 2 - 0
packages/renderers-rust/e2e/system/Cargo.lock

@@ -1008,6 +1008,8 @@ dependencies = [
  "serde",
  "serde-big-array",
  "serde_with 3.12.0",
+ "solana-account",
+ "solana-account-info",
  "solana-client",
  "solana-instruction",
  "solana-program 2.2.1",

+ 2 - 0
packages/renderers-rust/e2e/system/Cargo.toml

@@ -18,6 +18,7 @@ num-traits = "^0.2"
 serde = { version = "^1.0", features = ["derive"], optional = true }
 serde_with = { version = "^3.0", optional = true }
 serde-big-array = { version = "^0.5", optional = true }
+solana-account-info = "2.2.1"
 solana-program = "2.2.1"
 solana-instruction = "2.2.1"
 solana-pubkey = { version = "2.2.1", features = ["curve25519"] }
@@ -27,4 +28,5 @@ thiserror = "^1.0"
 
 [dev-dependencies]
 assert_matches = "1.5.0"
+solana-account = "2.2.1"
 solana-sdk = "^2.1.6"

+ 2 - 4
packages/renderers-rust/e2e/system/src/generated/accounts/nonce.rs

@@ -39,12 +39,10 @@ impl Nonce {
     }
 }
 
-impl<'a> TryFrom<&solana_program::account_info::AccountInfo<'a>> for Nonce {
+impl<'a> TryFrom<&solana_account_info::AccountInfo<'a>> for Nonce {
     type Error = std::io::Error;
 
-    fn try_from(
-        account_info: &solana_program::account_info::AccountInfo<'a>,
-    ) -> Result<Self, Self::Error> {
+    fn try_from(account_info: &solana_account_info::AccountInfo<'a>) -> Result<Self, Self::Error> {
         let mut data: &[u8] = &(*account_info.data).borrow();
         Self::deserialize(&mut data)
     }

+ 21 - 37
packages/renderers-rust/e2e/system/src/generated/instructions/advance_nonce_account.rs

@@ -139,28 +139,28 @@ impl AdvanceNonceAccountBuilder {
 
 /// `advance_nonce_account` CPI accounts.
 pub struct AdvanceNonceAccountCpiAccounts<'a, 'b> {
-    pub nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub recent_blockhashes_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+    pub recent_blockhashes_sysvar: &'b solana_account_info::AccountInfo<'a>,
 
-    pub nonce_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_authority: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `advance_nonce_account` CPI instruction.
 pub struct AdvanceNonceAccountCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub recent_blockhashes_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+    pub recent_blockhashes_sysvar: &'b solana_account_info::AccountInfo<'a>,
 
-    pub nonce_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_authority: &'b solana_account_info::AccountInfo<'a>,
 }
 
 impl<'a, 'b> AdvanceNonceAccountCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: AdvanceNonceAccountCpiAccounts<'a, 'b>,
     ) -> Self {
         Self {
@@ -177,11 +177,7 @@ impl<'a, 'b> AdvanceNonceAccountCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -198,11 +194,7 @@ impl<'a, 'b> AdvanceNonceAccountCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(3 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -261,7 +253,7 @@ pub struct AdvanceNonceAccountCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> AdvanceNonceAccountCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(AdvanceNonceAccountCpiBuilderInstruction {
             __program: program,
             nonce_account: None,
@@ -274,7 +266,7 @@ impl<'a, 'b> AdvanceNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn nonce_account(
         &mut self,
-        nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+        nonce_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.nonce_account = Some(nonce_account);
         self
@@ -282,7 +274,7 @@ impl<'a, 'b> AdvanceNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn recent_blockhashes_sysvar(
         &mut self,
-        recent_blockhashes_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+        recent_blockhashes_sysvar: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.recent_blockhashes_sysvar = Some(recent_blockhashes_sysvar);
         self
@@ -290,7 +282,7 @@ impl<'a, 'b> AdvanceNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn nonce_authority(
         &mut self,
-        nonce_authority: &'b solana_program::account_info::AccountInfo<'a>,
+        nonce_authority: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.nonce_authority = Some(nonce_authority);
         self
@@ -299,7 +291,7 @@ impl<'a, 'b> AdvanceNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -315,11 +307,7 @@ impl<'a, 'b> AdvanceNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -363,14 +351,10 @@ impl<'a, 'b> AdvanceNonceAccountCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct AdvanceNonceAccountCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    nonce_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    recent_blockhashes_sysvar: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    nonce_authority: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    nonce_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    recent_blockhashes_sysvar: Option<&'b solana_account_info::AccountInfo<'a>>,
+    nonce_authority: Option<&'b solana_account_info::AccountInfo<'a>>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 13 - 29
packages/renderers-rust/e2e/system/src/generated/instructions/allocate.rs

@@ -120,22 +120,22 @@ impl AllocateBuilder {
 
 /// `allocate` CPI accounts.
 pub struct AllocateCpiAccounts<'a, 'b> {
-    pub new_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub new_account: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `allocate` CPI instruction.
 pub struct AllocateCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub new_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub new_account: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: AllocateInstructionArgs,
 }
 
 impl<'a, 'b> AllocateCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: AllocateCpiAccounts<'a, 'b>,
         args: AllocateInstructionArgs,
     ) -> Self {
@@ -152,11 +152,7 @@ impl<'a, 'b> AllocateCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -173,11 +169,7 @@ impl<'a, 'b> AllocateCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(1 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -226,7 +218,7 @@ pub struct AllocateCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> AllocateCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(AllocateCpiBuilderInstruction {
             __program: program,
             new_account: None,
@@ -238,7 +230,7 @@ impl<'a, 'b> AllocateCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn new_account(
         &mut self,
-        new_account: &'b solana_program::account_info::AccountInfo<'a>,
+        new_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.new_account = Some(new_account);
         self
@@ -252,7 +244,7 @@ impl<'a, 'b> AllocateCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -268,11 +260,7 @@ impl<'a, 'b> AllocateCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -310,13 +298,9 @@ impl<'a, 'b> AllocateCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct AllocateCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    new_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    new_account: Option<&'b solana_account_info::AccountInfo<'a>>,
     space: Option<u64>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 17 - 33
packages/renderers-rust/e2e/system/src/generated/instructions/allocate_with_seed.rs

@@ -168,26 +168,26 @@ impl AllocateWithSeedBuilder {
 
 /// `allocate_with_seed` CPI accounts.
 pub struct AllocateWithSeedCpiAccounts<'a, 'b> {
-    pub new_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub new_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub base_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub base_account: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `allocate_with_seed` CPI instruction.
 pub struct AllocateWithSeedCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub new_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub new_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub base_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub base_account: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: AllocateWithSeedInstructionArgs,
 }
 
 impl<'a, 'b> AllocateWithSeedCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: AllocateWithSeedCpiAccounts<'a, 'b>,
         args: AllocateWithSeedInstructionArgs,
     ) -> Self {
@@ -205,11 +205,7 @@ impl<'a, 'b> AllocateWithSeedCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -226,11 +222,7 @@ impl<'a, 'b> AllocateWithSeedCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(2 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -285,7 +277,7 @@ pub struct AllocateWithSeedCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> AllocateWithSeedCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(AllocateWithSeedCpiBuilderInstruction {
             __program: program,
             new_account: None,
@@ -301,7 +293,7 @@ impl<'a, 'b> AllocateWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn new_account(
         &mut self,
-        new_account: &'b solana_program::account_info::AccountInfo<'a>,
+        new_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.new_account = Some(new_account);
         self
@@ -309,7 +301,7 @@ impl<'a, 'b> AllocateWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn base_account(
         &mut self,
-        base_account: &'b solana_program::account_info::AccountInfo<'a>,
+        base_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.base_account = Some(base_account);
         self
@@ -338,7 +330,7 @@ impl<'a, 'b> AllocateWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -354,11 +346,7 @@ impl<'a, 'b> AllocateWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -408,17 +396,13 @@ impl<'a, 'b> AllocateWithSeedCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct AllocateWithSeedCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    new_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    base_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    new_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    base_account: Option<&'b solana_account_info::AccountInfo<'a>>,
     base: Option<Pubkey>,
     seed: Option<String>,
     space: Option<u64>,
     program_address: Option<Pubkey>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 13 - 32
packages/renderers-rust/e2e/system/src/generated/instructions/assign.rs

@@ -124,22 +124,22 @@ impl AssignBuilder {
 
 /// `assign` CPI accounts.
 pub struct AssignCpiAccounts<'a, 'b> {
-    pub account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub account: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `assign` CPI instruction.
 pub struct AssignCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub account: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: AssignInstructionArgs,
 }
 
 impl<'a, 'b> AssignCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: AssignCpiAccounts<'a, 'b>,
         args: AssignInstructionArgs,
     ) -> Self {
@@ -156,11 +156,7 @@ impl<'a, 'b> AssignCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -177,11 +173,7 @@ impl<'a, 'b> AssignCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(1 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -230,7 +222,7 @@ pub struct AssignCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> AssignCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(AssignCpiBuilderInstruction {
             __program: program,
             account: None,
@@ -240,10 +232,7 @@ impl<'a, 'b> AssignCpiBuilder<'a, 'b> {
         Self { instruction }
     }
     #[inline(always)]
-    pub fn account(
-        &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
-    ) -> &mut Self {
+    pub fn account(&mut self, account: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.account = Some(account);
         self
     }
@@ -256,7 +245,7 @@ impl<'a, 'b> AssignCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -272,11 +261,7 @@ impl<'a, 'b> AssignCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -315,13 +300,9 @@ impl<'a, 'b> AssignCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct AssignCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    account: Option<&'b solana_account_info::AccountInfo<'a>>,
     program_address: Option<Pubkey>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 17 - 36
packages/renderers-rust/e2e/system/src/generated/instructions/assign_with_seed.rs

@@ -157,26 +157,26 @@ impl AssignWithSeedBuilder {
 
 /// `assign_with_seed` CPI accounts.
 pub struct AssignWithSeedCpiAccounts<'a, 'b> {
-    pub account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub base_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub base_account: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `assign_with_seed` CPI instruction.
 pub struct AssignWithSeedCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub base_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub base_account: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: AssignWithSeedInstructionArgs,
 }
 
 impl<'a, 'b> AssignWithSeedCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: AssignWithSeedCpiAccounts<'a, 'b>,
         args: AssignWithSeedInstructionArgs,
     ) -> Self {
@@ -194,11 +194,7 @@ impl<'a, 'b> AssignWithSeedCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -215,11 +211,7 @@ impl<'a, 'b> AssignWithSeedCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(2 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -274,7 +266,7 @@ pub struct AssignWithSeedCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> AssignWithSeedCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(AssignWithSeedCpiBuilderInstruction {
             __program: program,
             account: None,
@@ -287,17 +279,14 @@ impl<'a, 'b> AssignWithSeedCpiBuilder<'a, 'b> {
         Self { instruction }
     }
     #[inline(always)]
-    pub fn account(
-        &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
-    ) -> &mut Self {
+    pub fn account(&mut self, account: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.account = Some(account);
         self
     }
     #[inline(always)]
     pub fn base_account(
         &mut self,
-        base_account: &'b solana_program::account_info::AccountInfo<'a>,
+        base_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.base_account = Some(base_account);
         self
@@ -321,7 +310,7 @@ impl<'a, 'b> AssignWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -337,11 +326,7 @@ impl<'a, 'b> AssignWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -387,16 +372,12 @@ impl<'a, 'b> AssignWithSeedCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct AssignWithSeedCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    base_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    base_account: Option<&'b solana_account_info::AccountInfo<'a>>,
     base: Option<Pubkey>,
     seed: Option<String>,
     program_address: Option<Pubkey>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 17 - 33
packages/renderers-rust/e2e/system/src/generated/instructions/authorize_nonce_account.rs

@@ -144,26 +144,26 @@ impl AuthorizeNonceAccountBuilder {
 
 /// `authorize_nonce_account` CPI accounts.
 pub struct AuthorizeNonceAccountCpiAccounts<'a, 'b> {
-    pub nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub nonce_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_authority: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `authorize_nonce_account` CPI instruction.
 pub struct AuthorizeNonceAccountCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub nonce_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_authority: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: AuthorizeNonceAccountInstructionArgs,
 }
 
 impl<'a, 'b> AuthorizeNonceAccountCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: AuthorizeNonceAccountCpiAccounts<'a, 'b>,
         args: AuthorizeNonceAccountInstructionArgs,
     ) -> Self {
@@ -181,11 +181,7 @@ impl<'a, 'b> AuthorizeNonceAccountCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -202,11 +198,7 @@ impl<'a, 'b> AuthorizeNonceAccountCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(2 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -261,7 +253,7 @@ pub struct AuthorizeNonceAccountCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> AuthorizeNonceAccountCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(AuthorizeNonceAccountCpiBuilderInstruction {
             __program: program,
             nonce_account: None,
@@ -274,7 +266,7 @@ impl<'a, 'b> AuthorizeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn nonce_account(
         &mut self,
-        nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+        nonce_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.nonce_account = Some(nonce_account);
         self
@@ -282,7 +274,7 @@ impl<'a, 'b> AuthorizeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn nonce_authority(
         &mut self,
-        nonce_authority: &'b solana_program::account_info::AccountInfo<'a>,
+        nonce_authority: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.nonce_authority = Some(nonce_authority);
         self
@@ -296,7 +288,7 @@ impl<'a, 'b> AuthorizeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -312,11 +304,7 @@ impl<'a, 'b> AuthorizeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -363,14 +351,10 @@ impl<'a, 'b> AuthorizeNonceAccountCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct AuthorizeNonceAccountCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    nonce_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    nonce_authority: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    nonce_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    nonce_authority: Option<&'b solana_account_info::AccountInfo<'a>>,
     new_nonce_authority: Option<Pubkey>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 17 - 33
packages/renderers-rust/e2e/system/src/generated/instructions/create_account.rs

@@ -154,26 +154,26 @@ impl CreateAccountBuilder {
 
 /// `create_account` CPI accounts.
 pub struct CreateAccountCpiAccounts<'a, 'b> {
-    pub payer: &'b solana_program::account_info::AccountInfo<'a>,
+    pub payer: &'b solana_account_info::AccountInfo<'a>,
 
-    pub new_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub new_account: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `create_account` CPI instruction.
 pub struct CreateAccountCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub payer: &'b solana_program::account_info::AccountInfo<'a>,
+    pub payer: &'b solana_account_info::AccountInfo<'a>,
 
-    pub new_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub new_account: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: CreateAccountInstructionArgs,
 }
 
 impl<'a, 'b> CreateAccountCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: CreateAccountCpiAccounts<'a, 'b>,
         args: CreateAccountInstructionArgs,
     ) -> Self {
@@ -191,11 +191,7 @@ impl<'a, 'b> CreateAccountCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -212,11 +208,7 @@ impl<'a, 'b> CreateAccountCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(2 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(*self.payer.key, true));
@@ -268,7 +260,7 @@ pub struct CreateAccountCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> CreateAccountCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(CreateAccountCpiBuilderInstruction {
             __program: program,
             payer: None,
@@ -281,14 +273,14 @@ impl<'a, 'b> CreateAccountCpiBuilder<'a, 'b> {
         Self { instruction }
     }
     #[inline(always)]
-    pub fn payer(&mut self, payer: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn payer(&mut self, payer: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.payer = Some(payer);
         self
     }
     #[inline(always)]
     pub fn new_account(
         &mut self,
-        new_account: &'b solana_program::account_info::AccountInfo<'a>,
+        new_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.new_account = Some(new_account);
         self
@@ -312,7 +304,7 @@ impl<'a, 'b> CreateAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -328,11 +320,7 @@ impl<'a, 'b> CreateAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -382,16 +370,12 @@ impl<'a, 'b> CreateAccountCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct CreateAccountCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    payer: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    new_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    payer: Option<&'b solana_account_info::AccountInfo<'a>>,
+    new_account: Option<&'b solana_account_info::AccountInfo<'a>>,
     lamports: Option<u64>,
     space: Option<u64>,
     program_address: Option<Pubkey>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 21 - 37
packages/renderers-rust/e2e/system/src/generated/instructions/create_account_with_seed.rs

@@ -187,30 +187,30 @@ impl CreateAccountWithSeedBuilder {
 
 /// `create_account_with_seed` CPI accounts.
 pub struct CreateAccountWithSeedCpiAccounts<'a, 'b> {
-    pub payer: &'b solana_program::account_info::AccountInfo<'a>,
+    pub payer: &'b solana_account_info::AccountInfo<'a>,
 
-    pub new_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub new_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub base_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub base_account: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `create_account_with_seed` CPI instruction.
 pub struct CreateAccountWithSeedCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub payer: &'b solana_program::account_info::AccountInfo<'a>,
+    pub payer: &'b solana_account_info::AccountInfo<'a>,
 
-    pub new_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub new_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub base_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub base_account: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: CreateAccountWithSeedInstructionArgs,
 }
 
 impl<'a, 'b> CreateAccountWithSeedCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: CreateAccountWithSeedCpiAccounts<'a, 'b>,
         args: CreateAccountWithSeedInstructionArgs,
     ) -> Self {
@@ -229,11 +229,7 @@ impl<'a, 'b> CreateAccountWithSeedCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -250,11 +246,7 @@ impl<'a, 'b> CreateAccountWithSeedCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(3 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(*self.payer.key, true));
@@ -312,7 +304,7 @@ pub struct CreateAccountWithSeedCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> CreateAccountWithSeedCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(CreateAccountWithSeedCpiBuilderInstruction {
             __program: program,
             payer: None,
@@ -328,14 +320,14 @@ impl<'a, 'b> CreateAccountWithSeedCpiBuilder<'a, 'b> {
         Self { instruction }
     }
     #[inline(always)]
-    pub fn payer(&mut self, payer: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
+    pub fn payer(&mut self, payer: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.payer = Some(payer);
         self
     }
     #[inline(always)]
     pub fn new_account(
         &mut self,
-        new_account: &'b solana_program::account_info::AccountInfo<'a>,
+        new_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.new_account = Some(new_account);
         self
@@ -343,7 +335,7 @@ impl<'a, 'b> CreateAccountWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn base_account(
         &mut self,
-        base_account: &'b solana_program::account_info::AccountInfo<'a>,
+        base_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.base_account = Some(base_account);
         self
@@ -377,7 +369,7 @@ impl<'a, 'b> CreateAccountWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -393,11 +385,7 @@ impl<'a, 'b> CreateAccountWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -450,19 +438,15 @@ impl<'a, 'b> CreateAccountWithSeedCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct CreateAccountWithSeedCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    payer: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    new_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    base_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    payer: Option<&'b solana_account_info::AccountInfo<'a>>,
+    new_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    base_account: Option<&'b solana_account_info::AccountInfo<'a>>,
     base: Option<Pubkey>,
     seed: Option<String>,
     amount: Option<u64>,
     space: Option<u64>,
     program_address: Option<Pubkey>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 21 - 37
packages/renderers-rust/e2e/system/src/generated/instructions/initialize_nonce_account.rs

@@ -167,30 +167,30 @@ impl InitializeNonceAccountBuilder {
 
 /// `initialize_nonce_account` CPI accounts.
 pub struct InitializeNonceAccountCpiAccounts<'a, 'b> {
-    pub nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub recent_blockhashes_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+    pub recent_blockhashes_sysvar: &'b solana_account_info::AccountInfo<'a>,
 
-    pub rent_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+    pub rent_sysvar: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `initialize_nonce_account` CPI instruction.
 pub struct InitializeNonceAccountCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub recent_blockhashes_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+    pub recent_blockhashes_sysvar: &'b solana_account_info::AccountInfo<'a>,
 
-    pub rent_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+    pub rent_sysvar: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: InitializeNonceAccountInstructionArgs,
 }
 
 impl<'a, 'b> InitializeNonceAccountCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: InitializeNonceAccountCpiAccounts<'a, 'b>,
         args: InitializeNonceAccountInstructionArgs,
     ) -> Self {
@@ -209,11 +209,7 @@ impl<'a, 'b> InitializeNonceAccountCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -230,11 +226,7 @@ impl<'a, 'b> InitializeNonceAccountCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(3 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -295,7 +287,7 @@ pub struct InitializeNonceAccountCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> InitializeNonceAccountCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(InitializeNonceAccountCpiBuilderInstruction {
             __program: program,
             nonce_account: None,
@@ -309,7 +301,7 @@ impl<'a, 'b> InitializeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn nonce_account(
         &mut self,
-        nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+        nonce_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.nonce_account = Some(nonce_account);
         self
@@ -317,7 +309,7 @@ impl<'a, 'b> InitializeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn recent_blockhashes_sysvar(
         &mut self,
-        recent_blockhashes_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+        recent_blockhashes_sysvar: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.recent_blockhashes_sysvar = Some(recent_blockhashes_sysvar);
         self
@@ -325,7 +317,7 @@ impl<'a, 'b> InitializeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn rent_sysvar(
         &mut self,
-        rent_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+        rent_sysvar: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.rent_sysvar = Some(rent_sysvar);
         self
@@ -339,7 +331,7 @@ impl<'a, 'b> InitializeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -355,11 +347,7 @@ impl<'a, 'b> InitializeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -411,15 +399,11 @@ impl<'a, 'b> InitializeNonceAccountCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct InitializeNonceAccountCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    nonce_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    recent_blockhashes_sysvar: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    rent_sysvar: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    nonce_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    recent_blockhashes_sysvar: Option<&'b solana_account_info::AccountInfo<'a>>,
+    rent_sysvar: Option<&'b solana_account_info::AccountInfo<'a>>,
     nonce_authority: Option<Pubkey>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 17 - 36
packages/renderers-rust/e2e/system/src/generated/instructions/transfer_sol.rs

@@ -134,26 +134,26 @@ impl TransferSolBuilder {
 
 /// `transfer_sol` CPI accounts.
 pub struct TransferSolCpiAccounts<'a, 'b> {
-    pub source: &'b solana_program::account_info::AccountInfo<'a>,
+    pub source: &'b solana_account_info::AccountInfo<'a>,
 
-    pub destination: &'b solana_program::account_info::AccountInfo<'a>,
+    pub destination: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `transfer_sol` CPI instruction.
 pub struct TransferSolCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub source: &'b solana_program::account_info::AccountInfo<'a>,
+    pub source: &'b solana_account_info::AccountInfo<'a>,
 
-    pub destination: &'b solana_program::account_info::AccountInfo<'a>,
+    pub destination: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: TransferSolInstructionArgs,
 }
 
 impl<'a, 'b> TransferSolCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: TransferSolCpiAccounts<'a, 'b>,
         args: TransferSolInstructionArgs,
     ) -> Self {
@@ -171,11 +171,7 @@ impl<'a, 'b> TransferSolCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -192,11 +188,7 @@ impl<'a, 'b> TransferSolCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(2 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(*self.source.key, true));
@@ -248,7 +240,7 @@ pub struct TransferSolCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> TransferSolCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(TransferSolCpiBuilderInstruction {
             __program: program,
             source: None,
@@ -259,17 +251,14 @@ impl<'a, 'b> TransferSolCpiBuilder<'a, 'b> {
         Self { instruction }
     }
     #[inline(always)]
-    pub fn source(
-        &mut self,
-        source: &'b solana_program::account_info::AccountInfo<'a>,
-    ) -> &mut Self {
+    pub fn source(&mut self, source: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.source = Some(source);
         self
     }
     #[inline(always)]
     pub fn destination(
         &mut self,
-        destination: &'b solana_program::account_info::AccountInfo<'a>,
+        destination: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.destination = Some(destination);
         self
@@ -283,7 +272,7 @@ impl<'a, 'b> TransferSolCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -299,11 +288,7 @@ impl<'a, 'b> TransferSolCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -343,14 +328,10 @@ impl<'a, 'b> TransferSolCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct TransferSolCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    source: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    destination: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    source: Option<&'b solana_account_info::AccountInfo<'a>>,
+    destination: Option<&'b solana_account_info::AccountInfo<'a>>,
     amount: Option<u64>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 21 - 40
packages/renderers-rust/e2e/system/src/generated/instructions/transfer_sol_with_seed.rs

@@ -168,30 +168,30 @@ impl TransferSolWithSeedBuilder {
 
 /// `transfer_sol_with_seed` CPI accounts.
 pub struct TransferSolWithSeedCpiAccounts<'a, 'b> {
-    pub source: &'b solana_program::account_info::AccountInfo<'a>,
+    pub source: &'b solana_account_info::AccountInfo<'a>,
 
-    pub base_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub base_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub destination: &'b solana_program::account_info::AccountInfo<'a>,
+    pub destination: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `transfer_sol_with_seed` CPI instruction.
 pub struct TransferSolWithSeedCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub source: &'b solana_program::account_info::AccountInfo<'a>,
+    pub source: &'b solana_account_info::AccountInfo<'a>,
 
-    pub base_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub base_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub destination: &'b solana_program::account_info::AccountInfo<'a>,
+    pub destination: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: TransferSolWithSeedInstructionArgs,
 }
 
 impl<'a, 'b> TransferSolWithSeedCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: TransferSolWithSeedCpiAccounts<'a, 'b>,
         args: TransferSolWithSeedInstructionArgs,
     ) -> Self {
@@ -210,11 +210,7 @@ impl<'a, 'b> TransferSolWithSeedCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -231,11 +227,7 @@ impl<'a, 'b> TransferSolWithSeedCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(3 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -296,7 +288,7 @@ pub struct TransferSolWithSeedCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> TransferSolWithSeedCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(TransferSolWithSeedCpiBuilderInstruction {
             __program: program,
             source: None,
@@ -310,17 +302,14 @@ impl<'a, 'b> TransferSolWithSeedCpiBuilder<'a, 'b> {
         Self { instruction }
     }
     #[inline(always)]
-    pub fn source(
-        &mut self,
-        source: &'b solana_program::account_info::AccountInfo<'a>,
-    ) -> &mut Self {
+    pub fn source(&mut self, source: &'b solana_account_info::AccountInfo<'a>) -> &mut Self {
         self.instruction.source = Some(source);
         self
     }
     #[inline(always)]
     pub fn base_account(
         &mut self,
-        base_account: &'b solana_program::account_info::AccountInfo<'a>,
+        base_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.base_account = Some(base_account);
         self
@@ -328,7 +317,7 @@ impl<'a, 'b> TransferSolWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn destination(
         &mut self,
-        destination: &'b solana_program::account_info::AccountInfo<'a>,
+        destination: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.destination = Some(destination);
         self
@@ -352,7 +341,7 @@ impl<'a, 'b> TransferSolWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -368,11 +357,7 @@ impl<'a, 'b> TransferSolWithSeedCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -427,17 +412,13 @@ impl<'a, 'b> TransferSolWithSeedCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct TransferSolWithSeedCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    source: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    base_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    destination: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    source: Option<&'b solana_account_info::AccountInfo<'a>>,
+    base_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    destination: Option<&'b solana_account_info::AccountInfo<'a>>,
     amount: Option<u64>,
     from_seed: Option<String>,
     from_owner: Option<Pubkey>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 13 - 29
packages/renderers-rust/e2e/system/src/generated/instructions/upgrade_nonce_account.rs

@@ -105,20 +105,20 @@ impl UpgradeNonceAccountBuilder {
 
 /// `upgrade_nonce_account` CPI accounts.
 pub struct UpgradeNonceAccountCpiAccounts<'a, 'b> {
-    pub nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_account: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `upgrade_nonce_account` CPI instruction.
 pub struct UpgradeNonceAccountCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_account: &'b solana_account_info::AccountInfo<'a>,
 }
 
 impl<'a, 'b> UpgradeNonceAccountCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: UpgradeNonceAccountCpiAccounts<'a, 'b>,
     ) -> Self {
         Self {
@@ -133,11 +133,7 @@ impl<'a, 'b> UpgradeNonceAccountCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -154,11 +150,7 @@ impl<'a, 'b> UpgradeNonceAccountCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(1 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -205,7 +197,7 @@ pub struct UpgradeNonceAccountCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> UpgradeNonceAccountCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(UpgradeNonceAccountCpiBuilderInstruction {
             __program: program,
             nonce_account: None,
@@ -216,7 +208,7 @@ impl<'a, 'b> UpgradeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn nonce_account(
         &mut self,
-        nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+        nonce_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.nonce_account = Some(nonce_account);
         self
@@ -225,7 +217,7 @@ impl<'a, 'b> UpgradeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -241,11 +233,7 @@ impl<'a, 'b> UpgradeNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -279,12 +267,8 @@ impl<'a, 'b> UpgradeNonceAccountCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct UpgradeNonceAccountCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    nonce_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    nonce_account: Option<&'b solana_account_info::AccountInfo<'a>>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 29 - 45
packages/renderers-rust/e2e/system/src/generated/instructions/withdraw_nonce_account.rs

@@ -196,38 +196,38 @@ impl WithdrawNonceAccountBuilder {
 
 /// `withdraw_nonce_account` CPI accounts.
 pub struct WithdrawNonceAccountCpiAccounts<'a, 'b> {
-    pub nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub recipient_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub recipient_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub recent_blockhashes_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+    pub recent_blockhashes_sysvar: &'b solana_account_info::AccountInfo<'a>,
 
-    pub rent_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+    pub rent_sysvar: &'b solana_account_info::AccountInfo<'a>,
 
-    pub nonce_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_authority: &'b solana_account_info::AccountInfo<'a>,
 }
 
 /// `withdraw_nonce_account` CPI instruction.
 pub struct WithdrawNonceAccountCpi<'a, 'b> {
     /// The program to invoke.
-    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+    pub __program: &'b solana_account_info::AccountInfo<'a>,
 
-    pub nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub recipient_account: &'b solana_program::account_info::AccountInfo<'a>,
+    pub recipient_account: &'b solana_account_info::AccountInfo<'a>,
 
-    pub recent_blockhashes_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+    pub recent_blockhashes_sysvar: &'b solana_account_info::AccountInfo<'a>,
 
-    pub rent_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+    pub rent_sysvar: &'b solana_account_info::AccountInfo<'a>,
 
-    pub nonce_authority: &'b solana_program::account_info::AccountInfo<'a>,
+    pub nonce_authority: &'b solana_account_info::AccountInfo<'a>,
     /// The arguments for the instruction.
     pub __args: WithdrawNonceAccountInstructionArgs,
 }
 
 impl<'a, 'b> WithdrawNonceAccountCpi<'a, 'b> {
     pub fn new(
-        program: &'b solana_program::account_info::AccountInfo<'a>,
+        program: &'b solana_account_info::AccountInfo<'a>,
         accounts: WithdrawNonceAccountCpiAccounts<'a, 'b>,
         args: WithdrawNonceAccountInstructionArgs,
     ) -> Self {
@@ -248,11 +248,7 @@ impl<'a, 'b> WithdrawNonceAccountCpi<'a, 'b> {
     #[inline(always)]
     pub fn invoke_with_remaining_accounts(
         &self,
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
     }
@@ -269,11 +265,7 @@ impl<'a, 'b> WithdrawNonceAccountCpi<'a, 'b> {
     pub fn invoke_signed_with_remaining_accounts(
         &self,
         signers_seeds: &[&[&[u8]]],
-        remaining_accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> solana_program::entrypoint::ProgramResult {
         let mut accounts = Vec::with_capacity(5 + remaining_accounts.len());
         accounts.push(solana_instruction::AccountMeta::new(
@@ -346,7 +338,7 @@ pub struct WithdrawNonceAccountCpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> WithdrawNonceAccountCpiBuilder<'a, 'b> {
-    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+    pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
         let instruction = Box::new(WithdrawNonceAccountCpiBuilderInstruction {
             __program: program,
             nonce_account: None,
@@ -362,7 +354,7 @@ impl<'a, 'b> WithdrawNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn nonce_account(
         &mut self,
-        nonce_account: &'b solana_program::account_info::AccountInfo<'a>,
+        nonce_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.nonce_account = Some(nonce_account);
         self
@@ -370,7 +362,7 @@ impl<'a, 'b> WithdrawNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn recipient_account(
         &mut self,
-        recipient_account: &'b solana_program::account_info::AccountInfo<'a>,
+        recipient_account: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.recipient_account = Some(recipient_account);
         self
@@ -378,7 +370,7 @@ impl<'a, 'b> WithdrawNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn recent_blockhashes_sysvar(
         &mut self,
-        recent_blockhashes_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+        recent_blockhashes_sysvar: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.recent_blockhashes_sysvar = Some(recent_blockhashes_sysvar);
         self
@@ -386,7 +378,7 @@ impl<'a, 'b> WithdrawNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn rent_sysvar(
         &mut self,
-        rent_sysvar: &'b solana_program::account_info::AccountInfo<'a>,
+        rent_sysvar: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.rent_sysvar = Some(rent_sysvar);
         self
@@ -394,7 +386,7 @@ impl<'a, 'b> WithdrawNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn nonce_authority(
         &mut self,
-        nonce_authority: &'b solana_program::account_info::AccountInfo<'a>,
+        nonce_authority: &'b solana_account_info::AccountInfo<'a>,
     ) -> &mut Self {
         self.instruction.nonce_authority = Some(nonce_authority);
         self
@@ -408,7 +400,7 @@ impl<'a, 'b> WithdrawNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_account(
         &mut self,
-        account: &'b solana_program::account_info::AccountInfo<'a>,
+        account: &'b solana_account_info::AccountInfo<'a>,
         is_writable: bool,
         is_signer: bool,
     ) -> &mut Self {
@@ -424,11 +416,7 @@ impl<'a, 'b> WithdrawNonceAccountCpiBuilder<'a, 'b> {
     #[inline(always)]
     pub fn add_remaining_accounts(
         &mut self,
-        accounts: &[(
-            &'b solana_program::account_info::AccountInfo<'a>,
-            bool,
-            bool,
-        )],
+        accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)],
     ) -> &mut Self {
         self.instruction
             .__remaining_accounts
@@ -490,17 +478,13 @@ impl<'a, 'b> WithdrawNonceAccountCpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct WithdrawNonceAccountCpiBuilderInstruction<'a, 'b> {
-    __program: &'b solana_program::account_info::AccountInfo<'a>,
-    nonce_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    recipient_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    recent_blockhashes_sysvar: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    rent_sysvar: Option<&'b solana_program::account_info::AccountInfo<'a>>,
-    nonce_authority: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+    __program: &'b solana_account_info::AccountInfo<'a>,
+    nonce_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    recipient_account: Option<&'b solana_account_info::AccountInfo<'a>>,
+    recent_blockhashes_sysvar: Option<&'b solana_account_info::AccountInfo<'a>>,
+    rent_sysvar: Option<&'b solana_account_info::AccountInfo<'a>>,
+    nonce_authority: Option<&'b solana_account_info::AccountInfo<'a>>,
     withdraw_amount: Option<u64>,
     /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-    __remaining_accounts: Vec<(
-        &'b solana_program::account_info::AccountInfo<'a>,
-        bool,
-        bool,
-    )>,
+    __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 1 - 1
packages/renderers-rust/e2e/system/src/generated/shared.rs

@@ -9,7 +9,7 @@
 #[derive(Debug, Clone)]
 pub struct DecodedAccount<T> {
     pub address: solana_pubkey::Pubkey,
-    pub account: solana_sdk::account::Account,
+    pub account: solana_account::Account,
     pub data: T,
 }
 

+ 2 - 2
packages/renderers-rust/public/templates/accountsPage.njk

@@ -119,10 +119,10 @@ impl {{ account.name | pascalCase }} {
   }
 }
 
-impl<'a> TryFrom<&solana_program::account_info::AccountInfo<'a>> for {{ account.name | pascalCase }} {
+impl<'a> TryFrom<&solana_account_info::AccountInfo<'a>> for {{ account.name | pascalCase }} {
   type Error = std::io::Error;
 
-  fn try_from(account_info: &solana_program::account_info::AccountInfo<'a>) -> Result<Self, Self::Error> {
+  fn try_from(account_info: &solana_account_info::AccountInfo<'a>) -> Result<Self, Self::Error> {
       let mut data: &[u8] = &(*account_info.data).borrow();
       Self::deserialize(&mut data)
   }

+ 8 - 8
packages/renderers-rust/public/templates/instructionsCpiPage.njk

@@ -7,9 +7,9 @@
       {% endif %}
 
       {% if account.isSigner === 'either' %}
-        {% set type = '(&\'b solana_program::account_info::AccountInfo<\'a>, bool)' %}
+        {% set type = '(&\'b solana_account_info::AccountInfo<\'a>, bool)' %}
       {% else %}
-        {% set type = '&\'b solana_program::account_info::AccountInfo<\'a>' %}
+        {% set type = '&\'b solana_account_info::AccountInfo<\'a>' %}
       {% endif %}
 
       {% if account.isOptional %}
@@ -24,16 +24,16 @@
 /// `{{ instruction.name | snakeCase }}` CPI instruction.
 pub struct {{ instruction.name | pascalCase }}Cpi<'a, 'b> {
   /// The program to invoke.
-  pub __program: &'b solana_program::account_info::AccountInfo<'a>,
+  pub __program: &'b solana_account_info::AccountInfo<'a>,
   {% for account in instruction.accounts %}
     {% if account.docs.length > 0 %}
       {{ macros.docblock(account.docs) }}
     {% endif %}
 
     {% if account.isSigner === 'either' %}
-      {% set type = '(&\'b solana_program::account_info::AccountInfo<\'a>, bool)' %}
+      {% set type = '(&\'b solana_account_info::AccountInfo<\'a>, bool)' %}
     {% else %}
-      {% set type = '&\'b solana_program::account_info::AccountInfo<\'a>' %}
+      {% set type = '&\'b solana_account_info::AccountInfo<\'a>' %}
     {% endif %}
 
     {% if account.isOptional %}
@@ -50,7 +50,7 @@ pub struct {{ instruction.name | pascalCase }}Cpi<'a, 'b> {
 
 impl<'a, 'b> {{ instruction.name | pascalCase }}Cpi<'a, 'b> {
   pub fn new(
-    program: &'b solana_program::account_info::AccountInfo<'a>,
+    program: &'b solana_account_info::AccountInfo<'a>,
     {% if instruction.accounts.length > 0 %}
       accounts: {{ instruction.name | pascalCase }}CpiAccounts<'a, 'b>,
     {% endif %}
@@ -73,7 +73,7 @@ impl<'a, 'b> {{ instruction.name | pascalCase }}Cpi<'a, 'b> {
     self.invoke_signed_with_remaining_accounts(&[], &[])
   }
   #[inline(always)]
-  pub fn invoke_with_remaining_accounts(&self, remaining_accounts: &[(&'b solana_program::account_info::AccountInfo<'a>, bool, bool)]) -> solana_program::entrypoint::ProgramResult {
+  pub fn invoke_with_remaining_accounts(&self, remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> solana_program::entrypoint::ProgramResult {
     self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
   }
   #[inline(always)]
@@ -86,7 +86,7 @@ impl<'a, 'b> {{ instruction.name | pascalCase }}Cpi<'a, 'b> {
   pub fn invoke_signed_with_remaining_accounts(
     &self,
     signers_seeds: &[&[&[u8]]],
-    remaining_accounts: &[(&'b solana_program::account_info::AccountInfo<'a>, bool, bool)]
+    remaining_accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]
   ) -> solana_program::entrypoint::ProgramResult {
     let mut accounts = Vec::with_capacity({{ instruction.accounts.length + '+' if instruction.accounts.length > 0}} remaining_accounts.len());
     {% for account in instruction.accounts %}

+ 8 - 8
packages/renderers-rust/public/templates/instructionsCpiPageBuilder.njk

@@ -21,7 +21,7 @@ pub struct {{ instruction.name | pascalCase }}CpiBuilder<'a, 'b> {
 }
 
 impl<'a, 'b> {{ instruction.name | pascalCase }}CpiBuilder<'a, 'b> {
-  pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
+  pub fn new(program: &'b solana_account_info::AccountInfo<'a>) -> Self {
     let instruction = Box::new({{ instruction.name | pascalCase }}CpiBuilderInstruction {
       __program: program,
       {% for account in instruction.accounts %}
@@ -40,7 +40,7 @@ impl<'a, 'b> {{ instruction.name | pascalCase }}CpiBuilder<'a, 'b> {
     {{'/// `[optional account]`\n' if account.isOptional }}
     {{- macros.docblock(account.docs) -}}
     #[inline(always)]
-    pub fn {{ account.name | snakeCase }}(&mut self, {{ account.name | snakeCase }}: {{ "Option<&'b solana_program::account_info::AccountInfo<'a>>" if account.isOptional else "&'b solana_program::account_info::AccountInfo<'a>" }}{{ ', as_signer: bool' if account.isSigner === 'either' }}) -> &mut Self {
+    pub fn {{ account.name | snakeCase }}(&mut self, {{ account.name | snakeCase }}: {{ "Option<&'b solana_account_info::AccountInfo<'a>>" if account.isOptional else "&'b solana_account_info::AccountInfo<'a>" }}{{ ', as_signer: bool' if account.isSigner === 'either' }}) -> &mut Self {
       {% if account.isOptional %}
         {% if account.isSigner === 'either' %}
           if let Some({{ account.name | snakeCase }}) = {{ account.name | snakeCase }} {
@@ -75,7 +75,7 @@ impl<'a, 'b> {{ instruction.name | pascalCase }}CpiBuilder<'a, 'b> {
   {% endfor %}
   /// Add an additional account to the instruction.
   #[inline(always)]
-  pub fn add_remaining_account(&mut self, account: &'b solana_program::account_info::AccountInfo<'a>, is_writable: bool, is_signer: bool) -> &mut Self {
+  pub fn add_remaining_account(&mut self, account: &'b solana_account_info::AccountInfo<'a>, is_writable: bool, is_signer: bool) -> &mut Self {
     self.instruction.__remaining_accounts.push((account, is_writable, is_signer));
     self
   }
@@ -84,7 +84,7 @@ impl<'a, 'b> {{ instruction.name | pascalCase }}CpiBuilder<'a, 'b> {
   /// Each account is represented by a tuple of the `AccountInfo`, a `bool` indicating whether the account is writable or not,
   /// and a `bool` indicating whether the account is a signer or not.
   #[inline(always)]
-  pub fn add_remaining_accounts(&mut self, accounts: &[(&'b solana_program::account_info::AccountInfo<'a>, bool, bool)]) -> &mut Self {
+  pub fn add_remaining_accounts(&mut self, accounts: &[(&'b solana_account_info::AccountInfo<'a>, bool, bool)]) -> &mut Self {
     self.instruction.__remaining_accounts.extend_from_slice(accounts);
     self
   }
@@ -127,12 +127,12 @@ impl<'a, 'b> {{ instruction.name | pascalCase }}CpiBuilder<'a, 'b> {
 
 #[derive(Clone, Debug)]
 struct {{ instruction.name | pascalCase }}CpiBuilderInstruction<'a, 'b> {
-  __program: &'b solana_program::account_info::AccountInfo<'a>,
+  __program: &'b solana_account_info::AccountInfo<'a>,
   {% for account in instruction.accounts %}
     {% if account.isSigner === 'either' %}
-      {{ account.name | snakeCase }}: Option<(&'b solana_program::account_info::AccountInfo<'a>, bool)>,
+      {{ account.name | snakeCase }}: Option<(&'b solana_account_info::AccountInfo<'a>, bool)>,
     {% else %}
-      {{ account.name | snakeCase }}: Option<&'b solana_program::account_info::AccountInfo<'a>>,
+      {{ account.name | snakeCase }}: Option<&'b solana_account_info::AccountInfo<'a>>,
     {% endif %}
   {% endfor %}
   {% for arg in instructionArgs %}
@@ -141,5 +141,5 @@ struct {{ instruction.name | pascalCase }}CpiBuilderInstruction<'a, 'b> {
     {% endif %}
   {% endfor %}
   /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
-  __remaining_accounts: Vec<(&'b solana_program::account_info::AccountInfo<'a>, bool, bool)>,
+  __remaining_accounts: Vec<(&'b solana_account_info::AccountInfo<'a>, bool, bool)>,
 }

+ 1 - 1
packages/renderers-rust/public/templates/sharedPage.njk

@@ -17,7 +17,7 @@ For now, we just define them here. This the following caveat:
     #[derive(Debug, Clone)]
     pub struct DecodedAccount<T> {
         pub address: solana_pubkey::Pubkey,
-        pub account: solana_sdk::account::Account,
+        pub account: solana_account::Account,
         pub data: T,
     }