Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
369 commits
Select commit Hold shift + click to select a range
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
791e161
refactor(sdk: add overrides for getUpdateUserPerpPositionCustomMargin…
ChesterSim Nov 3, 2025
9cf2c3b
sdk: release v2.146.0-beta.13
github-actions[bot] 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
8bb0244
optional status for delisted markets in constants files (#2011)
moosecat2 Nov 3, 2025
41c1f4b
fix: missing check on order increasing size for depositing margin pla…
LukasDeco Nov 3, 2025
544338b
sdk: release v2.146.0-beta.14
github-actions[bot] Nov 3, 2025
4690a2e
Dlp refactor amm cache (#2010)
moosecat2 Nov 3, 2025
1785353
sdk: release v2.146.0-beta.15
github-actions[bot] Nov 3, 2025
da2bd97
consolidate some admin funcs (#2014)
moosecat2 Nov 4, 2025
a3e3551
program: add-market-settle-rev-pool-pause-operation (#2013)
0xbigz Nov 4, 2025
8c918e7
v2.146.0
wphan Nov 4, 2025
1be30c8
refactor(sdk): add overrides for getEnableHighLeverageModeIx
ChesterSim Nov 4, 2025
c376b72
Update swap client type and verbiage (#2009)
cha-kos Nov 4, 2025
f29e0dd
ui: tighten swap types (#2015)
cha-kos Nov 4, 2025
8638722
drift client lp swap bug fix
moosecat2 Nov 5, 2025
061a797
sdk: update-pyth-lazer-spot-feeds (#2017)
0xbigz Nov 5, 2025
3d343c7
fix linter
moosecat2 Nov 5, 2025
3c79a22
Revert "sdk: update-pyth-lazer-spot-feeds (#2017)"
0xbigz Nov 5, 2025
3616739
sdk: release v2.147.0-beta.0
github-actions[bot] Nov 5, 2025
53721d0
program: remove some unused deps (#2012)
jordy25519 Nov 5, 2025
2711199
migrate spot market oracles (#2020)
moosecat2 Nov 6, 2025
c0d3fc4
sdk: release v2.147.0-beta.1
github-actions[bot] Nov 6, 2025
a73f8e5
small proram tweaks (#2021)
moosecat2 Nov 6, 2025
920da96
v2.147.0
wphan Nov 7, 2025
39789d8
sdk: release v2.148.0-beta.0
github-actions[bot] Nov 7, 2025
fd5fc52
Merge branch 'master' into lukas/isolated-positions-sdk
LukasDeco Nov 7, 2025
3fce407
feat: settle pnl when trying to transfer to cross
LukasDeco Nov 7, 2025
9a37795
program: remove duplicate immutable owner code
crispheaney Nov 10, 2025
d06f9a9
pyth lazer zero guard (#2023)
moosecat2 Nov 12, 2025
056ac7a
add conditional decoding for ConstituentMap (#2022)
lowkeynicc Nov 12, 2025
dd6adb7
sdk: release v2.148.0-beta.1
github-actions[bot] Nov 12, 2025
ab48f3d
dlp admin update fee transfer scalars (#2024)
moosecat2 Nov 12, 2025
ecfab9c
v2.148.0
wphan Nov 14, 2025
c85f7ed
sdk: release v2.149.0-beta.0
github-actions[bot] Nov 14, 2025
24caec7
lukas/update margin calc to match onchain (#2007)
LukasDeco Nov 17, 2025
9db46b6
sdk: release v2.149.0-beta.1
github-actions[bot] Nov 17, 2025
16049af
fix: incorrect iso bankruptcy flag
LukasDeco Nov 17, 2025
c4d027b
feat: bump node to 22 (#2026)
LukasDeco Nov 17, 2025
d46ee21
feat: bump to node 22 github action (#2027)
LukasDeco Nov 17, 2025
8162ed3
feat: new margin calc logic
LukasDeco Nov 17, 2025
37cab1e
fix: broken test helpers
LukasDeco Nov 17, 2025
691c298
feat: better comments on user (#2028)
LukasDeco Nov 17, 2025
76cb3da
sdk: release v2.149.0-beta.2
github-actions[bot] Nov 17, 2025
0ce88db
sdk: deprecate updateUserFuelBonus
lowkeynicc Nov 17, 2025
1fab25b
sdk: release v2.149.0-beta.3
github-actions[bot] Nov 17, 2025
7b2d8d8
sdk: spot-market-35-oracle-update (#2029)
0xbigz Nov 18, 2025
6903f7a
sdk: release v2.149.0-beta.4
github-actions[bot] Nov 18, 2025
9ef804f
sdk: add optional userAccountPublicKey to getSwapIxV2 (#2030)
lowkeynicc Nov 18, 2025
73e9dff
sdk: release v2.149.0-beta.5
github-actions[bot] Nov 18, 2025
dfc4da5
sdk: fix exactOut swaps (#2031)
lowkeynicc Nov 18, 2025
3b1f84b
sdk: release v2.149.0-beta.6
github-actions[bot] Nov 18, 2025
c321769
feat: buffer adjustments
LukasDeco Nov 19, 2025
86c484a
Merge branch 'master' into lukas/isolated-positions-sdk
LukasDeco Nov 19, 2025
a898e05
fix: add missing swap ix update
LukasDeco Nov 19, 2025
c87140c
sdk: allow external signer for deposits (#1974)
lowkeynicc Nov 19, 2025
1f3971c
sdk: release v2.149.0-beta.7
github-actions[bot] Nov 19, 2025
861a759
program: calc-ref-price-offset-calc-enhance (#1786)
0xbigz Nov 19, 2025
c8d0a6b
sdk: release v2.149.0-beta.8
github-actions[bot] Nov 19, 2025
c929439
program: let anotehr signer deposit on user behalf (#1891)
crispheaney Nov 20, 2025
b1b5193
v2.149.0
wphan Nov 20, 2025
07107df
sdk: release v2.150.0-beta.0
github-actions[bot] Nov 20, 2025
6dc1c01
program: add DepositRecord::spot_balance_after (#2034)
wphan Nov 20, 2025
503d2dc
v2.149.1
wphan Nov 20, 2025
405c29b
sdk: release v2.150.0-beta.0
github-actions[bot] Nov 20, 2025
f1c97df
sdk: idl diff (#2033)
wphan Nov 20, 2025
16eb598
sdk: release v2.150.0-beta.1
github-actions[bot] Nov 20, 2025
aa80934
sdk: add-constants-spot-market-index-61 (#2036)
0xbigz Nov 20, 2025
c74d5e9
sdk: release v2.150.0-beta.2
github-actions[bot] Nov 20, 2025
48a4f5a
fix: undefined this on isoalted free collateral
LukasDeco Nov 21, 2025
cf57ca0
fix: prettier broke
LukasDeco Nov 21, 2025
d4629cd
fix: handle perp buying power on new iso position
LukasDeco Nov 21, 2025
234910f
fix: try/catch wrap on user isolated get free collat
LukasDeco Nov 21, 2025
aa50f63
sdk: add-const-market-index-83 (#2040)
0xbigz Nov 24, 2025
b04bf25
sdk: release v2.150.0-beta.3
github-actions[bot] Nov 24, 2025
228ced3
feat: try settle flag for transfer to iso perp
LukasDeco Nov 24, 2025
107b041
fix: undefined on getting isolated free collateral + positionType par…
LukasDeco Nov 25, 2025
ef8aacb
sdk: release v2.150.0-beta.4
github-actions[bot] Nov 25, 2025
23242f9
fix: properly handle perp buying power existing iso position increase
LukasDeco Nov 25, 2025
5496b82
Merge branch 'master' into lukas/isolated-positions-sdk
LukasDeco Nov 25, 2025
735db5d
fix: force positionflag to 0 (#2041)
LukasDeco Nov 26, 2025
0dbaa1c
sdk: release v2.150.0-beta.5
github-actions[bot] Nov 26, 2025
b0c3eb1
refactor(sdk): remove event listeners during user unsubscribe (#2044)
ChesterSim Dec 1, 2025
b5aa40b
sdk: release v2.150.0-beta.6
github-actions[bot] Dec 1, 2025
91ed28c
program: update-low-risk-order-criteria (#2042)
0xbigz Dec 1, 2025
4cfa5a2
Merge branch 'master' into lukas/isolated-positions-sdk
LukasDeco Dec 1, 2025
a6b9d0d
feat: alpha npm version
LukasDeco Dec 1, 2025
7c2a32d
sdk: sync-ref-price-logic-w-prgm (#2043)
0xbigz Dec 1, 2025
a15a08d
sdk: release v2.150.0-beta.7
github-actions[bot] Dec 1, 2025
f506253
program: reset lp fields in update_user_idle (#2018)
crispheaney Dec 1, 2025
a53ee3d
cargo fmt --
crispheaney Dec 1, 2025
b66be8b
program: add logs for restting lp fields
crispheaney Dec 1, 2025
60a00f1
v2.150.0
wphan Dec 1, 2025
fd24fde
sdk: release v2.151.0-beta.0
github-actions[bot] Dec 1, 2025
9dc172c
sdk: add spot 62 to constants file (#2045)
0xbigz Dec 2, 2025
7ecd59d
sdk: release v2.151.0-beta.1
github-actions[bot] Dec 2, 2025
07406b4
fix: decoding isolated scaled balance incorrectly maybe
LukasDeco Dec 2, 2025
e4c1f23
fix: build error rm lp field
LukasDeco Dec 3, 2025
73ee530
fix: decoding isolated position fields correctly (#2046)
LukasDeco Dec 3, 2025
b7f5a60
sdk: release v2.151.0-beta.2
github-actions[bot] Dec 3, 2025
df87570
program: add paused operations to user stats (#2037)
crispheaney Dec 3, 2025
83a6d03
program: remove updating user.max_margin_ratio in update_perp_positio…
crispheaney Dec 3, 2025
ba82b2e
sdk: release v2.151.0-beta.3
github-actions[bot] Dec 3, 2025
a0648b1
v2.151.0
wphan Dec 4, 2025
c79b06d
sdk: release v2.152.0-beta.0
github-actions[bot] Dec 4, 2025
627b7c9
sdk: update user stats paused ops
crispheaney Dec 4, 2025
afc9651
sdk: release v2.152.0-beta.1
github-actions[bot] Dec 4, 2025
a0e50f9
ui: support proxy url in titan client (#2048)
cha-kos Dec 5, 2025
0c1bb26
sdk: release v2.152.0-beta.2
github-actions[bot] Dec 5, 2025
331722d
Merge branch 'master' into lukas/isolated-positions-sdk
LukasDeco Dec 9, 2025
6a8d720
feat: publish isPerpPositionIsolated as public method
LukasDeco Dec 15, 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"
}
}
12 changes: 6 additions & 6 deletions .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 Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "20.18.x"
node-version: "22.14.x"
registry-url: "https://registry.npmjs.org"
- name: Install yarn
run: yarn
Expand All @@ -89,7 +89,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "20.18.x"
node-version: "22.14.x"
registry-url: "https://registry.npmjs.org"
- name: Install yarn
run: yarn
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "20.18.x"
node-version: "22.14.x"
registry-url: "https://registry.npmjs.org"

- name: Setup yarn
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "20.18.x"
node-version: "22.14.x"
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "20.18.x"
node-version: "22.14.x"
registry-url: "https://registry.npmjs.org"
- name: Build sdk
run: yarn
Expand Down
Empty file added =
Empty file.
Loading