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

token-2022: Remove token-group and confidential-hook features #7019

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions token/program-2022/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@ exclude = ["js/**"]
no-entrypoint = []
test-sbf = []
serde-traits = ["dep:serde", "dep:serde_with", "dep:base64", "spl-pod/serde-traits"]
default = ["confidential-hook", "token-group", "zk-ops"]
default = ["zk-ops"]
# Remove this feature once the underlying syscalls are released on all networks
zk-ops = []
# Remove this feature once the token group implementation has been audited
token-group = []
# Remove this feature once the confidential transfer hook has been audited
confidential-hook = []

[dependencies]
arrayref = "0.3.7"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Remove feature once zk ops syscalls are enabled on all networks
#[cfg(feature = "confidential-hook")]
use crate::extension::transfer_hook;
#[cfg(feature = "zk-ops")]
use {
crate::extension::non_transferable::NonTransferableAccount,
Expand All @@ -18,8 +16,8 @@ use {
},
memo_transfer::{check_previous_sibling_instruction_is_memo, memo_required},
transfer_fee::TransferFeeConfig,
BaseStateWithExtensions, BaseStateWithExtensionsMut, PodStateWithExtensions,
PodStateWithExtensionsMut,
transfer_hook, BaseStateWithExtensions, BaseStateWithExtensionsMut,
PodStateWithExtensions, PodStateWithExtensionsMut,
},
instruction::{decode_instruction_data, decode_instruction_type},
pod::{PodAccount, PodMint},
Expand Down Expand Up @@ -625,7 +623,6 @@ fn process_transfer(
authority_info
};

#[cfg(feature = "confidential-hook")]
if let Some(program_id) = transfer_hook::get_program_id(&mint) {
// set transferring flags, scope the borrow to avoid double-borrow during CPI
{
Expand Down
11 changes: 0 additions & 11 deletions token/program-2022/src/extension/token_group/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ pub fn process_initialize_member(_program_id: &Pubkey, accounts: &[AccountInfo])
}

/// Processes an [Instruction](enum.Instruction.html).
#[cfg(feature = "token-group")]
pub fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand All @@ -230,13 +229,3 @@ pub fn process_instruction(
}
}
}

/// Processes an [Instruction](enum.Instruction.html).
#[cfg(not(feature = "token-group"))]
pub fn process_instruction(
_program_id: &Pubkey,
_accounts: &[AccountInfo],
_instruction: TokenGroupInstruction,
) -> ProgramResult {
Err(TokenError::InvalidInstruction.into())
}
Loading