ore_legacy_api/
consts.rs

1use const_crypto::ed25519;
2use solana_program::{pubkey, pubkey::Pubkey};
3
4/// The seed of the board account PDA.
5pub const PROOF: &[u8] = b"proof";
6
7/// The seed of the share account PDA.
8pub const SHARE: &[u8] = b"share";
9
10/// The seed of the config account PDA.
11pub const CONFIG: &[u8] = b"config";
12
13/// The seed of the member account PDA.
14pub const MEMBER: &[u8] = b"member";
15
16/// The seed of the boost account PDA.
17pub const BOOST: &[u8] = b"boost";
18
19/// The seed of the stake account PDA.
20pub const STAKE: &[u8] = b"stake";
21
22/// The address of the legacy ORE pool program.
23pub const POOL_PROGRAM_ID: Pubkey = pubkey!("poo1sKMYsZtDDS7og73L68etJQYyn6KXhXTLz1hizJc");
24
25/// The address of the legacy ORE program.
26pub const ORE_V2_PROGRAM_ID: Pubkey = pubkey!("oreV2ZymfyeXgNgBdqMkumTqqAprVqgBWQfoYkrtKWQ");
27
28/// The address of the pool program.
29pub const BOOST_V1_PROGRAM_ID: Pubkey = pubkey!("boostmPwypNUQu8qZ8RoWt5DXyYSVYxnBXqbbrGjecc");
30
31/// The address of the boost program.
32pub const BOOST_V2_PROGRAM_ID: Pubkey = pubkey!("BoostzzkNfCA9D1qNuN5xZxB5ErbK4zQuBeTHGDpXT1");
33
34/// The address of the ORE mint.
35pub const MINT_ADDRESS: Pubkey = pubkey!("oreoU2P8bN6jkk3jbaiVxYnG1dCXcYxwhwyK9jSybcp");
36
37/// The seed of the treasury account PDA.
38pub const TREASURY: &[u8] = b"treasury";
39
40/// The address of the treasury account.
41pub const ORE_V2_TREASURY_ADDRESS: Pubkey = Pubkey::new_from_array(
42    ed25519::derive_program_address(&[TREASURY], &ORE_V2_PROGRAM_ID.to_bytes()).0,
43);
44
45/// The bump of the treasury account, for cpis.
46pub const ORE_V2_TREASURY_BUMP: u8 =
47    ed25519::derive_program_address(&[TREASURY], &ORE_V2_PROGRAM_ID.to_bytes()).1;
48
49/// The address of the treasury token account.
50pub const ORE_V2_TREASURY_TOKENS_ADDRESS: Pubkey = Pubkey::new_from_array(
51    ed25519::derive_program_address(
52        &[
53            unsafe { &*(&ORE_V2_TREASURY_ADDRESS as *const Pubkey as *const [u8; 32]) },
54            unsafe { &*(&spl_token::id() as *const Pubkey as *const [u8; 32]) },
55            unsafe { &*(&MINT_ADDRESS as *const Pubkey as *const [u8; 32]) },
56        ],
57        unsafe { &*(&spl_associated_token_account::id() as *const Pubkey as *const [u8; 32]) },
58    )
59    .0,
60);