Skip to content

Commit

Permalink
drop anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Oct 24, 2024
1 parent 6a18868 commit 83a9637
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 36 deletions.
25 changes: 0 additions & 25 deletions clients/rust/src/generated/accounts/address_lookup_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,28 +62,3 @@ impl<'a> TryFrom<&solana_program::account_info::AccountInfo<'a>> for AddressLook
Self::deserialize(&mut data)
}
}

#[cfg(feature = "anchor")]
impl anchor_lang::AccountDeserialize for AddressLookupTable {
fn try_deserialize_unchecked(buf: &mut &[u8]) -> anchor_lang::Result<Self> {
Ok(Self::deserialize(buf)?)
}
}

#[cfg(feature = "anchor")]
impl anchor_lang::AccountSerialize for AddressLookupTable {}

#[cfg(feature = "anchor")]
impl anchor_lang::Owner for AddressLookupTable {
fn owner() -> Pubkey {
crate::ADDRESS_LOOKUP_TABLE_ID
}
}

#[cfg(feature = "anchor-idl-build")]
impl anchor_lang::IdlBuild for AddressLookupTable {}

#[cfg(feature = "anchor-idl-build")]
impl anchor_lang::Discriminator for AddressLookupTable {
const DISCRIMINATOR: [u8; 8] = [0; 8];
}
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ impl<'a, 'b> CloseLookupTableCpi<'a, 'b> {
accounts,
data,
};
let mut account_infos = Vec::with_capacity(3 + 1 + remaining_accounts.len());
let mut account_infos = Vec::with_capacity(4 + remaining_accounts.len());
account_infos.push(self.__program.clone());
account_infos.push(self.address.clone());
account_infos.push(self.authority.clone());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl<'a, 'b> CreateLookupTableCpi<'a, 'b> {
accounts,
data,
};
let mut account_infos = Vec::with_capacity(4 + 1 + remaining_accounts.len());
let mut account_infos = Vec::with_capacity(5 + remaining_accounts.len());
account_infos.push(self.__program.clone());
account_infos.push(self.address.clone());
account_infos.push(self.authority.clone());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl<'a, 'b> DeactivateLookupTableCpi<'a, 'b> {
accounts,
data,
};
let mut account_infos = Vec::with_capacity(2 + 1 + remaining_accounts.len());
let mut account_infos = Vec::with_capacity(3 + remaining_accounts.len());
account_infos.push(self.__program.clone());
account_infos.push(self.address.clone());
account_infos.push(self.authority.clone());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl<'a, 'b> ExtendLookupTableCpi<'a, 'b> {
accounts,
data,
};
let mut account_infos = Vec::with_capacity(4 + 1 + remaining_accounts.len());
let mut account_infos = Vec::with_capacity(5 + remaining_accounts.len());
account_infos.push(self.__program.clone());
account_infos.push(self.address.clone());
account_infos.push(self.authority.clone());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl<'a, 'b> FreezeLookupTableCpi<'a, 'b> {
accounts,
data,
};
let mut account_infos = Vec::with_capacity(2 + 1 + remaining_accounts.len());
let mut account_infos = Vec::with_capacity(3 + remaining_accounts.len());
account_infos.push(self.__program.clone());
account_infos.push(self.address.clone());
account_infos.push(self.authority.clone());
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"devDependencies": {
"@codama/renderers-js": "^1.0.0",
"@codama/renderers-rust": "^1.0.0",
"@codama/renderers-rust": "^1.0.3",
"@iarna/toml": "^2.2.5",
"codama": "^1.0.0",
"typescript": "^5.5.2",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions scripts/generate-clients.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ codama.accept(
const rustClient = path.join(__dirname, '..', 'clients', 'rust');
codama.accept(
renderRustVisitor(path.join(rustClient, 'src', 'generated'), {
anchorTraits: false,
formatCode: true,
crateFolder: rustClient,
toolchain: getToolchainArgument('format'),
Expand Down

0 comments on commit 83a9637

Please sign in to comment.