Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
261 commits
Select commit Hold shift + click to select a range
8237746
program: add invariant for max in amount for if swap (#1825)
crispheaney Sep 22, 2025
107f0a8
sdk: release v2.139.0-beta.1
github-actions[bot] Sep 22, 2025
2791cb0
merge master
jackwaller Sep 22, 2025
0656f34
chore: add grpc client to order subscriber
jackwaller Sep 22, 2025
301a52c
Merge pull request #1900 from drift-labs/jack/add-laserstream-client
jackwaller Sep 23, 2025
6afe376
sdk: release v2.139.0-beta.2
github-actions[bot] Sep 23, 2025
763b978
sdk: add market index 76 to constant (#1901)
0xbigz Sep 23, 2025
d443dda
sdk: release v2.139.0-beta.3
github-actions[bot] Sep 23, 2025
ad516ec
fix ui build (#1902)
lowkeynicc Sep 23, 2025
c926d98
sdk: release v2.139.0-beta.4
github-actions[bot] Sep 23, 2025
bb52031
sdk: update aster config (#1903)
lowkeynicc Sep 23, 2025
31c69e0
sdk: release v2.139.0-beta.5
github-actions[bot] Sep 23, 2025
e592e67
Revert "Revert "Crispeaney/revert swift max margin ratio" (#1877)" (#…
wphan Sep 24, 2025
77d5b54
sdk: release v2.139.0-beta.6
github-actions[bot] Sep 24, 2025
f0535c9
Revert "Revert "Revert "Crispeaney/revert swift max margin ratio" (#1…
wphan Sep 24, 2025
3ff1240
sdk: release v2.139.0-beta.7
github-actions[bot] Sep 24, 2025
2d4e30b
more robust isDelegateSigner for swift orders
moosecat2 Sep 24, 2025
ab62618
Merge pull request #1912 from drift-labs/swift-is-delegat-signer-robu…
moosecat2 Sep 24, 2025
d02d126
sdk: release v2.139.0-beta.8
github-actions[bot] Sep 24, 2025
f941e0d
program: allow resolve perp pnl deficit if pnl pool isnt 0 but at def…
0xbigz Sep 24, 2025
065b633
program: add immutable owner support for token 22 vaults (#1904)
crispheaney Sep 24, 2025
6b7a80a
sdk: tweak math for filling triggers (#1880)
crispheaney Sep 24, 2025
76e880d
sdk: release v2.139.0-beta.9
github-actions[bot] Sep 24, 2025
99e23ce
program: allow delegate to update user position max margin ratio (#1913)
crispheaney Sep 25, 2025
ce84475
Revert "more robust isDelegateSigner for swift orders"
moosecat2 Sep 25, 2025
cbfb1d6
sdk: release v2.139.0-beta.10
github-actions[bot] Sep 25, 2025
cf478fc
update SwiftOrderMessage type for missing fields (#1908)
jordy25519 Sep 25, 2025
aebcdf8
sdk: release v2.139.0-beta.11
github-actions[bot] Sep 25, 2025
fef28ba
sdk: add getUpdateFeatureBitFlagsMedianTriggerPriceIx
crispheaney Sep 25, 2025
f6e1b03
sdk: release v2.139.0-beta.12
github-actions[bot] Sep 25, 2025
629d7ae
update devnet market constants (#1914)
wphan Sep 25, 2025
10c9c14
sdk: release v2.139.0-beta.13
github-actions[bot] Sep 25, 2025
94af1bd
program: deposit into if stake from admin (#1899)
crispheaney Sep 25, 2025
0aa0da3
sdk: release v2.139.0-beta.14
github-actions[bot] Sep 25, 2025
5355cdc
program: comment out unused ix (#1911)
crispheaney Sep 25, 2025
db76d63
program: raise MAX_BASE_ASSET_AMOUNT_WITH_AMM numerical invariant
0xbigz Sep 25, 2025
7ee2a8e
v2.139.0
wphan Sep 25, 2025
1ba87a7
sdk: release v2.140.0-beta.0
github-actions[bot] Sep 25, 2025
0f73d50
sdk: update constants market index 77 (#1916)
0xbigz Sep 26, 2025
6a8a7be
sdk: release v2.140.0-beta.1
github-actions[bot] Sep 26, 2025
923e4a1
Wphan/builder codes (#1805)
wphan Sep 29, 2025
bc2493d
sdk: release v2.140.0-beta.2
github-actions[bot] Sep 29, 2025
d315d88
v2.140.0
wphan Sep 29, 2025
aedb8d6
sdk: release v2.141.0-beta.0
github-actions[bot] Sep 29, 2025
1fd7490
feat: add margin ratio ix to open orders + swift prop (#1864)
LukasDeco Sep 29, 2025
f1a1c71
sdk: release v2.141.0-beta.1
github-actions[bot] Sep 29, 2025
a1719bb
run CICD on PRs to devnet
wphan Sep 29, 2025
d3dbc64
remove redundant account in getPlaceAndMakePerpOrderIx (#1923)
wphan Oct 2, 2025
7db528a
sdk: release v2.141.0-beta.2
github-actions[bot] Oct 2, 2025
cc97506
sdk: add spot-market-index-59 (#1925)
0xbigz Oct 2, 2025
ce5a2f2
sdk: release v2.141.0-beta.3
github-actions[bot] Oct 2, 2025
4d1cfe9
program: calculate_max_perp_order_size account for max margin ratio (…
crispheaney Oct 2, 2025
10b6101
feat: add dflow in whitelisted programs (#1924)
0xDeeep Oct 2, 2025
806d611
update settle pnl take rev share map (#1926)
wphan Oct 2, 2025
d12614d
sdk: release v2.141.0-beta.4
github-actions[bot] Oct 2, 2025
c507bca
fix ci sdk check
wphan Oct 3, 2025
5c42b0a
sdk: release v2.141.0-beta.5
github-actions[bot] Oct 3, 2025
30f6871
fix maker ix missing escrow detection (#1927)
wphan Oct 3, 2025
01656ee
refactor(sdk): add OneShotUserStatsAccountSubscriber (#1929)
ChesterSim Oct 3, 2025
1f63c6e
sdk: release v2.141.0-beta.6
github-actions[bot] Oct 3, 2025
4a17883
make working devcontainer and dockerfile (#1919)
wphan Oct 3, 2025
e38d04f
sdk: add devnet-spot-market-index-8 (#1920)
0xbigz Oct 3, 2025
56282c3
Revert "fix ci sdk check"
wphan Oct 3, 2025
af81cc8
sdk: release v2.141.0-beta.7
github-actions[bot] Oct 3, 2025
b619022
refactor(sdk): add IWalletV2
ChesterSim Oct 3, 2025
b20aa56
sdk: release v2.141.0-beta.8
github-actions[bot] Oct 3, 2025
ad749ad
dont panic on settle-pnl when no position (#1928)
wphan Oct 3, 2025
8bd0195
program: disallow builder to be escrow authority (#1930)
wphan Oct 3, 2025
c453b2a
v2.141.0
wphan Oct 3, 2025
1c281f1
sdk: release v2.142.0-beta.0
github-actions[bot] Oct 3, 2025
6cd5194
sdk: add missing builder export
wphan Oct 3, 2025
d56a23a
sdk: release v2.142.0-beta.1
github-actions[bot] Oct 3, 2025
da627e1
feat: batch accounts for less connects grpc drift client subscriber (…
LukasDeco Oct 3, 2025
e5c215f
sdk: release v2.142.0-beta.2
github-actions[bot] Oct 3, 2025
e82f263
fix: methods for getting market and slot data bombing (#1933)
LukasDeco Oct 3, 2025
4e55a42
sdk: release v2.142.0-beta.3
github-actions[bot] Oct 3, 2025
a0545b9
update RevenueShareOrder ts type (#1934)
wphan Oct 3, 2025
50f115d
sdk: release v2.142.0-beta.4
github-actions[bot] Oct 3, 2025
068ed66
fix: oracle info wrong on grpc sub v2 (#1935)
LukasDeco Oct 4, 2025
da6fc9c
sdk: release v2.142.0-beta.5
github-actions[bot] Oct 4, 2025
7bea1a9
fix: oracle string map not initted grpc v2 (#1936)
LukasDeco Oct 4, 2025
a0d9011
sdk: release v2.142.0-beta.6
github-actions[bot] Oct 4, 2025
ec8d064
refactor(sdk): fallback to false for node-only packages (#1931)
ChesterSim Oct 5, 2025
b9b8e89
grpc v2 use simpler types (#1937)
DecentralizedDev Oct 5, 2025
ba0c8e3
sdk: release v2.142.0-beta.7
github-actions[bot] Oct 5, 2025
8ceb1c6
fix: prettier broken on grpc v2 subscriber (#1938)
LukasDeco Oct 5, 2025
2353b60
sdk: release v2.142.0-beta.8
github-actions[bot] Oct 5, 2025
b9be163
fix: grpc sub v2/multi not updating data map (#1940)
LukasDeco Oct 6, 2025
373f423
sdk: release v2.142.0-beta.9
github-actions[bot] Oct 6, 2025
6b4f02e
update devnet spot market oracles
moosecat2 Oct 6, 2025
4c75c0b
sdk: release v2.142.0-beta.10
github-actions[bot] Oct 6, 2025
80aac81
fix: oracle updates not emitting for all sources (#1941)
LukasDeco Oct 7, 2025
4aa47ed
sdk: release v2.142.0-beta.11
github-actions[bot] Oct 7, 2025
0fe3531
add new lp event for devnet event subscriber
moosecat2 Oct 7, 2025
0cb9bd3
sdk: release v2.142.0-beta.12
github-actions[bot] Oct 7, 2025
fdd89d4
sdk: add adminDisableUpdatePerpBidAskTwap to adminClient
crispheaney Oct 7, 2025
32a31a2
sdk: release v2.142.0-beta.13
github-actions[bot] Oct 7, 2025
09a0654
fix: rm inheritance from grpc v2 subscriber and implement everything …
LukasDeco Oct 7, 2025
1610795
sdk: release v2.142.0-beta.14
github-actions[bot] Oct 7, 2025
461ba96
fix: grpc v2 subscriber bug with multiple sources on same oracle (#1944)
LukasDeco Oct 8, 2025
061bba6
sdk: release v2.142.0-beta.15
github-actions[bot] Oct 8, 2025
3a20a28
docs(sdk): add docs for changeApprovedBuilder
ChesterSim Oct 8, 2025
a9198ab
sdk: release v2.142.0-beta.16
github-actions[bot] Oct 8, 2025
44bbd3f
fix: grpc v2 doing extra subscribes for oracles (#1945)
LukasDeco Oct 8, 2025
40ce345
sdk: release v2.142.0-beta.17
github-actions[bot] Oct 8, 2025
a21332f
fix: grpc multi acct subscriber missing slot check (#1947)
LukasDeco Oct 9, 2025
52a46a6
sdk: release v2.142.0-beta.18
github-actions[bot] Oct 9, 2025
9f12589
fix: buffer equality check on multi grpc (#1949)
LukasDeco Oct 9, 2025
28ae85a
sdk: release v2.142.0-beta.19
github-actions[bot] Oct 9, 2025
b58f53b
chore: dont delete accounts from datamap and buffer map grpcmulti (#1…
LukasDeco Oct 10, 2025
c3a43e4
sdk: release v2.142.0-beta.20
github-actions[bot] Oct 10, 2025
a2d7fe6
refactor(sdk): add authority overrides to place order ixs
ChesterSim Oct 13, 2025
7dc0d54
Merge branch 'chester/place-order-overrides'
ChesterSim Oct 13, 2025
93ba1e2
sdk: release v2.142.0-beta.21
github-actions[bot] Oct 13, 2025
57a530d
refactor(sdk): add overrides for cancel orders
ChesterSim Oct 13, 2025
07d03da
sdk: release v2.142.0-beta.22
github-actions[bot] Oct 13, 2025
09bbc4c
sdk: add market index 78 79 80 to constants (#1956)
0xbigz Oct 13, 2025
2c02710
sdk: release v2.142.0-beta.23
github-actions[bot] Oct 13, 2025
4e1f214
sdk: add parseLogsForCuUsage (#1953)
wphan Oct 14, 2025
40e2455
sdk: release v2.142.0-beta.24
github-actions[bot] Oct 14, 2025
a541e87
refactor(sdk): allow authority override for getModifyOrderIx
ChesterSim Oct 14, 2025
f530ca9
sdk: release v2.142.0-beta.25
github-actions[bot] Oct 14, 2025
758dab4
program: add titan to whitelisted swap programs (#1952)
wphan Oct 14, 2025
e1bde42
feat: initial SDK Changes for iso pos
LukasDeco Aug 25, 2025
db4a374
feat: margin calc unit tests
LukasDeco Aug 25, 2025
950b3c3
temp
LukasDeco Aug 26, 2025
b24334c
feat: finally - parity with on-chain cargo test
LukasDeco Aug 28, 2025
3606bb4
fix: PR feedback and cleanup + decoding position flag wrong
LukasDeco Aug 28, 2025
99c8268
feat: deposit into iso position ixs
LukasDeco Aug 30, 2025
88d7b76
temp: pr feedback nother round
LukasDeco Sep 2, 2025
d956c23
feat: per perp pos max margin ratio
LukasDeco Sep 2, 2025
826c962
feat: additional ixs for transfer into iso + update perp margin ratio
LukasDeco Sep 2, 2025
46cc352
feat: revamp liquidation checker functions for cross vs iso margin
LukasDeco Sep 3, 2025
9c6b4b0
fix: adjust health getter for user
LukasDeco Sep 3, 2025
9294340
fix: liq statuses add to return signature
LukasDeco Sep 3, 2025
c45be38
chore: post rebase cleaner upper
LukasDeco Oct 14, 2025
d73ebd7
feat: grpc v2 delisted markets handling better optimized (#1960)
LukasDeco Oct 14, 2025
ec2731a
sdk: release v2.142.0-beta.26
github-actions[bot] Oct 14, 2025
b4fa440
ref price offset enhance (#1958)
moosecat2 Oct 14, 2025
948b9f2
sdk: release v2.142.0-beta.27
github-actions[bot] Oct 14, 2025
52490f7
CHANGELOG
crispheaney Oct 14, 2025
ee0bf58
program: allow hot wallet to increase max spread and pause funding (#…
crispheaney Oct 14, 2025
bfef3f4
program: allow settling positive pnl expired pos during liquidation (…
crispheaney Oct 14, 2025
7582b0b
v2.142.0
wphan Oct 15, 2025
b4d4302
sdk: release v2.143.0-beta.0
github-actions[bot] Oct 15, 2025
7c34e42
rm println (#1962)
jordy25519 Oct 15, 2025
afd9fee
fix: missing params from per market lev
LukasDeco Oct 15, 2025
04243e9
fix: cleanup potential mem leaks on grpc v2 (#1963)
LukasDeco Oct 15, 2025
7d63753
sdk: release v2.143.0-beta.1
github-actions[bot] Oct 15, 2025
788bdef
feat: zero out account withdraw from perp position
LukasDeco Oct 15, 2025
5f90487
fix: available positions logic update for iso
LukasDeco Oct 15, 2025
b2999c8
Merge remote-tracking branch 'origin/master' into lukas/isolated-posi…
LukasDeco Oct 15, 2025
a8a4011
sdk: add-max-size-for-target-liability-weight (#1961)
0xbigz Oct 16, 2025
c315267
sdk: release v2.143.0-beta.2
github-actions[bot] Oct 16, 2025
babdddf
add includeOpenOrders option for perp position health (#1966)
lowkeynicc Oct 16, 2025
ab911c2
sdk: release v2.143.0-beta.3
github-actions[bot] Oct 16, 2025
a8be604
refactor(sdk): add fetch revenue share accounts, overrides for revenu…
ChesterSim Oct 16, 2025
151cd42
sdk: release v2.143.0-beta.4
github-actions[bot] Oct 16, 2025
e11a2ec
feat: iso position txs cleanup + ix ordering
LukasDeco Oct 19, 2025
3d9f823
feat: onchain props for signed msg orders + idl update
LukasDeco Oct 21, 2025
ec328b1
Mm oracle sdk patch (#1977)
moosecat2 Oct 21, 2025
63ca710
sdk: release v2.143.0-beta.5
github-actions[bot] Oct 21, 2025
de06f46
is oracle divergent sdk fix (#1978)
moosecat2 Oct 21, 2025
e756ed1
sdk: release v2.143.0-beta.6
github-actions[bot] Oct 21, 2025
9650603
use custom msg! macro for drift-rs (#1975)
jordy25519 Oct 22, 2025
99245f7
sdk: update jlp oracle to pyth lazer (#1980)
wphan Oct 22, 2025
37f0781
sdk: release v2.143.0-beta.7
github-actions[bot] Oct 22, 2025
9260e68
program: initial-margin-hlm-imf change (#1969)
0xbigz Oct 22, 2025
6af0b76
sdk: release v2.143.0-beta.8
github-actions[bot] Oct 22, 2025
d04bb0c
amm available for low risk orders (#1968)
moosecat2 Oct 22, 2025
9b5c0b1
sdk: release v2.143.0-beta.9
github-actions[bot] Oct 22, 2025
a51c28b
feat: cancels withdraw from iso pos
LukasDeco Oct 22, 2025
043e181
v2.143.0
wphan Oct 23, 2025
fc7a81e
sdk: release v2.144.0-beta.0
github-actions[bot] Oct 23, 2025
afbb584
sdk: add to constants spot-plus-market-index-82 (#1982)
0xbigz Oct 23, 2025
6a1d7a2
sdk: release v2.144.0-beta.1
github-actions[bot] Oct 23, 2025
a7cf7d8
Merge branch 'master' into lukas/isolated-positions-sdk
LukasDeco Oct 23, 2025
e72c529
cap max size fn at max oi (#1983)
lowkeynicc Oct 23, 2025
935e195
sdk: release v2.144.0-beta.2
github-actions[bot] Oct 23, 2025
7f9aec9
sdk: add titan client (#1972)
jeremyhwong Oct 24, 2025
4dfd3f7
fix: support fetching initial data for delisted markets, just not bei…
LukasDeco Oct 24, 2025
c4d4a51
fix: only settle if needed iso withdraw + i64 min
LukasDeco Oct 24, 2025
5c25295
clean up oracle validity logs (#1984)
moosecat2 Oct 24, 2025
158f559
Fix build
cha-kos Oct 24, 2025
23f15d4
Merge pull request #1987 from drift-labs/fix-build
cha-kos Oct 24, 2025
9f515db
sdk: release v2.144.0-beta.3
github-actions[bot] Oct 24, 2025
c8f9841
Keep oracle data of delisted markets. (#1988)
DecentralizedDev Oct 25, 2025
96a38aa
sdk: release v2.144.0-beta.4
github-actions[bot] Oct 25, 2025
d368e2a
Fix build
cha-kos Oct 27, 2025
301572b
Merge pull request #1989 from drift-labs/fix-build
cha-kos Oct 27, 2025
5e1fedf
sdk: release v2.144.0-beta.5
github-actions[bot] Oct 27, 2025
6d1b6b6
feat: improvements to single grpc test
LukasDeco Oct 27, 2025
f00c4c1
feat: buffer on margin deposits to avoid insuff collat err
LukasDeco Oct 27, 2025
3aee164
feat: helpful scripts for testing/manipulating iso positions
LukasDeco Oct 27, 2025
a45758b
Multi User GRPC (#1970)
LukasDeco Oct 27, 2025
8388765
sdk: release v2.144.0-beta.6
github-actions[bot] Oct 27, 2025
478fdb9
Merge branch 'master' into lukas/isolated-positions-sdk
LukasDeco Oct 27, 2025
8e1594c
program: use-5min-for-target-expiry-price (#1967)
0xbigz Oct 27, 2025
e61ea32
v2.144.0
wphan Oct 27, 2025
8ccafa5
sdk: release v2.145.0-beta.0
github-actions[bot] Oct 27, 2025
aa9b1cc
Implement Unified Swap Client
cha-kos Oct 27, 2025
a1087aa
prettify
cha-kos Oct 28, 2025
b1442f5
Merge pull request #1993 from drift-labs/unified-swap-client
cha-kos Oct 28, 2025
2eedeac
sdk: release v2.145.0-beta.1
github-actions[bot] Oct 28, 2025
a9658e6
feat: update getPlaceSignedMsgTakerPerpOrderIxs for iso position depo…
LukasDeco Oct 28, 2025
35586ec
sdk: release v2.145.0-beta.2
github-actions[bot] Oct 28, 2025
c6b9263
chore: re organizing some user sdk funcs
LukasDeco Oct 28, 2025
a1a0157
fix: bug with max amount withdrawal for transfer iso perp
LukasDeco Oct 28, 2025
1fb6e52
DLP (#1885)
moosecat2 Oct 29, 2025
56900cd
sdk: release v2.145.0-beta.3
github-actions[bot] Oct 29, 2025
c768aaa
v2.145.0
wphan Oct 29, 2025
691ce8f
sdk: release v2.146.0-beta.0
github-actions[bot] Oct 29, 2025
d40470e
feat: decoding user isolated position fields (#1996)
LukasDeco Oct 29, 2025
c1e5e5c
sdk: release v2.146.0-beta.1
github-actions[bot] Oct 29, 2025
abca528
fix: re-add accidentally yeeted ws v2 susbcribers (#1997)
LukasDeco Oct 29, 2025
fb3f9a0
sdk: release v2.146.0-beta.2
github-actions[bot] Oct 29, 2025
01d5be9
Merge branch 'master' into lukas/isolated-positions-sdk
LukasDeco Oct 29, 2025
80de21f
fix: post merge dupe field on swift
LukasDeco Oct 29, 2025
d7bc3ee
amm cache init refactor (#1998)
moosecat2 Oct 29, 2025
f297f60
sdk: release v2.146.0-beta.3
github-actions[bot] Oct 29, 2025
722f553
add delete amm cache ix (#1999)
moosecat2 Oct 29, 2025
757f129
sdk: release v2.146.0-beta.4
github-actions[bot] Oct 29, 2025
86f5964
remove delete amm ixs (#2000)
moosecat2 Oct 29, 2025
84e6e97
sdk: release v2.146.0-beta.5
github-actions[bot] Oct 29, 2025
536f3ce
fix tests for amm cache (#2001)
wphan Oct 29, 2025
82cee73
sdk: release v2.146.0-beta.6
github-actions[bot] Oct 29, 2025
c8a9deb
v2.145.1
wphan Oct 30, 2025
0b5c001
sdk: release v2.146.0-beta.0
github-actions[bot] Oct 30, 2025
b3ac08b
bump sdk
wphan Oct 30, 2025
6df768f
sdk: release v2.146.0-beta.7
github-actions[bot] Oct 30, 2025
9bd4509
feat: min and max 64 constants
LukasDeco Oct 30, 2025
457c499
program: add isolated_position_deposit to swift params (#2002)
crispheaney Oct 30, 2025
2600639
sdk: update idl
crispheaney Oct 30, 2025
5b90d7c
sdk: release v2.146.0-beta.8
github-actions[bot] Oct 30, 2025
30de317
Merge branch 'master' into lukas/isolated-positions-sdk
LukasDeco Oct 30, 2025
86fb94e
sdk: remove launchcoin lazerid (#2003)
wphan Oct 30, 2025
383fdba
sdk: release v2.146.0-beta.9
github-actions[bot] Oct 30, 2025
33634d2
remove pythid (#2004)
wphan Oct 30, 2025
0f930ab
sdk: release v2.146.0-beta.10
github-actions[bot] Oct 30, 2025
fa9a03d
Add backwards compatibility for swap client args
cha-kos Oct 30, 2025
a253f4f
lukas/fix grpc multi user smol bugs (#1995)
LukasDeco Oct 30, 2025
0c51fee
sdk: release v2.146.0-beta.11
github-actions[bot] Oct 30, 2025
42967d2
Merge pull request #2006 from drift-labs/add-backwards-compat-swap
cha-kos Oct 31, 2025
4c99a39
sdk: release v2.146.0-beta.12
github-actions[bot] Oct 31, 2025
ccb8cc8
fix: bug with margin removal
LukasDeco Oct 31, 2025
d544142
fix: missing swift iso deposit from idl
LukasDeco Nov 3, 2025
1c726d7
Merge branch 'master' into lukas/isolated-positions-sdk
LukasDeco Nov 3, 2025
4590e1c
fix: lint and prettify
LukasDeco Nov 3, 2025
28c08aa
feat: increased buffer on isolated deposit opening position
LukasDeco Nov 3, 2025
41c1f4b
fix: missing check on order increasing size for depositing margin pla…
LukasDeco Nov 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 47 additions & 45 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,54 +1,56 @@
#
# Docker image to generate deterministic, verifiable builds of Anchor programs.
# This must be run *after* a given ANCHOR_CLI version is published and a git tag
# is released on GitHub.
# Drift Protocol Dev Container
#

FROM rust:1.75
FROM --platform=linux/amd64 rust:1.70.0

ARG DEBIAN_FRONTEND=noninteractive

ARG SOLANA_CLI="1.14.7"
ARG ANCHOR_CLI="0.26.0"
ARG NODE_VERSION="v18.16.0"
ARG SOLANA_CLI="1.16.27"
ARG ANCHOR_CLI="0.29.0"
ARG NODE_VERSION="20.18.1"

ENV HOME="/root"
ENV PATH="${HOME}/.cargo/bin:${PATH}"
ENV PATH="${HOME}/.local/share/solana/install/active_release/bin:${PATH}"
ENV PATH="${HOME}/.nvm/versions/node/${NODE_VERSION}/bin:${PATH}"

# Install base utilities.
RUN mkdir -p /workdir && mkdir -p /tmp && \
apt-get update -qq && apt-get upgrade -qq && apt-get install -qq \
build-essential git curl wget jq pkg-config python3-pip \
libssl-dev libudev-dev

RUN wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb

# Install rust.
RUN curl "https://sh.rustup.rs" -sfo rustup.sh && \
sh rustup.sh -y && \
rustup component add rustfmt clippy

# Install node / npm / yarn.
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
ENV NVM_DIR="${HOME}/.nvm"
RUN . $NVM_DIR/nvm.sh && \
nvm install ${NODE_VERSION} && \
nvm use ${NODE_VERSION} && \
nvm alias default node && \
npm install -g yarn && \
yarn add ts-mocha

# Install Solana tools.
RUN sh -c "$(curl -sSfL https://release.solana.com/v${SOLANA_CLI}/install)"

# Install anchor.
RUN cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
RUN avm install ${ANCHOR_CLI} && avm use ${ANCHOR_CLI}

RUN solana-keygen new --no-bip39-passphrase
ENV PATH="/usr/local/cargo/bin:${PATH}"
ENV PATH="/root/.local/share/solana/install/active_release/bin:${PATH}"

RUN mkdir -p /workdir /tmp \
&& apt-get update -qq \
&& apt-get upgrade -qq \
&& apt-get install -y --no-install-recommends \
build-essential git curl wget jq pkg-config python3-pip xz-utils ca-certificates \
libssl-dev libudev-dev bash software-properties-common \
&& add-apt-repository 'deb http://deb.debian.org/debian bookworm main' \
&& apt-get update -qq \
&& apt-get install -y libc6 libc6-dev \
&& rm -rf /var/lib/apt/lists/*

RUN rustup component add rustfmt

RUN rustup install 1.78.0 \
&& rustup component add rustfmt clippy --toolchain 1.78.0

RUN curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" -o /tmp/node.tar.xz \
&& tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 \
&& rm /tmp/node.tar.xz \
&& corepack enable \
&& npm install -g ts-mocha typescript mocha \
&& node -v && npm -v && yarn -v

# Solana CLI (x86_64 build)
RUN curl -sSfL "https://github.com/solana-labs/solana/releases/download/v${SOLANA_CLI}/solana-release-x86_64-unknown-linux-gnu.tar.bz2" \
| tar -xjC /tmp \
&& mv /tmp/solana-release/bin/* /usr/local/bin/ \
&& rm -rf /tmp/solana-release

# Anchor CLI
RUN cargo install --git https://github.com/coral-xyz/anchor --tag "v${ANCHOR_CLI}" anchor-cli --locked

# Set up Solana key + config for root
RUN solana-keygen new --no-bip39-passphrase --force \
&& solana config set --url localhost

RUN apt-get update && apt-get install -y zsh curl git \
&& sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended \
&& chsh -s /usr/bin/zsh root

WORKDIR /workdir
#be sure to add `/root/.avm/bin` to your PATH to be able to run the installed binaries
55 changes: 53 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
{
"build": { "dockerfile": "Dockerfile" },
}
"name": "Drift Protocol Development",
"build": {
"dockerfile": "Dockerfile",
"platform": "linux/amd64"
},
"workspaceFolder": "/workdir",
"remoteUser": "root",
"mounts": [
"source=${localWorkspaceFolder},target=/workdir,type=bind,consistency=cached",
"source=drift-target,target=/workdir/target,type=volume,consistency=delegated"
],
"postCreateCommand": "yarn config set ignore-package-manager true && echo 'Dev container ready! You can now run: anchor build, anchor test, cargo build, etc.'",
"customizations": {
"vscode": {
"extensions": [
"rust-lang.rust-analyzer",
"ms-vscode.vscode-json",
"tamasfe.even-better-toml"
],
"settings": {
"rust-analyzer.cachePriming.numThreads": 1,
"rust-analyzer.cargo.buildScripts.enable": true,
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.checkOnSave": true,
"rust-analyzer.check.command": "clippy",
"rust-analyzer.server.extraEnv": {
"NODE_OPTIONS": "--max-old-space-size=4096",
"RUSTUP_TOOLCHAIN": "1.78.0-x86_64-unknown-linux-gnu"
},
"editor.formatOnSave": true,
"git.ignoreLimitWarning": true
}
}
},
"forwardPorts": [
8899,
8900
],
"portsAttributes": {
"8899": {
"label": "Solana Test Validator",
"onAutoForward": "notify"
},
"8900": {
"label": "Solana Test Validator RPC",
"onAutoForward": "notify"
}
},
"containerEnv": {
"ANCHOR_WALLET": "/root/.config/solana/id.json",
"RUST_LOG": "solana_runtime::message_processor::stable_log=debug"
}
}
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [master]
pull_request:
branches: [master]
branches: [master, devnet]

defaults:
run:
Expand Down
Empty file added =
Empty file.
111 changes: 101 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,108 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Features

- program: add isolated_position_deposit to signed msg params

### Fixes

### Breaking

## [2.145.1] - 2025-10-20

### Features

### Fixes

- dlp ([#1998](https://github.com/drift-labs/protocol-v2/pull/1998))
- dlp ([#1999](https://github.com/drift-labs/protocol-v2/pull/1999))
- dlp ([#2000](https://github.com/drift-labs/protocol-v2/pull/2000))

### Breaking

## [2.145.0] - 2025-10-28

### Features

- dlp ([#1885](https://github.com/drift-labs/protocol-v2/pull/1885))

### Fixes

### Breaking

## [2.144.0] - 2025-10-27

### Features

- program: use-5min-for-target-expiry-price ([#1967](https://github.com/drift-labs/protocol-v2/pull/1967))

### Fixes

### Breaking

## [2.143.0] - 2025-10-22

- program: relax filling conditions for low risk orders vs amm ([#1968](https://github.com/drift-labs/protocol-v2/pull/1968))
- sdk: make oracle validity match program and propogate to dlob and math functions ([#1968](https://github.com/drift-labs/protocol-v2/pull/1968))

### Features

- program: make imf smoother between hlm and non hlm users ([#1969](https://github.com/drift-labs/protocol-v2/pull/1969))

### Fixes

### Breaking

## [2.142.0] - 2025-10-14

### Features

- program: add titan to whitelisted swap programs ([#1952](https://github.com/drift-labs/protocol-v2/pull/1952))
- program: allow hot wallet to increase max spread and pause funding ([#1957](https://github.com/drift-labs/protocol-v2/pull/1957))

### Fixes

### Breaking

## [2.141.0] - 2025-10-03

### Features

- program: disallow builder to be escrow authority ([#1930](https://github.com/drift-labs/protocol-v2/pull/1930))
- dont panic on settle-pnl when no position ([#1928](https://github.com/drift-labs/protocol-v2/pull/1928))

### Fixes

### Breaking

## [2.140.0] - 2025-09-29

### Features

- program: builder codes ([#1805](https://github.com/drift-labs/protocol-v2/pull/1805))

### Fixes

### Breaking

## [2.139.0] - 2025-09-25

### Features

- program: all token 22 use immutable owner ([#1904](https://github.com/drift-labs/protocol-v2/pull/1904))
- program: allow resolve perp pnl deficit if pnl pool isnt 0 but at deficit ([#1909](https://github.com/drift-labs/protocol-v2/pull/1909))
- program: auction order params account for twap divergence ([#1882](https://github.com/drift-labs/protocol-v2/pull/1882))
- program: add delegate stake if ([#1859](https://github.com/drift-labs/protocol-v2/pull/1859))

### Fixes

### Breaking

## [2.138.0] - 2025-09-22

### Features

- program: support scaled ui extension ([#1894](https://github.com/drift-labs/protocol-v2/pull/1894))
- Revert "Crispeaney/revert swift max margin ratio ([#1877](https://github.com/drift-labs/protocol-v2/pull/1877))

### Fixes

Expand Down Expand Up @@ -42,16 +143,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Breaking

## [2.135.0] - 2025-08-22

### Features

### Fixes

- program: trigger price use 5min mark price ([#1830](https://github.com/drift-labs/protocol-v2/pull/1830))

### Breaking

## [2.134.0] - 2025-08-13

### Features
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,48 @@ cargo test
bash test-scripts/run-anchor-tests.sh
```

# Development (with devcontainer)

We've provided a devcontainer `Dockerfile` to help you spin up a dev environment with the correct versions of Rust, Solana, and Anchor for program development.

Build the container and tag it `drift-dev`:
```
cd .devcontainer && docker build -t drift-dev .
```

Open a shell to the container:
```
# Find the container ID first
docker ps

# Then exec into it
docker exec -it <CONTAINER_ID> /bin/bash
```

Alternatively use an extension provided by your IDE to make use of the dev container. For example on vscode/cursor:

```
1. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
2. Type "Dev Containers: Reopen in Container"
3. Select it and wait for the container to build
4. The IDE terminal should be targeting the dev container now
```

Use the dev container as you would a local build environment:
```
# build program
anchor build

# update idl
anchor build -- --features anchor-test && cp target/idl/drift.json sdk/src/idl/drift.json

# run cargo tests
cargo test

# run typescript tests
bash test-scripts/run-anchor-tests.sh
```

# Bug Bounty

Information about the Bug Bounty can be found [here](./bug-bounty/README.md)
Loading