enable invariant dex

This commit is contained in:
Godmode Galactus 2024-11-06 17:23:54 +01:00
parent 465a601600
commit f96de69736
No known key found for this signature in database
GPG Key ID: A6B75566742EA987
4 changed files with 13 additions and 0 deletions

1
Cargo.lock generated
View File

@ -718,6 +718,7 @@ dependencies = [
"chrono",
"clap 3.2.25",
"dex-infinity",
"dex-invariant",
"dex-openbook-v2",
"dex-orca",
"dex-raydium",

View File

@ -72,12 +72,15 @@ lazy_static = "1.5.0"
hdrhistogram = "7.5.4"
indexmap = "2.0.0"
router-lib = { path = "../../lib/router-lib/", version = "0.0.1" }
dex-orca = { path = "../../lib/dex-orca/", version = "0.0.1" }
dex-raydium-cp = { path = "../../lib/dex-raydium-cp/", version = "0.0.1" }
dex-raydium = { path = "../../lib/dex-raydium/", version = "0.0.1" }
dex-saber = { path = "../../lib/dex-saber/", version = "0.0.1" }
dex-infinity = { path = "../../lib/dex-infinity/", version = "0.0.1" }
dex-openbook-v2 = { path = "../../lib/dex-openbook-v2/", version = "0.0.1" }
dex-invariant = { path = "../../lib/dex-invariant", version = "0.0.1" }
router-config-lib = { path = "../../lib/router-config-lib" }
router-feed-lib = { path = "../../lib/router-feed-lib" }
spl-associated-token-account = { version = "1.0.5",features = ["no-entrypoint"] }

View File

@ -298,6 +298,14 @@ async fn main() -> anyhow::Result<()> {
true,
&vec![]
),
dex::generic::build_dex!(
dex_invariant::InvariantDex::initialize(&mut router_rpc, HashMap::new()).await?,
&mango_data,
config.invariant.enabled,
config.invariant.take_all_mints,
config.invariant.add_mango_tokens,
&config.invariant.mints
)
]
.into_iter()
.flatten()

View File

@ -41,6 +41,7 @@ pub struct Config {
pub raydium_cp: DexConfig,
pub raydium: DexConfig,
pub saber: DexConfig,
pub invariant: DexConfig,
pub infinity: InfinityConfig,
pub safety_checks: Option<SafetyCheckConfig>,
pub hot_mints: Option<HotMintsConfig>,