switchboard_on_demand/
program_id.rs1#[allow(unused_imports)]
2use std::str::FromStr;
3
4use crate::solana_compat::solana_program::pubkey::pubkey;
5use crate::Pubkey;
6
7pub const SWITCHBOARD_PROGRAM_ID: Pubkey = pubkey!("SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f");
10
11pub const ON_DEMAND_MAINNET_PID: Pubkey = pubkey!("SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv");
13pub const ON_DEMAND_DEVNET_PID: Pubkey = pubkey!("Aio4gaXjXzJNVLtzwtNVmSqGKpANtXhybbkhtAC94ji2");
15
16pub const QUOTE_PROGRAM_ID: Pubkey = pubkey!("orac1eFjzWL5R3RbbdMV68K9H6TaCVVcL6LjvQQWAbz");
17
18pub fn get_switchboard_on_demand_program_id() -> Pubkey {
20 if crate::utils::is_devnet() {
21 ON_DEMAND_DEVNET_PID
22 } else {
23 ON_DEMAND_MAINNET_PID
24 }
25}
26
27pub fn get_sb_program_id(cluster: &str) -> Pubkey {
29 if !cluster.starts_with("mainnet") {
30 ON_DEMAND_DEVNET_PID
31 } else {
32 ON_DEMAND_MAINNET_PID
33 }
34}