Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
soundsonacid authored Jan 15, 2024
2 parents 0584287 + 5515748 commit 97228f9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
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 @@ -7,8 +7,8 @@ use drift::math::casting::Cast;
use drift::math::constants::{BASE_PRECISION, MARGIN_PRECISION_U128, QUOTE_PRECISION};
use drift::math::margin::MarginRequirementType;
use drift::program::Drift;
use drift::state::perp_market_map::MarketSet;
use drift::state::order_params::{OrderParams, PostOnlyParam};
use drift::state::perp_market_map::MarketSet;
use std::ops::Deref;

use drift::math::orders::find_bids_and_asks_from_users;
Expand Down
2 changes: 1 addition & 1 deletion programs/jit-proxy/src/instructions/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub fn jit<'info>(ctx: Context<'_, '_, '_, 'info, Jit<'info>>, params: JitParams
reduce_only: false,
post_only: params
.post_only
.unwrap_or(PostOnlyParam::MustPostOnly)
.unwrap_or(PostOnlyParam::Slide)
.to_drift_param(),
immediate_or_cancel: true,
max_ts: None,
Expand Down
2 changes: 2 additions & 0 deletions programs/jit-proxy/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pub enum PostOnlyParam {
None,
MustPostOnly, // Tx fails if order can't be post only
TryPostOnly, // Tx succeeds and order not placed if can't be post only
Slide, // Modify price to be post only if can't be post only
}

impl PostOnlyParam {
Expand All @@ -16,6 +17,7 @@ impl PostOnlyParam {
PostOnlyParam::None => DriftPostOnlyParam::None,
PostOnlyParam::MustPostOnly => DriftPostOnlyParam::MustPostOnly,
PostOnlyParam::TryPostOnly => DriftPostOnlyParam::TryPostOnly,
PostOnlyParam::Slide => DriftPostOnlyParam::Slide,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ python = "^3.10"
python-dotenv = "^1.0.0"
solana = "^0.30.1"
anchorpy = "^0.17.1"
driftpy = "0.7.9"
driftpy = "0.7.13"

[build-system]
requires = ["poetry-core"]
Expand Down
4 changes: 2 additions & 2 deletions ts/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@drift-labs/jit-proxy",
"version": "0.10.176",
"version": "0.10.184",
"scripts": {
"clean": "rm -rf lib",
"build": "yarn clean && tsc"
},
"dependencies": {
"@coral-xyz/anchor": "^0.26.0",
"@drift-labs/sdk": "2.54.0-beta.9",
"@drift-labs/sdk": "2.54.0-beta.12",
"@solana/web3.js": "1.73.2"
},
"engines": {
Expand Down
8 changes: 4 additions & 4 deletions ts/sdk/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
bn.js "^5.1.2"
buffer-layout "^1.2.0"

"@drift-labs/[email protected].9":
version "2.54.0-beta.9"
resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.54.0-beta.9.tgz#99a49f44df57b22cf39c1dfbab19e5d1c08c02cc"
integrity sha512-pf6gnt8IntOmN58gfPPIhkKEC4SIoKbXIiZ6YuYBCWiGlEiNSOPm9Jo0iqFlyl4ZYsFRVkjMHTXlWzRSAj56sw==
"@drift-labs/[email protected].12":
version "2.54.0-beta.12"
resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.54.0-beta.12.tgz#25e853b1fed27d33fffcda950e943fdc7b358ff9"
integrity sha512-oJDFFuTXESfESvoB0PtkaK0r9sax0QUI7/YdFJLcMf1i/l1m5soPh7Bcsug/MuJrRVqhCdc7ce90bpDaWzJ+gQ==
dependencies:
"@coral-xyz/anchor" "0.28.1-beta.2"
"@ellipsis-labs/phoenix-sdk" "^1.4.2"
Expand Down

0 comments on commit 97228f9

Please sign in to comment.