spl, tests: Use feature flag for dex (#985)
This commit is contained in:
parent
ac3fbe8d38
commit
62fcd75401
|
@ -214,7 +214,6 @@ name = "anchor-spl"
|
||||||
version = "0.18.0"
|
version = "0.18.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anchor-lang",
|
"anchor-lang",
|
||||||
"lazy_static",
|
|
||||||
"serum_dex",
|
"serum_dex",
|
||||||
"solana-program",
|
"solana-program",
|
||||||
"spl-associated-token-account",
|
"spl-associated-token-account",
|
||||||
|
|
|
@ -14,10 +14,11 @@ associated_token = []
|
||||||
governance = []
|
governance = []
|
||||||
shmem = []
|
shmem = []
|
||||||
devnet = []
|
devnet = []
|
||||||
|
dex = ["serum_dex"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anchor-lang = { path = "../lang", version = "0.18.0", features = ["derive"] }
|
anchor-lang = { path = "../lang", version = "0.18.0", features = ["derive"] }
|
||||||
serum_dex = { git = "https://github.com/project-serum/serum-dex", rev = "1be91f2", version = "0.4.0", features = ["no-entrypoint"], optional = true}
|
serum_dex = { git = "https://github.com/project-serum/serum-dex", rev = "1be91f2", version = "0.4.0", features = ["no-entrypoint"], optional = true }
|
||||||
solana-program = "1.8.0"
|
solana-program = "1.8.0"
|
||||||
spl-token = { version = "3.1.1", features = ["no-entrypoint"] }
|
spl-token = { version = "3.1.1", features = ["no-entrypoint"] }
|
||||||
spl-associated-token-account = { version = "1.0.3", features = ["no-entrypoint"] }
|
spl-associated-token-account = { version = "1.0.3", features = ["no-entrypoint"] }
|
||||||
|
|
|
@ -7,7 +7,7 @@ pub mod mint;
|
||||||
#[cfg(feature = "token")]
|
#[cfg(feature = "token")]
|
||||||
pub mod token;
|
pub mod token;
|
||||||
|
|
||||||
#[cfg(feature = "serum_dex")]
|
#[cfg(feature = "dex")]
|
||||||
pub mod dex;
|
pub mod dex;
|
||||||
|
|
||||||
#[cfg(feature = "governance")]
|
#[cfg(feature = "governance")]
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0382f2e27db5f95d09aec5e6df7bb01bfc8f0e7f
|
Subproject commit 8628dc7edbccafc49e75c21977a2abdde10b0898
|
|
@ -16,5 +16,5 @@ default = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anchor-lang = { path = "../../../../lang" }
|
anchor-lang = { path = "../../../../lang" }
|
||||||
anchor-spl = { path = "../../../../spl" }
|
anchor-spl = { path = "../../../../spl", features = ["dex"] }
|
||||||
solana-program = "1.8.0"
|
solana-program = "1.8.0"
|
||||||
|
|
|
@ -16,7 +16,6 @@ default = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anchor-lang = { path = "../../../../lang" }
|
anchor-lang = { path = "../../../../lang" }
|
||||||
anchor-spl = { path = "../../../../spl" }
|
anchor-spl = { path = "../../../../spl", features = ["dex"] }
|
||||||
serum_dex = { path = "../../deps/serum-dex/dex", features = ["no-entrypoint"] }
|
|
||||||
solana-program = "1.8.0"
|
solana-program = "1.8.0"
|
||||||
spl-token = { version = "3.1.1", features = ["no-entrypoint"] }
|
spl-token = { version = "3.1.1", features = ["no-entrypoint"] }
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
use anchor_lang::prelude::*;
|
use anchor_lang::prelude::*;
|
||||||
use anchor_spl::dex;
|
use anchor_spl::dex;
|
||||||
use serum_dex::instruction::MarketInstruction;
|
use anchor_spl::dex::serum_dex::instruction::MarketInstruction;
|
||||||
use serum_dex::matching::Side;
|
use anchor_spl::dex::serum_dex::matching::Side;
|
||||||
use serum_dex::state::OpenOrders;
|
use anchor_spl::dex::serum_dex::state::OpenOrders;
|
||||||
use solana_program::instruction::Instruction;
|
use solana_program::instruction::Instruction;
|
||||||
use solana_program::system_program;
|
use solana_program::system_program;
|
||||||
use solana_program::sysvar::rent;
|
use solana_program::sysvar::rent;
|
||||||
|
|
|
@ -16,4 +16,4 @@ default = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anchor-lang = { path = "../../../../lang" }
|
anchor-lang = { path = "../../../../lang" }
|
||||||
anchor-spl = { path = "../../../../spl" }
|
anchor-spl = { path = "../../../../spl", features = ["dex"] }
|
||||||
|
|
Loading…
Reference in New Issue