1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use crate::*;
use lazy_static::lazy_static;
use solana_program::pubkey::Pubkey;
#[allow(unused_imports)]
use std::str::FromStr;

/// Program id for the Switchboard oracle program
/// SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f
pub const SWITCHBOARD_PROGRAM_ID: Pubkey = pubkey!("SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f");

// Program id for the Switchboard oracle program
// sbattyXrzedoNATfc4L31wC9Mhxsi1BmFhTiN8gDshx
#[cfg(not(feature = "pid_override"))]
lazy_static! {
    pub static ref SWITCHBOARD_ON_DEMAND_PROGRAM_ID: Pubkey =
        pubkey!("SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv");
}
#[cfg(feature = "pid_override")]
lazy_static! {
    pub static ref _DEFAULT_PID: Pubkey =
        Pubkey::from_str("SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv").unwrap();
    pub static ref SWITCHBOARD_ON_DEMAND_PROGRAM_ID: Pubkey =
        Pubkey::from_str(&std::env::var("SWITCHBOARD_ON_DEMAND_PROGRAM_ID").unwrap_or_default())
            .unwrap_or(*_DEFAULT_PID);
}