ore_api/
consts.rs

1use solana_program::{pubkey, pubkey::Pubkey};
2
3/// The authority allowed to initialize the program.
4pub const ADMIN_ADDRESS: Pubkey = pubkey!("HBUh9g46wk2X89CvaNN15UmsznP59rh6od1h8JwYAopk");
5
6/// The decimal precision of the ORE token.
7/// There are 100 billion indivisible units per ORE (called "grams").
8pub const TOKEN_DECIMALS: u8 = 11;
9
10/// One ORE token, denominated in indivisible units.
11pub const ONE_ORE: u64 = 10u64.pow(TOKEN_DECIMALS as u32);
12
13/// The duration of one minute, in seconds.
14pub const ONE_MINUTE: i64 = 60;
15
16/// The duration of one hour, in seconds.
17pub const ONE_HOUR: i64 = 60 * ONE_MINUTE;
18
19/// The duration of one day, in seconds.
20pub const ONE_DAY: i64 = 24 * ONE_HOUR;
21
22/// The number of seconds for when the winning square expires.
23pub const ONE_WEEK: i64 = 7 * ONE_DAY;
24
25/// The number of slots in one week.
26pub const ONE_MINUTE_SLOTS: u64 = 150;
27
28/// The number of slots in one hour.
29pub const ONE_HOUR_SLOTS: u64 = 60 * ONE_MINUTE_SLOTS;
30
31/// The number of slots in 12 hours.
32pub const TWELVE_HOURS_SLOTS: u64 = 12 * ONE_HOUR_SLOTS;
33
34/// The number of slots in one day.
35pub const ONE_DAY_SLOTS: u64 = 24 * ONE_HOUR_SLOTS;
36
37/// The number of slots in one week.
38pub const ONE_WEEK_SLOTS: u64 = 7 * ONE_DAY_SLOTS;
39
40/// The number of slots for breather between rounds.
41pub const INTERMISSION_SLOTS: u64 = 35;
42
43/// The maximum token supply (5 million).
44pub const MAX_SUPPLY: u64 = ONE_ORE * 5_000_000;
45
46/// The seed of the automation account PDA.
47pub const AUTOMATION: &[u8] = b"automation";
48
49/// The seed of the board account PDA.
50pub const BOARD: &[u8] = b"board";
51
52/// The seed of the config account PDA.
53pub const CONFIG: &[u8] = b"config";
54
55/// The seed of the miner account PDA.
56pub const MINER: &[u8] = b"miner";
57
58/// The seed of the seeker account PDA.
59pub const SEEKER: &[u8] = b"seeker";
60
61/// The seed of the square account PDA.
62pub const SQUARE: &[u8] = b"square";
63
64/// The seed of the stake account PDA.
65pub const STAKE: &[u8] = b"stake";
66
67/// The seed of the round account PDA.
68pub const ROUND: &[u8] = b"round";
69
70/// The seed of the treasury account PDA.
71pub const TREASURY: &[u8] = b"treasury";
72
73/// Program id for const pda derivations
74const PROGRAM_ID: [u8; 32] = unsafe { *(&crate::id() as *const Pubkey as *const [u8; 32]) };
75
76/// The address of the mint account.
77pub const MINT_ADDRESS: Pubkey = pubkey!("oreoU2P8bN6jkk3jbaiVxYnG1dCXcYxwhwyK9jSybcp");
78
79/// The address of the sol mint account.
80pub const SOL_MINT: Pubkey = pubkey!("So11111111111111111111111111111111111111112");
81
82/// The address to indicate ORE rewards are split between all miners.
83pub const SPLIT_ADDRESS: Pubkey = pubkey!("SpLiT11111111111111111111111111111111111112");
84
85/// Denominator for fee calculations.
86pub const DENOMINATOR_BPS: u64 = 10_000;
87
88/// The address of the boost reserve token account.
89pub const BOOST_RESERVE_TOKEN: Pubkey = pubkey!("Gce36ZUsBDJsoLrfCBxUB5Sfq2DsGunofStvxFx6rBiD");
90
91/// The fee paid to bots if they checkpoint a user.
92pub const CHECKPOINT_FEE: u64 = 10_000; // 0.00001 SOL
93
94/// Amount paid to bots per transaction for auto-compounding staking yield, in lamports.
95pub const COMPOUND_FEE_PER_TRANSACTION: u64 = 7_000;
96
97/// The fee paid to the admin for each transaction.
98pub const ADMIN_FEE: u64 = 100; // 1%
99
100/// The address to receive the admin fee.
101pub const ADMIN_FEE_COLLECTOR: Pubkey = pubkey!("DyB4Kv6V613gp2LWQTq1dwDYHGKuUEoDHnCouGUtxFiX");
102
103/// The swap program used for buybacks.
104pub const SWAP_PROGRAM: Pubkey = pubkey!("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4");
105
106/// The address of the var account.
107pub const VAR_ADDRESS: Pubkey = pubkey!("BWCaDY96Xe4WkFq1M7UiCCRcChsJ3p51L5KrGzhxgm2E");
108
109/// The address which can call the bury and wrap instructions.
110pub const BURY_AUTHORITY: Pubkey = pubkey!("HNWhK5f8RMWBqcA7mXJPaxdTPGrha3rrqUrri7HSKb3T");