Skip to content

Commit 31da74b

Browse files
wip
1 parent d587b8c commit 31da74b

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
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.

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@ light-batched-merkle-tree = { workspace = true }
3030
light-ctoken-types = { workspace = true, features = ["anchor"] }
3131

3232
[dev-dependencies]
33-
light-program-test = { workspace = true, features = ["devenv"] }
33+
light-program-test = { workspace = true, features = ["v2"] }
34+
light-prover-client = { workspace = true }
3435
light-test-utils = { workspace = true }
3536
tokio = { workspace = true }
3637
serial_test = { workspace = true }
3738
solana-sdk = { workspace = true }
3839
anchor-spl = { workspace = true }
3940
light-sdk = { workspace = true }
4041
light-compressed-account = { workspace = true, features = ["anchor"] }
41-
light-client = { workspace = true, features = ["devenv"] }
42+
light-client = { workspace = true, features = ["v2"] }
4243
light-token-client = { workspace = true }
4344

4445
[lints.rust.unexpected_cfgs]

program-tests/sdk-token-test/tests/pda_ctoken.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ use light_ctoken_types::{
2020
},
2121
state::extensions::{AdditionalMetadata, Metadata},
2222
COMPRESSED_TOKEN_PROGRAM_ID,
23-
};
23+
};ompressed mint created
2424
use light_program_test::{LightProgramTest, ProgramTestConfig, Rpc, RpcError};
2525

2626
use anchor_lang::solana_program::program_pack::Pack;
2727
use anchor_spl::token_interface::spl_token_2022;
2828
use light_compressed_account::{address::derive_address, hash_to_bn254_field_size_be};
29+
use light_prover_client::prover::{ProverConfig, ProverMode};
2930
use light_sdk::instruction::{PackedAccounts, SystemAccountMetaConfig};
3031
use sdk_token_test::{
3132
ID, {ChainedCtokenInstructionData, PdaCreationData},
@@ -38,7 +39,11 @@ use solana_sdk::{
3839
#[tokio::test]
3940
async fn test_pda_ctoken() {
4041
// Initialize test environment
41-
let config = ProgramTestConfig::new_v2(false, Some(vec![("sdk_token_test", ID)]));
42+
let mut config = ProgramTestConfig::new_v2(true, Some(vec![("sdk_token_test", ID)]));
43+
config.prover_config = Some(ProverConfig {
44+
run_mode: Some(ProverMode::Rpc),
45+
circuits: vec![],
46+
});
4247
let mut rpc = LightProgramTest::new(config).await.unwrap();
4348
let payer = rpc.get_payer().insecure_clone();
4449

sdk-tests/anchor-compressible/src/lib.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ use light_ctoken_types::{
1414
COMPRESSED_MINT_SEED,
1515
};
1616
use light_sdk_types::{
17-
constants::{
18-
ACCOUNT_COMPRESSION_PROGRAM_ID, C_TOKEN_PROGRAM_ID, LIGHT_SYSTEM_PROGRAM_ID,
19-
NOOP_PROGRAM_ID,
20-
},
17+
constants::{ACCOUNT_COMPRESSION_PROGRAM_ID, C_TOKEN_PROGRAM_ID, LIGHT_SYSTEM_PROGRAM_ID},
2118
CpiAccountsConfig, CpiAccountsSmall,
2219
};
2320

@@ -524,7 +521,7 @@ pub mod anchor_compressible {
524521
let mut mint_account_infos = vec![
525522
ctx.accounts.mint_signer.to_account_info(),
526523
ctx.accounts.user.to_account_info(), // payer
527-
cpi_accounts.cpi_authority_pda().unwrap().to_account_info(),
524+
// cpi_accounts.cpi_authority_pda().unwrap().to_account_info(),
528525
cpi_accounts.system_program().unwrap().to_account_info(),
529526
cpi_accounts
530527
.account_compression_program()
@@ -534,7 +531,7 @@ pub mod anchor_compressible {
534531
.registered_program_pda()
535532
.unwrap()
536533
.to_account_info(),
537-
ctx.accounts.noop_program.to_account_info(),
534+
// ctx.accounts.noop_program.to_account_info(),
538535
cpi_accounts
539536
.account_compression_authority()
540537
.unwrap()

0 commit comments

Comments
 (0)