Skip to content

Commit 2787382

Browse files
committed
fix: conflicts
2 parents e755b72 + 47c2677 commit 2787382

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+6560
-821
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
- name: Setup node
7575
uses: actions/setup-node@v2
7676
with:
77-
node-version: "22.14.x"
77+
node-version: "24.x.x"
7878
registry-url: "https://registry.npmjs.org"
7979
- name: Install yarn
8080
run: yarn
@@ -89,13 +89,14 @@ jobs:
8989
- name: Setup node
9090
uses: actions/setup-node@v2
9191
with:
92-
node-version: "22.14.x"
92+
node-version: "24.x.x"
9393
registry-url: "https://registry.npmjs.org"
9494
- name: Install yarn
9595
run: yarn
9696
- name: Run lint
9797
run: yarn lint
9898
anchor-tests:
99+
name: Anchor tests
99100
runs-on: ubicloud
100101
timeout-minutes: 60
101102
steps:
@@ -128,7 +129,7 @@ jobs:
128129
- name: Setup node
129130
uses: actions/setup-node@v2
130131
with:
131-
node-version: "22.14.x"
132+
node-version: "24.x.x"
132133
registry-url: "https://registry.npmjs.org"
133134

134135
- name: Setup yarn
@@ -161,7 +162,7 @@ jobs:
161162
- name: Setup Node.js
162163
uses: actions/setup-node@v2
163164
with:
164-
node-version: "22.14.x"
165+
node-version: "24.x.x"
165166
registry-url: 'https://registry.npmjs.org'
166167

167168
- name: Install dependencies
@@ -224,7 +225,7 @@ jobs:
224225
- name: Setup node
225226
uses: actions/setup-node@v2
226227
with:
227-
node-version: "22.14.x"
228+
node-version: "24.x.x"
228229
registry-url: "https://registry.npmjs.org"
229230
- name: Build sdk
230231
run: yarn
@@ -249,7 +250,14 @@ jobs:
249250
}
250251
echo "version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
251252
- name: Publish to npm
252-
run: npm publish --access=public
253+
run: |
254+
if [[ "$PACKAGE_VERSION" == *beta* ]]; then
255+
npm publish --access=public --tag latest
256+
elif [[ "$PACKAGE_VERSION" == *alpha* ]]; then
257+
npm publish --access=public --tag alpha
258+
else
259+
npm publish --access=public
260+
fi
253261
env:
254262
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
255263
- name: Build sdk for browser
@@ -259,7 +267,14 @@ jobs:
259267
# Update package name for browser version while keeping the same version
260268
node -e "const pkg = require('./package.json'); pkg.name = pkg.name + '-browser'; require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2));"
261269
- name: Publish browser version to npm
262-
run: npm publish --access=public
270+
run: |
271+
if [[ "$PACKAGE_VERSION" == *beta* ]]; then
272+
npm publish --access=public --tag beta
273+
elif [[ "$PACKAGE_VERSION" == *alpha* ]]; then
274+
npm publish --access=public --tag alpha
275+
else
276+
npm publish --access=public
277+
fi
263278
env:
264279
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
265280
- name: Notify Slack on failure

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Breaking
1515

