coal_guilds_api/
consts.rs

1
2use const_crypto::ed25519;
3use solana_program::{pubkey, pubkey::Pubkey};
4
5/// The authority allowed to initialize the program.
6pub const INITIALIZER_ADDRESS: Pubkey = pubkey!("FJka1yJHn1SWux2X1o8VqHC8uaAWGv6CbNQvPWLJQufq");
7
8/// The seed of the config PDA.
9pub const CONFIG: &[u8] = b"config";
10
11/// The seed of the guild PDA.
12pub const GUILD: &[u8] = b"guild";
13
14/// The seed of the invite PDA.
15pub const INVITE: &[u8] = b"invite";
16
17/// The seed of the member PDA.
18pub const MEMBER: &[u8] = b"member";
19
20/// Program ID for const pda derivations
21const PROGRAM_ID: [u8; 32] = unsafe { *(&crate::id() as *const Pubkey as *const [u8; 32]) };
22
23/// The address of the config account.
24pub const CONFIG_ADDRESS: Pubkey =
25    Pubkey::new_from_array(ed25519::derive_program_address(&[CONFIG], &PROGRAM_ID).0);
26
27pub const LP_MINT_ADDRESS: Pubkey = pubkey!("AtDMJwa4j5w2nKTnzWrxkHHwqfsEvLniErVDcgNNeSft");
28pub const LP_MINT_DECIMALS: u8 = 11;
29
30pub const UNSTAKE_DELAY: i64 = 60 * 60; // 1 hour
31
32pub const LEAVE_DELAY: i64 = 60 * 60; // 1 hour