diff --git a/spl/Cargo.toml b/spl/Cargo.toml index 79569322a..0a4ee5b57 100644 --- a/spl/Cargo.toml +++ b/spl/Cargo.toml @@ -6,6 +6,9 @@ edition = "2018" license = "Apache-2.0" description = "CPI clients for SPL programs" +[features] +devnet = [] + [dependencies] anchor-lang = { path = "../lang", version = "0.5.0", features = ["derive"] } lazy_static = "1.4.0" diff --git a/spl/src/dex.rs b/spl/src/dex.rs index 022299d3c..9a799cf37 100644 --- a/spl/src/dex.rs +++ b/spl/src/dex.rs @@ -7,8 +7,12 @@ use std::num::NonZeroU64; pub use serum_dex; +#[cfg(not(feature = "devnet"))] anchor_lang::solana_program::declare_id!("9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin"); +#[cfg(feature = "devnet")] +anchor_lang::solana_program::declare_id!("DESVgJVGajEgKGXhb6XmqDHGz3VjdgP7rEVESBgxmroY"); + pub fn new_order_v3<'info>( ctx: CpiContext<'_, '_, '_, 'info, NewOrderV3<'info>>, side: Side,