16+
- sdk: `helius-laserstream` is now an optional dependency; installs with `--no-optional` will disable LaserStream support. [#2087](https://github.com/drift-labs/protocol-v2/pull/2087)
17+
- sdk: `LaserSubscribe` is deprecated and now lazy-loads with a warning; use `getLaserSubscribe()` instead. [#2087](https://github.com/drift-labs/protocol-v2/pull/2087)
18+
19+
## [2.156.0] - 2026-01-26
20+
21+
### Features
22+
23+
### Fixes
24+
25+
### Breaking
26+
27+
## [2.155.0] - 2026-01-20
28+
29+
### Features
30+
31+
- program: additional logging for amm fills [#2078](https://github.com/drift-labs/protocol-v2/pull/2078)
32+
- program: allow delegate to transfer isolated pos deposit in sub account [#2079](https://github.com/drift-labs/protocol-v2/pull/2079)
33+
- program: use load_maps in update_amms [#2081](https://github.com/drift-labs/protocol-v2/pull/2081)
34+
35+
### Fixes
36+
37+
### Breaking
38+
1639
## [2.154.0] - 2026-01-08
1740

1841
### Features

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
},
3030
"dependencies": {
3131
"@ellipsis-labs/phoenix-sdk": "1.4.2",
32-
"@pythnetwork/pyth-solana-receiver": "0.8.0",
3332
"@switchboard-xyz/common": "3.0.14",
3433
"@switchboard-xyz/on-demand": "2.4.1",
3534
"anchor-bankrun": "0.3.0",

programs/drift/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "drift"
3-
version = "2.154.0"
3+
version = "2.156.0"
44
description = "Created with Anchor"
55
edition = "2018"
66

programs/drift/src/controller/orders.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,6 +1803,7 @@ fn fulfill_perp_order(
18031803
};
18041804

18051805
if fulfillment_methods.is_empty() {
1806+
msg!("no fulfillment methods found");
18061807
return Ok((0, 0));
18071808
}
18081809

programs/drift/src/ids.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,7 @@ pub const WHITELISTED_SWAP_PROGRAMS: &[solana_program::pubkey::Pubkey] = &[
140140
titan_mainnet_argos_v1::id(),
141141
];
142142

143-
pub const WHITELISTED_EXTERNAL_DEPOSITORS: [Pubkey; 1] =
144-
[pubkey!("zApVWDs3nSychNnUXSS2czhY78Ycopa15zELrK2gAdM")];
143+
pub const WHITELISTED_EXTERNAL_DEPOSITORS: [Pubkey; 2] = [
144+
pubkey!("zApVWDs3nSychNnUXSS2czhY78Ycopa15zELrK2gAdM"),
145+
pubkey!("4B62MS5gxpRZ2hwkGCNAAayA5f7LYZRW4z1ASSfU3SXo"),
146+
];

programs/drift/src/instructions/keeper.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2905,13 +2905,19 @@ pub fn handle_update_amms<'c: 'info, 'info>(
29052905
let state = &ctx.accounts.state;
29062906

29072907
let remaining_accounts_iter = &mut ctx.remaining_accounts.iter().peekable();
2908-
let oracle_map = &mut OracleMap::load(remaining_accounts_iter, clock.slot, None)?;
2909-
let market_map = &mut PerpMarketMap::load(
2910-
&get_market_set_from_list(market_indexes),
2908+
let AccountMaps {
2909+
mut perp_market_map,
2910+
mut oracle_map,
2911+
..
2912+
} = load_maps(
29112913
remaining_accounts_iter,
2914+
&get_market_set_from_list(market_indexes),
2915+
&MarketSet::new(),
2916+
clock.slot,
2917+
Some(state.oracle_guard_rails),
29122918
)?;
29132919

2914-
controller::repeg::update_amms(market_map, oracle_map, state, &clock)?;
2920+
controller::repeg::update_amms(&mut perp_market_map, &mut oracle_map, state, &clock)?;
29152921

29162922
Ok(())
29172923
}

programs/drift/src/instructions/user.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4842,7 +4842,7 @@ pub struct TransferIsolatedPerpPositionDeposit<'info> {
48424842
pub user: AccountLoader<'info, User>,
48434843
#[account(
48444844
mut,
4845-
has_one = authority
4845+
constraint = is_stats_for_user(&user, &user_stats)?
48464846
)]
48474847
pub user_stats: AccountLoader<'info, UserStats>,
48484848
pub authority: Signer<'info>,

programs/drift/src/math/fulfillment.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use crate::error::DriftResult;
33
use crate::math::casting::Cast;
44
use crate::math::matching::do_orders_cross;
55
use crate::math::safe_unwrap::SafeUnwrap;
6+
use crate::msg;
67
use crate::state::fulfillment::{PerpFulfillmentMethod, SpotFulfillmentMethod};
78
use crate::state::perp_market::AMM;
89
use crate::state::user::Order;
@@ -73,7 +74,18 @@ pub fn determine_perp_fulfillment_methods(
7374

7475
if amm_is_available {
7576
let taker_crosses_amm = match limit_price {
76-
Some(taker_price) => do_orders_cross(maker_direction, amm_price, taker_price),
77+
Some(taker_price) => {
78+
let crosses = do_orders_cross(maker_direction, amm_price, taker_price);
79+
if !crosses && fulfillment_methods.is_empty() {
80+
msg!(
81+
"taker does not cross amm: taker price {} amm price {}",
82+
taker_price,
83+
amm_price
84+
);
85+
}
86+
crosses
87+
}
88+
7789
None => true,
7890
};
7991

0 commit comments

Comments
 (0)