Skip to content

Commit ffe591b

Browse files
cleanup anchor-derived example
1 parent 2de8a5c commit ffe591b

File tree

1 file changed

+3
-7
lines changed
  • program-tests/anchor-compressible-user-derived/src

1 file changed

+3
-7
lines changed

program-tests/anchor-compressible-user-derived/src/lib.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ use light_sdk_macros::add_compressible_instructions;
77
use light_sdk_types::CpiSigner;
88

99
declare_id!("CompUser11111111111111111111111111111111111");
10-
// pub const ADDRESS_SPACE: Pubkey = pubkey!("CLEuMG7pzJX9xAuKCFzBP154uiG1GaNo4Fq7x6KAcAfG");
11-
// pub const RENT_RECIPIENT: Pubkey = pubkey!("CLEuMG7pzJX9xAuKCFzBP154uiG1GaNo4Fq7x6KAcAfG");
12-
pub const COMPRESSION_DELAY: u32 = 100;
10+
1311
pub const LIGHT_CPI_SIGNER: CpiSigner =
1412
derive_light_cpi_signer!("GRLu2hKaAiMbxpkAM1HeXzks9YeGuz18SEgXEizVvPqX");
1513

@@ -26,8 +24,6 @@ pub mod anchor_compressible_user_derived {
2624
// - decompress_multiple_pdas (decompress compressed accounts)
2725
// Plus all the necessary structs and enums
2826
//
29-
// NOTE: create_user_record and create_game_session are NOT generated
30-
// because they typically need custom initialization logic
3127
}
3228

3329
#[derive(Debug, LightHasher, LightDiscriminator, Default, InitSpace)]
@@ -56,15 +52,15 @@ impl HasCompressionInfo for UserRecord {
5652
#[derive(Debug, LightHasher, LightDiscriminator, Default, InitSpace)]
5753
#[account]
5854
pub struct GameSession {
59-
#[skip]
60-
pub compression_info: CompressionInfo,
6155
pub session_id: u64,
6256
#[hash]
6357
pub player: Pubkey,
6458
#[hash]
6559
#[max_len(32)]
6660
pub game_type: String,
6761
pub start_time: u64,
62+
#[skip]
63+
pub compression_info: CompressionInfo,
6864
pub end_time: Option<u64>,
6965
pub score: u64,
7066
}

0 commit comments

Comments
 (0)