oil_mint_api/
consts.rs

1use solana_program::pubkey::{pubkey, Pubkey};
2
3/// The decimal precision of the OIL token.
4/// There are 100 billion indivisible units per OIL (called "grams").
5pub const TOKEN_DECIMALS: u8 = 11;
6
7/// One OIL token, denominated in indivisible units.
8pub const ONE_OIL: u64 = 10u64.pow(TOKEN_DECIMALS as u32);
9
10/// The maximum amount of OIL tokens that can be minted per request.
11pub const MAX_MINT_AMOUNT: u64 = ONE_OIL * 200_000;
12
13/// The number of slots required between mint requests.
14/// 
15/// DEPRECATED: This restriction has been removed to support the dual-mode system.
16/// - Block-based mining: Mints once per round (naturally spaced minutes apart)
17/// - Auction-based mining: Users can claim as OIL accumulates, requiring more frequent mints
18/// Protection is now provided by MAX_MINT_AMOUNT, MAX_SUPPLY, and protocol-controlled minting.
19/// This constant is kept for backward compatibility but is no longer enforced.
20pub const MIN_SLOTS_BETWEEN_MINT: u64 = 50;
21
22/// The maximum token supply (21 million).
23/// Mirrors Bitcoin's 21M supply, representing a Solana-native store of value.
24pub const MAX_SUPPLY: u64 = ONE_OIL * 21_000_000;
25
26/// The seed of the automation account PDA.
27pub const AUTHORITY: &[u8] = b"authority";
28
29/// The address of the mint account.
30pub const MINT_ADDRESS: Pubkey = pubkey!("oiLTuhTJc9qRDr2FcMiCUBJ3BCunNXP1LGJCG7svBSy");
31
32/// The treasury address allowed to request a mint.
33pub const TREASURY_ADDRESS: Pubkey = pubkey!("2teUDtjWbZWTxtbFZXNKtWfvxDLRiXoyFuUoEC7wmwn5");