Skip to content

Commit 9e3d466

Browse files
wip
1 parent 42a9b6b commit 9e3d466

File tree

5 files changed

+7
-81
lines changed

5 files changed

+7
-81
lines changed

Cargo.lock

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

sdk-libs/compressed-token-sdk/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ anchor = ["light-compressed-account/anchor"]
2525

2626
[dependencies]
2727
light-compressed-account = { workspace = true, features = ["anchor"] }
28+
light-compressed-token = { workspace = true }
2829
solana-program = { workspace = true }
2930
anchor-lang = { workspace = true }
3031
num-bigint = { workspace = true }

sdk-libs/compressed-token-sdk/src/cpi/instruction.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1+
use crate::cpi::accounts::CompressedTokenDecompressCpiAccounts;
12
#[cfg(feature = "anchor")]
23
use anchor_lang::AnchorSerialize;
34
#[cfg(not(feature = "anchor"))]
45
use borsh::BorshSerialize as AnchorSerialize;
56
use light_compressed_account::instruction_data::{
67
compressed_proof::CompressedProof, cpi_context::CompressedCpiContext,
78
};
9+
use light_compressed_token::process_transfer::CompressedTokenInstructionDataTransfer;
810
use solana_program::{
911
instruction::{AccountMeta, Instruction},
1012
program_error::ProgramError,
1113
pubkey::Pubkey,
1214
};
1315

14-
use crate::{
15-
cpi::accounts::CompressedTokenDecompressCpiAccounts,
16-
state::{CompressedTokenInstructionDataTransfer, InputTokenDataWithContext},
17-
};
18-
1916
/// Return Instruction to decompress compressed token accounts.
2017
/// Proof can be None if prove_by_index is used.
2118
pub fn decompress(
@@ -75,9 +72,12 @@ pub fn decompress_token_instruction_data(
7572
compress_or_decompress_amount: Some(amount),
7673
cpi_context: cpi_context.copied(),
7774
lamports_change_account_merkle_tree_index: None,
75+
with_transaction_hash: false,
7876
};
7977

8078
let mut inputs = Vec::new();
79+
// transfer discriminator
80+
inputs.extend_from_slice(&[163, 52, 200, 231, 140, 3, 69, 186]);
8181

8282
compressed_token_instruction_data_transfer
8383
.serialize(&mut inputs)
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
pub mod cpi;
2-
pub mod state;

sdk-libs/compressed-token-sdk/src/state.rs

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

0 commit comments

Comments
 (0)