Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 9cfcc58

Browse files
authored
token-2022: Remove token-group and confidential-hook features (#7019)
* token-2022: Remove token-group feature * token-2022: Remove confidential-hook feature
1 parent 09d85c9 commit 9cfcc58

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

token/program-2022/Cargo.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ exclude = ["js/**"]
1212
no-entrypoint = []
1313
test-sbf = []
1414
serde-traits = ["dep:serde", "dep:serde_with", "dep:base64", "spl-pod/serde-traits"]
15-
default = ["confidential-hook", "token-group", "zk-ops"]
15+
default = ["zk-ops"]
1616
# Remove this feature once the underlying syscalls are released on all networks
1717
zk-ops = []
18-
# Remove this feature once the token group implementation has been audited
19-
token-group = []
20-
# Remove this feature once the confidential transfer hook has been audited
21-
confidential-hook = []
2218

2319
[dependencies]
2420
arrayref = "0.3.7"

token/program-2022/src/extension/confidential_transfer/processor.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// Remove feature once zk ops syscalls are enabled on all networks
2-
#[cfg(feature = "confidential-hook")]
3-
use crate::extension::transfer_hook;
42
#[cfg(feature = "zk-ops")]
53
use {
64
crate::extension::non_transferable::NonTransferableAccount,
@@ -18,8 +16,8 @@ use {
1816
},
1917
memo_transfer::{check_previous_sibling_instruction_is_memo, memo_required},
2018
transfer_fee::TransferFeeConfig,
21-
BaseStateWithExtensions, BaseStateWithExtensionsMut, PodStateWithExtensions,
22-
PodStateWithExtensionsMut,
19+
transfer_hook, BaseStateWithExtensions, BaseStateWithExtensionsMut,
20+
PodStateWithExtensions, PodStateWithExtensionsMut,
2321
},
2422
instruction::{decode_instruction_data, decode_instruction_type},
2523
pod::{PodAccount, PodMint},
@@ -625,7 +623,6 @@ fn process_transfer(
625623
authority_info
626624
};
627625

628-
#[cfg(feature = "confidential-hook")]
629626
if let Some(program_id) = transfer_hook::get_program_id(&mint) {
630627
// set transferring flags, scope the borrow to avoid double-borrow during CPI
631628
{

token/program-2022/src/extension/token_group/processor.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ pub fn process_initialize_member(_program_id: &Pubkey, accounts: &[AccountInfo])
205205
}
206206

207207
/// Processes an [Instruction](enum.Instruction.html).
208-
#[cfg(feature = "token-group")]
209208
pub fn process_instruction(
210209
program_id: &Pubkey,
211210
accounts: &[AccountInfo],
@@ -230,13 +229,3 @@ pub fn process_instruction(
230229
}
231230
}
232231
}
233-
234-
/// Processes an [Instruction](enum.Instruction.html).
235-
#[cfg(not(feature = "token-group"))]
236-
pub fn process_instruction(
237-
_program_id: &Pubkey,
238-
_accounts: &[AccountInfo],
239-
_instruction: TokenGroupInstruction,
240-
) -> ProgramResult {
241-
Err(TokenError::InvalidInstruction.into())
242-
}

0 commit comments

Comments
 (0)