#[allow(unused_imports)]
use std::str::FromStr;
#[cfg(feature = "anchor")]
use anchor_lang::solana_program;
#[cfg(not(feature = "anchor"))]
use crate::solana_program;
use solana_program::pubkey::{pubkey, Pubkey};
pub const SWITCHBOARD_PROGRAM_ID: Pubkey = pubkey!("SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f");
pub const ON_DEMAND_MAINNET_PID: Pubkey = pubkey!("SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv");
pub const ON_DEMAND_DEVNET_PID: Pubkey = pubkey!("Aio4gaXjXzJNVLtzwtNVmSqGKpANtXhybbkhtAC94ji2");
pub const QUOTE_PROGRAM_ID: Pubkey = pubkey!("orac1eFjzWL5R3RbbdMV68K9H6TaCVVcL6LjvQQWAbz");
pub fn get_switchboard_on_demand_program_id() -> Pubkey {
if crate::utils::is_devnet() {
ON_DEMAND_DEVNET_PID
} else {
ON_DEMAND_MAINNET_PID
}
}
pub fn get_sb_program_id(cluster: &str) -> Pubkey {
if !cluster.starts_with("mainnet") {
ON_DEMAND_DEVNET_PID
} else {
ON_DEMAND_MAINNET_PID
}
}