oil-mint-api 0.1.8

API for interacting with the OIL mint program on Solana
Documentation
use solana_program::pubkey::{pubkey, Pubkey};

/// The decimal precision of the OIL token.
/// There are 100 billion indivisible units per OIL (called "grams").
pub const TOKEN_DECIMALS: u8 = 11;

/// One OIL token, denominated in indivisible units.
pub const ONE_OIL: u64 = 10u64.pow(TOKEN_DECIMALS as u32);

/// The maximum amount of OIL tokens that can be minted per request.
pub const MAX_MINT_AMOUNT: u64 = ONE_OIL * 200_000;

/// The number of slots required between mint requests.
/// 
/// DEPRECATED: This restriction has been removed to support the dual-mode system.
/// - Block-based mining: Mints once per round (naturally spaced minutes apart)
/// - Auction-based mining: Users can claim as OIL accumulates, requiring more frequent mints
/// Protection is now provided by MAX_MINT_AMOUNT, MAX_SUPPLY, and protocol-controlled minting.
/// This constant is kept for backward compatibility but is no longer enforced.
pub const MIN_SLOTS_BETWEEN_MINT: u64 = 50;

/// The maximum token supply (21 million).
/// Mirrors Bitcoin's 21M supply, representing a Solana-native store of value.
pub const MAX_SUPPLY: u64 = ONE_OIL * 21_000_000;

/// The seed of the automation account PDA.
pub const AUTHORITY: &[u8] = b"authority";

/// The address of the mint account.
pub const MINT_ADDRESS: Pubkey = pubkey!("oiLTuhTJc9qRDr2FcMiCUBJ3BCunNXP1LGJCG7svBSy");

/// The treasury address allowed to request a mint.
pub const TREASURY_ADDRESS: Pubkey = pubkey!("B69A9cSqHRDn8K42pytvdxJLBH1d7kUVEPkU1XPZqVBa");