forge_api/
consts.rs

1use const_crypto::ed25519;
2use solana_program::{pubkey, pubkey::Pubkey};
3
4/// The decimal precision of the COAL token.
5/// There are 100 billion indivisible units per COAL (called "grains").
6pub const TOKEN_DECIMALS: u8 = 11;
7
8/// One COAL, INGOT, ORE, WOOD, CHROMIUM all have 11 decimals
9pub const ONE_TOKEN: u64 = 10u64.pow(TOKEN_DECIMALS as u32);
10
11/// The authority allowed to initialize the program.
12pub const INITIALIZER_ADDRESS: Pubkey = pubkey!("FJka1yJHn1SWux2X1o8VqHC8uaAWGv6CbNQvPWLJQufq");
13
14/// Program id for const pda derivations
15const PROGRAM_ID: [u8; 32] = unsafe { *(&crate::id() as *const Pubkey as *const [u8; 32]) };
16
17pub const COAL_PROGRAM_ID: Pubkey = pubkey!("EG67mGGTxMGuPxDLWeccczVecycmpj2SokzpWeBoGVTf");
18pub const COAL_PROGRAM_ID_BYTES: [u8; 32] = unsafe { *(&COAL_PROGRAM_ID as *const Pubkey as *const [u8; 32]) };
19
20pub const COAL_UPDATE_AUTHORITY_SEED: &[u8] = b"update_authority";
21pub const COAL_UPDATE_AUTHORITY: Pubkey = Pubkey::new_from_array(ed25519::derive_program_address(&[COAL_UPDATE_AUTHORITY_SEED], &COAL_PROGRAM_ID_BYTES).0);
22
23pub const ROYALTIES_BASIS_POINTS: u16 = 400;
24pub const ROYALTY_CREATOR_ADDRESS: Pubkey = pubkey!("B7yXtWpKXfwLDGyHLvab7ypZemajAbR2Kvbn2ogNs8J9");
25
26pub const COLLECTION: Pubkey = pubkey!("CuaLHUJA1dyQ6AYcTcMZrCoBqssSJbqkY7VfEEFdxzCk");
27pub const COLLECTION_AUTHORITY_SEED: &[u8] = b"collection_authority";
28pub const COLLECTION_AUTHORITY_ADDRESS: Pubkey = Pubkey::new_from_array(ed25519::derive_program_address(&[COLLECTION_AUTHORITY_SEED], &PROGRAM_ID).0);
29
30pub const CONFIG_SEED: &[u8] = b"config";
31pub const ENHANCER_SEED: &[u8] = b"enhancer";
32
33/// Mints
34pub const COAL_MINT_ADDRESS: Pubkey = pubkey!("E3yUqBNTZxV8ELvW99oRLC7z4ddbJqqR4NphwrMug9zu");
35pub const INGOT_MINT_ADDEESS: Pubkey = pubkey!("7W6R9rG1kfadLBUWw4mAj9eRCmARtzkbttKVdawVx15V");
36pub const WOOD_MINT_ADDRESS: Pubkey = pubkey!("Hrd2en37VJaDspWFq6miK8w6xTuQRTHNaD2e3tqH2uxr");
37pub const CHROMIUM_MINT_ADDRESS: Pubkey = pubkey!("Fjgy35F41gm1GNAFKZ5djKo7LMeUoSzFcMK2xC3BfbG8");
38
39pub const TREASURY: &[u8] = b"treasury";
40
41/// The address of the treasury account.
42pub const TREASURY_ADDRESS: Pubkey =
43    Pubkey::new_from_array(ed25519::derive_program_address(&[TREASURY], &PROGRAM_ID).0);
44
45/// The bump of the treasury account, for cpis.
46pub const TREASURY_BUMP: u8 = ed25519::derive_program_address(&[TREASURY], &PROGRAM_ID).1;
47
48pub const ENHANCER_TARGET_SLOT: u64 = 20;
49pub const ENHANCE_SLOT_BUFFER: u64 = 6;
50pub const ENHANCE_MIN_MULTIPLIER: u64 = 320;
51pub const ENHANCE_MAX_MULTIPLIER: u64 = 600;