Skip to content

Commit

Permalink
update drift to v2.103.0
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Dec 6, 2024
1 parent eb64a9a commit d4771c6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
11 changes: 6 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion programs/jit-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion programs/jit-proxy/src/instructions/arb_perp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down
4 changes: 2 additions & 2 deletions programs/jit-proxy/src/instructions/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit d4771c6

Please sign in to comment.