use solana_program::{pubkey, pubkey::Pubkey};

/// Authority for `Initialize`. Replace with your deploy multisig before mainnet.
pub const ADMIN_ADDRESS: Pubkey = pubkey!("6asgn8Vq8KKSQx4wm5zVfEfB76wqGVpEpWxajGkbQ8yr");

/// Signs executor-gated instructions: `AdminPayout`. Replace before production.
pub const EXECUTOR_ADDRESS: Pubkey =
    pubkey!("3B1WXgrV68V6ayymC7C8eVoCMeqeJLR7HWXkxfQxLUeF");

/// Basis points denominator (100%).
pub const MAX_BPS: u16 = 10_000;

/// PDA seed for the `Treasury` account.
pub const TREASURY: &[u8] = b"treasury";

/// PDA seed for `UserTicket` accounts.
/// Full seeds: [USER_TICKET, user_pubkey, series_id_le2, period_le8]
pub const USER_TICKET: &[u8] = b"ticket";

/// Ticket revenue split to daily pool (BPS).
pub const TICKET_DAILY_BPS: u16 = 7000;

/// Ticket revenue split to weekly pool (BPS).
pub const TICKET_WEEKLY_BPS: u16 = 1500;

/// Ticket revenue split to buyback reserve (BPS).
pub const TICKET_BUYBACK_BPS: u16 = 1000;

/// Ticket revenue split to team (BPS).
pub const TICKET_TEAM_BPS: u16 = 500;

/// SPL USDC recipient for team-fee legs.
pub const FEE_COLLECTOR: Pubkey = pubkey!("FEeB92JDVmVuuoaoTjKyfDPPrLTWPGg2EJTrY3TmTx3T");

/// SPL USDC mint.
/// Devnet:  GAmHPNMcgh9BTpe3DWirqMwvYCeDskE2im6fUhZyukJp  (custom devnet USDC)
/// Mainnet: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v  (Circle mainnet)
pub const USDC_MAINNET_MINT: Pubkey = pubkey!("GAmHPNMcgh9BTpe3DWirqMwvYCeDskE2im6fUhZyukJp");

/// Duration of each 5-minute market bucket in seconds.
/// `open_ts = period * MARKET_BUCKET_SECS`, `close_ts = open_ts + MARKET_BUCKET_SECS`.
pub const MARKET_BUCKET_SECS: i64 = 300;

/// Fixed cost to place one bet, in µUSDC (6 decimals).
/// 1 ticket = 1 USDC. `User.balance` must be ≥ this before calling `PlaceBet`.
pub const TICKET_PRICE_MICROS: u64 = 1_000_000;
