spl, tests: Use feature flag for dex (#985)

This commit is contained in:
Armani Ferrante 2021-11-11 14:12:50 +00:00 committed by GitHub
parent ac3fbe8d38
commit 62fcd75401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 11 deletions

1
Cargo.lock generated
View File

@ -214,7 +214,6 @@ name = "anchor-spl"
version = "0.18.0"
dependencies = [
"anchor-lang",
"lazy_static",
"serum_dex",
"solana-program",
"spl-associated-token-account",

View File

@ -14,10 +14,11 @@ associated_token = []
governance = []
shmem = []
devnet = []
dex = ["serum_dex"]
[dependencies]
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"
spl-token = { version = "3.1.1", features = ["no-entrypoint"] }
spl-associated-token-account = { version = "1.0.3", features = ["no-entrypoint"] }

View File

@ -7,7 +7,7 @@ pub mod mint;
#[cfg(feature = "token")]
pub mod token;
#[cfg(feature = "serum_dex")]
#[cfg(feature = "dex")]
pub mod dex;
#[cfg(feature = "governance")]

@ -1 +1 @@
Subproject commit 0382f2e27db5f95d09aec5e6df7bb01bfc8f0e7f
Subproject commit 8628dc7edbccafc49e75c21977a2abdde10b0898

View File

@ -16,5 +16,5 @@ default = []
[dependencies]
anchor-lang = { path = "../../../../lang" }
anchor-spl = { path = "../../../../spl" }
anchor-spl = { path = "../../../../spl", features = ["dex"] }
solana-program = "1.8.0"

View File

@ -16,7 +16,6 @@ default = []
[dependencies]
anchor-lang = { path = "../../../../lang" }
anchor-spl = { path = "../../../../spl" }
serum_dex = { path = "../../deps/serum-dex/dex", features = ["no-entrypoint"] }
anchor-spl = { path = "../../../../spl", features = ["dex"] }
solana-program = "1.8.0"
spl-token = { version = "3.1.1", features = ["no-entrypoint"] }

View File

@ -2,9 +2,9 @@
use anchor_lang::prelude::*;
use anchor_spl::dex;
use serum_dex::instruction::MarketInstruction;
use serum_dex::matching::Side;
use serum_dex::state::OpenOrders;
use anchor_spl::dex::serum_dex::instruction::MarketInstruction;
use anchor_spl::dex::serum_dex::matching::Side;
use anchor_spl::dex::serum_dex::state::OpenOrders;
use solana_program::instruction::Instruction;
use solana_program::system_program;
use solana_program::sysvar::rent;

View File

@ -16,4 +16,4 @@ default = []
[dependencies]
anchor-lang = { path = "../../../../lang" }
anchor-spl = { path = "../../../../spl" }
anchor-spl = { path = "../../../../spl", features = ["dex"] }