Skip to content

Commit 179b060

Browse files
committed
remove backwards compat reexport
1 parent 93de2ed commit 179b060

File tree

104 files changed

+372
-378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+372
-378
lines changed

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

forester/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ light-program-test = { workspace = true }
3030
light-compressible = { workspace = true, default-features = false, features = ["solana"] }
3131
light-token-interface = { workspace = true }
3232
light-token = { workspace = true }
33+
light-compressed-token-sdk = { workspace = true }
3334
solana-rpc-client-api = { workspace = true }
3435
solana-transaction-status = { workspace = true }
3536
bb8 = { workspace = true }

forester/src/compressible/compressor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ use anchor_lang::{InstructionData, ToAccountMetas};
44
use forester_utils::rpc_pool::SolanaRpcPool;
55
use light_client::{indexer::TreeInfo, rpc::Rpc};
66
use light_compressed_account::TreeType;
7+
use light_compressed_token_sdk::compressed_token::compress_and_close::CompressAndCloseAccounts as CTokenAccounts;
78
use light_compressible::config::CompressibleConfig;
89
use light_registry::{
910
accounts::CompressAndCloseContext, compressible::compressed_token::CompressAndCloseIndices,
1011
instruction::CompressAndClose,
1112
};
1213
use light_sdk::instruction::PackedAccounts;
13-
use light_token::compressed_token::compress_and_close::CompressAndCloseAccounts as CTokenAccounts;
1414
use light_token_interface::LIGHT_TOKEN_PROGRAM_ID;
1515
use solana_pubkey::pubkey;
1616
use solana_sdk::{

forester/tests/test_compressible_ctoken.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use light_client::{
1111
local_test_validator::{spawn_validator, LightValidatorConfig},
1212
rpc::{LightClient, LightClientConfig, Rpc},
1313
};
14+
use light_compressed_token_sdk::compressed_token::create_compressed_mint;
1415
use light_registry::{
1516
protocol_config::state::ProtocolConfigPda,
1617
sdk::{
@@ -20,7 +21,6 @@ use light_registry::{
2021
utils::{get_forester_pda, get_protocol_config_pda_address},
2122
ForesterConfig,
2223
};
23-
use light_token::compressed_token::create_compressed_mint;
2424
use light_token_client::actions::{
2525
create_compressible_token_account, CreateCompressibleTokenAccountInputs,
2626
};

program-tests/compressed-token-test/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ light-token-interface = { workspace = true }
4747
light-token-client = { workspace = true }
4848
light-compressible = { workspace = true }
4949
light-token = { workspace = true }
50+
light-compressed-token-sdk = { workspace = true }
5051
spl-token-2022 = { workspace = true }
5152
spl-pod = { workspace = true }
5253
light-zero-copy = { workspace = true , features = ["std", "derive", "mut"]}

program-tests/compressed-token-test/tests/compress_only/all.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ async fn test_compress_and_close_ctoken_with_extensions() {
2020
#[allow(unused_imports)]
2121
use light_client::indexer::CompressedTokenAccount;
2222
use light_client::indexer::Indexer;
23+
use light_compressed_token_sdk::spl_interface::find_spl_interface_pda_with_index;
2324
use light_test_utils::mint_2022::{create_token_22_account, mint_spl_tokens_22};
24-
use light_token::{
25-
instruction::{CompressibleParams, CreateTokenAccount, TransferFromSpl},
26-
spl_interface::find_spl_interface_pda_with_index,
27-
};
25+
use light_token::instruction::{CompressibleParams, CreateTokenAccount, TransferFromSpl};
2826
use light_token_client::instructions::transfer2::{
2927
create_generic_transfer2_instruction, DecompressInput, Transfer2InstructionType,
3028
};

program-tests/compressed-token-test/tests/compress_only/ata_decompress.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! decompressed to the exact same ATA pubkey that was originally compressed.
55
66
use light_client::indexer::Indexer;
7+
use light_compressed_token_sdk::spl_interface::find_spl_interface_pda_with_index;
78
use light_program_test::{
89
program_test::TestRpc, utils::assert::assert_rpc_error, LightProgramTest, ProgramTestConfig,
910
};
@@ -14,12 +15,9 @@ use light_test_utils::{
1415
},
1516
Rpc, RpcError,
1617
};
17-
use light_token::{
18-
instruction::{
19-
derive_token_ata, CompressibleParams, CreateAssociatedTokenAccount, CreateTokenAccount,
20-
TransferFromSpl,
21-
},
22-
spl_interface::find_spl_interface_pda_with_index,
18+
use light_token::instruction::{
19+
derive_token_ata, CompressibleParams, CreateAssociatedTokenAccount, CreateTokenAccount,
20+
TransferFromSpl,
2321
};
2422
use light_token_client::instructions::transfer2::{
2523
create_generic_transfer2_instruction, DecompressInput, Transfer2InstructionType,
@@ -790,10 +788,10 @@ async fn test_decompress_skips_delegate_if_destination_has_delegate() {
790788
async fn test_ata_decompress_with_mismatched_amount_fails() {
791789
use borsh::BorshSerialize;
792790
use light_compressed_account::compressed_account::PackedMerkleContext;
793-
use light_sdk::instruction::PackedAccounts;
794-
use light_token::compressed_token::transfer2::account_metas::{
791+
use light_compressed_token_sdk::compressed_token::transfer2::account_metas::{
795792
get_transfer2_instruction_account_metas, Transfer2AccountsMetaConfig,
796793
};
794+
use light_sdk::instruction::PackedAccounts;
797795
use light_token_interface::{
798796
instructions::transfer2::{
799797
CompressedTokenInstructionDataTransfer2, Compression, CompressionMode,

program-tests/compressed-token-test/tests/compress_only/decompress_restrictions.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//! - Spec #14: CompressedOnly inputs must decompress complete account (no change output)
66
77
use light_client::indexer::Indexer;
8+
use light_compressed_token_sdk::spl_interface::find_spl_interface_pda_with_index;
89
use light_program_test::{
910
program_test::{LightProgramTest, TestRpc},
1011
utils::assert::assert_rpc_error,
@@ -14,10 +15,7 @@ use light_test_utils::mint_2022::{
1415
create_mint_22_with_extension_types, create_token_22_account, mint_spl_tokens_22,
1516
RESTRICTED_EXTENSIONS,
1617
};
17-
use light_token::{
18-
instruction::{CompressibleParams, CreateTokenAccount, TransferFromSpl},
19-
spl_interface::find_spl_interface_pda_with_index,
20-
};
18+
use light_token::instruction::{CompressibleParams, CreateTokenAccount, TransferFromSpl};
2119
use light_token_client::instructions::transfer2::{
2220
create_generic_transfer2_instruction, DecompressInput, Transfer2InstructionType,
2321
};

program-tests/compressed-token-test/tests/compress_only/invalid_destination.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
use anchor_spl::token_2022::spl_token_2022;
1010
use light_client::indexer::Indexer;
11+
use light_compressed_token_sdk::spl_interface::find_spl_interface_pda_with_index;
1112
use light_program_test::{
1213
program_test::{LightProgramTest, TestRpc},
1314
utils::assert::assert_rpc_error,
@@ -17,10 +18,7 @@ use light_test_utils::mint_2022::{
1718
create_mint_22_with_extension_types, create_token_22_account, mint_spl_tokens_22,
1819
RESTRICTED_EXTENSIONS,
1920
};
20-
use light_token::{
21-
instruction::{CompressibleParams, CreateTokenAccount, TransferFromSpl},
22-
spl_interface::find_spl_interface_pda_with_index,
23-
};
21+
use light_token::instruction::{CompressibleParams, CreateTokenAccount, TransferFromSpl};
2422
use light_token_client::instructions::transfer2::{
2523
create_generic_transfer2_instruction, DecompressInput, Transfer2InstructionType,
2624
};

program-tests/compressed-token-test/tests/compress_only/invalid_extension_state.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
1010
use anchor_lang::{system_program, InstructionData, ToAccountMetas};
1111
use light_client::indexer::Indexer;
12+
use light_compressed_token_sdk::{
13+
constants::CPI_AUTHORITY_PDA,
14+
spl_interface::find_spl_interface_pda_with_index as sdk_find_spl_interface_pda,
15+
};
1216
use light_program_test::{
1317
program_test::{LightProgramTest, TestRpc},
1418
utils::assert::assert_rpc_error,
@@ -17,10 +21,8 @@ use light_program_test::{
1721
use light_test_utils::mint_2022::{
1822
create_token_22_account, mint_spl_tokens_22, set_mint_transfer_fee, set_mint_transfer_hook,
1923
};
20-
use light_token::{
21-
constants::CPI_AUTHORITY_PDA,
22-
instruction::{CompressibleParams, CreateTokenAccount, TransferFromSpl, TransferToSpl},
23-
spl_interface::find_spl_interface_pda_with_index as sdk_find_spl_interface_pda,
24+
use light_token::instruction::{
25+
CompressibleParams, CreateTokenAccount, TransferFromSpl, TransferToSpl,
2426
};
2527
use light_token_client::instructions::transfer2::{
2628
create_generic_transfer2_instruction, DecompressInput, Transfer2InstructionType,

0 commit comments

Comments
 (0)