diff --git a/Cargo.lock b/Cargo.lock index e79b0609..5a1ca805 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -854,8 +854,8 @@ dependencies = [ [[package]] name = "drift" -version = "2.97.0" -source = "git+https://github.com/drift-labs/protocol-v2.git?rev=v2.97.0#a3bd10955ce9255292970454f353fb4523367822" +version = "2.103.0" +source = "git+https://github.com/drift-labs/protocol-v2.git?rev=v2.103.0#63c72dad6e1aa7c9b121560a516b434b091c3295" dependencies = [ "ahash 0.8.6", "anchor-lang", @@ -867,6 +867,7 @@ dependencies = [ "byteorder", "drift-macros", "enumflags2", + "hex", "num-derive 0.3.3", "num-integer", "num-traits", @@ -1541,7 +1542,7 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openbook-v2-light" version = "0.1.0" -source = "git+https://github.com/drift-labs/protocol-v2.git?rev=v2.97.0#a3bd10955ce9255292970454f353fb4523367822" +source = "git+https://github.com/drift-labs/protocol-v2.git?rev=v2.103.0#63c72dad6e1aa7c9b121560a516b434b091c3295" dependencies = [ "anchor-lang", "borsh 0.10.3", @@ -2563,7 +2564,7 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "switchboard" version = "0.1.0" -source = "git+https://github.com/drift-labs/protocol-v2.git?rev=v2.97.0#a3bd10955ce9255292970454f353fb4523367822" +source = "git+https://github.com/drift-labs/protocol-v2.git?rev=v2.103.0#63c72dad6e1aa7c9b121560a516b434b091c3295" dependencies = [ "anchor-lang", ] @@ -2571,7 +2572,7 @@ dependencies = [ [[package]] name = "switchboard-on-demand" version = "0.1.0" -source = "git+https://github.com/drift-labs/protocol-v2.git?rev=v2.97.0#a3bd10955ce9255292970454f353fb4523367822" +source = "git+https://github.com/drift-labs/protocol-v2.git?rev=v2.103.0#63c72dad6e1aa7c9b121560a516b434b091c3295" dependencies = [ "anchor-lang", "bytemuck", diff --git a/programs/jit-proxy/Cargo.toml b/programs/jit-proxy/Cargo.toml index 4221841f..6ca5d06c 100644 --- a/programs/jit-proxy/Cargo.toml +++ b/programs/jit-proxy/Cargo.toml @@ -17,6 +17,6 @@ default = [] anchor-lang = "0.29.0" anchor-spl = "0.29.0" bytemuck = { version = "1.4.0" } -drift = { git = "https://github.com/drift-labs/protocol-v2.git", rev = "v2.97.0", features = ["cpi", "mainnet-beta"]} +drift = { git = "https://github.com/drift-labs/protocol-v2.git", rev = "v2.103.0", features = ["cpi", "mainnet-beta"]} static_assertions = "1.1.0" ahash = "=0.8.6" diff --git a/programs/jit-proxy/src/instructions/arb_perp.rs b/programs/jit-proxy/src/instructions/arb_perp.rs index 7ab97b25..079ae85d 100644 --- a/programs/jit-proxy/src/instructions/arb_perp.rs +++ b/programs/jit-proxy/src/instructions/arb_perp.rs @@ -54,7 +54,7 @@ pub fn arb_perp<'c: 'info, 'info>( let (makers, _) = load_user_maps(remaining_accounts_iter, true)?; let perp_market = perp_market_map.get_ref(&market_index)?; - let oracle_price_data = oracle_map.get_price_data(&perp_market.amm.oracle)?; + let oracle_price_data = oracle_map.get_price_data(&perp_market.oracle_id())?; let (bids, asks) = find_bids_and_asks_from_users(&perp_market, oracle_price_data, &makers, slot, now)?; diff --git a/programs/jit-proxy/src/instructions/check_order_constraints.rs b/programs/jit-proxy/src/instructions/check_order_constraints.rs index 23a376dc..00f1a141 100644 --- a/programs/jit-proxy/src/instructions/check_order_constraints.rs +++ b/programs/jit-proxy/src/instructions/check_order_constraints.rs @@ -54,7 +54,7 @@ pub fn check_order_constraints<'c: 'info, 'info>( Err(_) => continue, }; - let oracle_price = oracle_map.get_price_data(&perp_market.amm.oracle)?.price; + let oracle_price = oracle_map.get_price_data(&perp_market.oracle_id())?.price; let settled_perp_position = perp_position.simulate_settled_lp_position(&perp_market, oracle_price)?; diff --git a/programs/jit-proxy/src/instructions/jit.rs b/programs/jit-proxy/src/instructions/jit.rs index 5ac28afb..631064d2 100644 --- a/programs/jit-proxy/src/instructions/jit.rs +++ b/programs/jit-proxy/src/instructions/jit.rs @@ -68,7 +68,7 @@ pub fn jit<'c: 'info, 'info>( let (oracle_price, tick_size, min_order_size, is_prediction_market) = if market_type == DriftMarketType::Perp { let perp_market = perp_market_map.get_ref(&market_index)?; - let oracle_price = oracle_map.get_price_data(&perp_market.amm.oracle)?.price; + let oracle_price = oracle_map.get_price_data(&perp_market.oracle_id())?.price; ( oracle_price, @@ -78,7 +78,7 @@ pub fn jit<'c: 'info, 'info>( ) } else { let spot_market = spot_market_map.get_ref(&market_index)?; - let oracle_price = oracle_map.get_price_data(&spot_market.oracle)?.price; + let oracle_price = oracle_map.get_price_data(&spot_market.oracle_id())?.price; ( oracle_price,