Skip to content

Commit cee1899

Browse files
chore: remove commented-out code in sdk (#1551)
1 parent 60cc88e commit cee1899

File tree

7 files changed

+0
-276
lines changed

7 files changed

+0
-276
lines changed

sdk-libs/sdk/src/address.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,6 @@ use solana_program::account_info::AccountInfo;
99

1010
use crate::merkle_context::{AddressMerkleContext, RemainingAccounts};
1111

12-
// #[derive(Debug, PartialEq, Default, Clone, AnchorDeserialize, AnchorSerialize)]
13-
// pub struct NewAddressParams {
14-
// pub seed: [u8; 32],
15-
// pub address_queue_pubkey: Pubkey,
16-
// pub address_merkle_tree_pubkey: Pubkey,
17-
// pub address_merkle_tree_root_index: u16,
18-
// }
19-
20-
// #[derive(Debug, PartialEq, Default, Clone, Copy, AnchorDeserialize, AnchorSerialize)]
21-
// pub struct PackedNewAddressParams {
22-
// pub seed: [u8; 32],
23-
// pub address_queue_account_index: u8,
24-
// pub address_merkle_tree_account_index: u8,
25-
// pub address_merkle_tree_root_index: u16,
26-
// }
27-
2812
pub struct AddressWithMerkleContext {
2913
pub address: [u8; 32],
3014
pub address_merkle_context: AddressMerkleContext,

sdk-libs/sdk/src/compressed_account.rs

Lines changed: 0 additions & 174 deletions
This file was deleted.

sdk-libs/sdk/src/event.rs

Lines changed: 0 additions & 22 deletions
This file was deleted.

sdk-libs/sdk/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ pub mod account;
55
pub mod account_info;
66
pub mod account_meta;
77
pub mod address;
8-
// pub mod compressed_account;
98
pub mod constants;
109
pub use constants::*;
1110
pub mod context;
1211
pub mod error;
13-
// pub mod event;
1412
pub mod instruction_data;
1513
pub mod legacy;
1614
pub mod merkle_context;

sdk-libs/sdk/src/merkle_context.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,6 @@ impl RemainingAccounts {
5454
}
5555
}
5656

57-
// #[derive(Debug, Clone, Copy, AnchorSerialize, AnchorDeserialize, PartialEq, Default)]
58-
// pub struct MerkleContext {
59-
// pub merkle_tree_pubkey: Pubkey,
60-
// pub nullifier_queue_pubkey: Pubkey,
61-
// pub leaf_index: u32,
62-
// /// Index of leaf in queue. Placeholder of batched Merkle tree updates
63-
// /// currently unimplemented.
64-
// pub prove_by_index: bool,
65-
// }
66-
67-
// #[derive(Debug, Clone, Copy, AnchorSerialize, AnchorDeserialize, PartialEq, Default)]
68-
// pub struct PackedMerkleContext {
69-
// pub merkle_tree_pubkey_index: u8,
70-
// pub nullifier_queue_pubkey_index: u8,
71-
// pub leaf_index: u32,
72-
// /// Index of leaf in queue. Placeholder of batched Merkle tree updates
73-
// /// currently unimplemented.
74-
// pub prove_by_index: bool,
75-
// }
76-
7757
pub fn pack_merkle_contexts<'a, I>(
7858
merkle_contexts: I,
7959
remaining_accounts: &'a mut RemainingAccounts,

sdk-libs/sdk/src/proof.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,6 @@ pub struct NewAddressProofWithContext {
2929
pub new_element_next_value: Option<BigUint>,
3030
}
3131

32-
// #[derive(Debug, Clone, PartialEq, Eq, AnchorDeserialize, AnchorSerialize)]
33-
// pub struct CompressedProof {
34-
// pub a: [u8; 32],
35-
// pub b: [u8; 64],
36-
// pub c: [u8; 32],
37-
// }
38-
39-
// impl Default for CompressedProof {
40-
// fn default() -> Self {
41-
// Self {
42-
// a: [0; 32],
43-
// b: [0; 64],
44-
// c: [0; 32],
45-
// }
46-
// }
47-
// }
48-
4932
#[derive(Debug, AnchorDeserialize, AnchorSerialize)]
5033
pub struct ProofRpcResult {
5134
pub proof: CompressedProof,

sdk-libs/sdk/src/verify.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,6 @@ pub fn find_cpi_signer(program_id: &Pubkey) -> Pubkey {
2020
Pubkey::find_program_address([CPI_AUTHORITY_PDA_SEED].as_slice(), program_id).0
2121
}
2222

23-
// #[derive(AnchorSerialize, AnchorDeserialize, Debug, Clone, Copy, PartialEq, Eq, Default)]
24-
// pub struct CompressedCpiContext {
25-
// /// Is set by the program that is invoking the CPI to signal that is should
26-
// /// set the cpi context.
27-
// pub set_context: bool,
28-
// /// Is set to clear the cpi context since someone could have set it before
29-
// /// with unrelated data.
30-
// pub first_set_context: bool,
31-
// /// Index of cpi context account in remaining accounts.
32-
// pub cpi_context_account_index: u8,
33-
// }
34-
35-
// #[derive(Debug, PartialEq, Default, Clone, AnchorDeserialize, AnchorSerialize)]
36-
// pub struct InstructionDataInvokeCpi {
37-
// pub proof: Option<CompressedProof>,
38-
// pub new_address_params: Vec<PackedNewAddressParams>,
39-
// pub input_compressed_accounts_with_merkle_context:
40-
// Vec<PackedCompressedAccountWithMerkleContext>,
41-
// pub output_compressed_accounts: Vec<OutputCompressedAccountWithPackedContext>,
42-
// pub relay_fee: Option<u64>,
43-
// pub compress_or_decompress_lamports: Option<u64>,
44-
// pub is_compress: bool,
45-
// pub cpi_context: Option<CompressedCpiContext>,
46-
// }
47-
4823
#[inline(always)]
4924
pub fn setup_cpi_accounts<'info>(
5025
ctx: &Context<

0 commit comments

Comments
 (0)