From 27dd43a63861b49c8ff93a97bd5b35e49d479953 Mon Sep 17 00:00:00 2001 From: wphan Date: Tue, 4 Jun 2024 16:44:11 -0700 Subject: [PATCH] fix tests --- README.md | 19 +++++++++++++++++++ tests/driftVaults.ts | 1 + ts/sdk/package.json | 4 ++-- ts/sdk/yarn.lock | 25 +++++-------------------- 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 66bb3e22..6aeedebb 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,22 @@ soon^TM [did you see the CLI?](./ts/sdk/README.md) and the [wiki?](https://github.com/drift-labs/drift-vaults/wiki) + + +# Development + +Developed using Anchor 0.26.0: +``` +avm use 0.26.0 +``` + +## Run tests +``` +cd ts/sdk +yarn +yarn build + +cd .. +export ANCHOR_WALLET=~/.config/solana/id.json +anchor test +``` \ No newline at end of file diff --git a/tests/driftVaults.ts b/tests/driftVaults.ts index 5bac3893..2f7a3fa5 100644 --- a/tests/driftVaults.ts +++ b/tests/driftVaults.ts @@ -58,6 +58,7 @@ describe('driftVaults', () => { const vaultClient = new VaultClient({ driftClient: adminClient, program: program, + cliMode: true, }); let usdcMint: Keypair; diff --git a/ts/sdk/package.json b/ts/sdk/package.json index 2b26dbe4..49b3088a 100644 --- a/ts/sdk/package.json +++ b/ts/sdk/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@drift-labs/competitions-sdk": "0.2.303", + "@drift-labs/competitions-sdk": "0.2.325", "@drift-labs/sdk": "2.83.0-beta.13", "@solana/web3.js": "1.73.2", "commander": "^11.0.0", @@ -25,4 +25,4 @@ "clean": "rm -rf lib", "build": "yarn clean && tsc" } -} +} \ No newline at end of file diff --git a/ts/sdk/yarn.lock b/ts/sdk/yarn.lock index 0f729863..cd347435 100644 --- a/ts/sdk/yarn.lock +++ b/ts/sdk/yarn.lock @@ -109,13 +109,13 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@drift-labs/competitions-sdk@0.2.303": - version "0.2.303" - resolved "https://registry.yarnpkg.com/@drift-labs/competitions-sdk/-/competitions-sdk-0.2.303.tgz#8d23b6d7899a0598f53711c965fba0295afdd93a" - integrity sha512-c3WkxLT2zvHze6WUXlX9JsBGiQ1hHgSBDz5nBsRTEYLWPiHgswv7TQvQ3sU831Ux+Mnkk+prsr9KJPOKDK7yDg== +"@drift-labs/competitions-sdk@0.2.325": + version "0.2.325" + resolved "https://registry.yarnpkg.com/@drift-labs/competitions-sdk/-/competitions-sdk-0.2.325.tgz#e625d3fb81db0f4c0f94f29a9a0b2e267b8959a0" + integrity sha512-VW+t0x2+RDI+jEdlOltuuPQweN34nkt1GpcpRJJGcgqnSrlUSqxA7PnFEhRTaHA8CEoh8WeG3SbgTAVsL48uVQ== dependencies: "@coral-xyz/anchor" "^0.26.0" - "@drift-labs/sdk" "2.82.0-beta.12" + "@drift-labs/sdk" "2.83.0-beta.13" "@solana/web3.js" "1.73.2" "@switchboard-xyz/solana.js" "^2.7.1" cerializr "^3.1.4" @@ -124,21 +124,6 @@ ts-node "^10.9.1" typescript "^5.1.6" -"@drift-labs/sdk@2.82.0-beta.12": - version "2.82.0-beta.12" - resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.82.0-beta.12.tgz#851236430458a9be43d625f88d5ac636605a6a2a" - integrity sha512-gbhn1/cuS0venSZvGFAOtfPsqbl/E6VBx66CxcpvVurDE3lmV8OjSkB58r7TzwFH1wcWXK1T3xRrr0BJ4s1FJQ== - dependencies: - "@coral-xyz/anchor" "0.28.1-beta.2" - "@ellipsis-labs/phoenix-sdk" "^1.4.2" - "@project-serum/serum" "^0.13.38" - "@pythnetwork/client" "2.5.3" - "@solana/spl-token" "^0.3.7" - "@solana/web3.js" "1.91.7" - strict-event-emitter-types "^2.0.0" - uuid "^8.3.2" - zstddec "^0.1.0" - "@drift-labs/sdk@2.83.0-beta.13": version "2.83.0-beta.13" resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.83.0-beta.13.tgz#25a78962ed59eb22c2f24927cf3a126e06dc91c0"