Skip to content

Commit acfb723

Browse files
feat: add Stockx extension support (#112)
* feat: update solana to 2.3.0 and anchor to 31.1 * fix: linting by allowing deprecations * fix: change to use github runner * fix: npm dependencies versions * fix: node flag for ci * fix(ci): try arm runner * feat: use litesvm 0.1.0 * feat: support stockx extensions * fix: bug in add-to-pending-basket
1 parent 4638cf0 commit acfb723

Some content is hidden

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

61 files changed

+3659
-3780
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11-
SOLANA_VERSION: 2.1.0
12-
ANCHOR_VERSION: 0.30.1
11+
SOLANA_VERSION: 2.3.0
12+
ANCHOR_VERSION: 0.31.1
13+
NODE_VERSION: 20.18.0
1314
ADMIN_PUBKEY: AXF3tTrMUD5BLzv5Fmyj63KXwvkuGdxMQemSJHtTag4j
1415
SPL_GOVERNANCE_PROGRAM_ID: HwXcHGabc19PxzYFVSfKvuaDSNpbLGL8fhVtkcTyEymj
1516

@@ -28,6 +29,11 @@ jobs:
2829
~/.avm
2930
key: ${{ runner.os }}-tools-${{ env.SOLANA_VERSION }}-${{ env.ANCHOR_VERSION }}
3031

32+
- name: Install dependencies
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y build-essential libssl-dev pkg-config libudev-dev
36+
3137
- name: Install Solana
3238
if: steps.cache-check.outputs.cache-hit != 'true'
3339
run: |
@@ -48,7 +54,7 @@ jobs:
4854
- name: Install Rust
4955
uses: dtolnay/rust-toolchain@stable
5056
with:
51-
toolchain: "nightly-2025-03-05"
57+
toolchain: "1.86.0"
5258
components: rustfmt, clippy
5359

5460
- name: Rust Format Check
@@ -69,7 +75,15 @@ jobs:
6975
- name: Install Rust
7076
uses: dtolnay/rust-toolchain@stable
7177
with:
72-
toolchain: "nightly-2025-03-05"
78+
toolchain: "1.86.0"
79+
80+
- name: Setup Node.js
81+
uses: actions/setup-node@v4
82+
with:
83+
node-version: ${{ env.NODE_VERSION }}
84+
85+
- name: Install Yarn
86+
run: npm install -g yarn
7387

7488
- name: Restore cached tools
7589
uses: actions/cache@v4
@@ -103,10 +117,7 @@ jobs:
103117
cd "$WORKSPACE"
104118
105119
# Build Folio programs
106-
npm install
107-
108-
# When anchor tries to build Idl, it uses the nightly toolchain.
109-
export RUSTUP_TOOLCHAIN=nightly-2025-03-05
120+
yarn install
110121
111122
mkdir -p target/deploy target/idl target/types
112123
anchor build --program-name folio -- --features test,dev
@@ -143,7 +154,7 @@ jobs:
143154
- name: Install Rust
144155
uses: dtolnay/rust-toolchain@stable
145156
with:
146-
toolchain: "nightly-2025-03-05"
157+
toolchain: "1.86.0"
147158

148159
- name: Restore cached tools
149160
uses: actions/cache@v4
@@ -204,14 +215,14 @@ jobs:
204215
- name: Setup Node.js
205216
uses: actions/setup-node@v4
206217
with:
207-
node-version: "20.10.0"
218+
node-version: ${{ env.NODE_VERSION }}
219+
220+
- name: Install Yarn
221+
run: npm install -g yarn
208222

209223
- name: Install npm dependencies
210224
run: |
211-
npm install
212-
npm install @metaplex-foundation/amman
213-
npm install -g @metaplex-foundation/amman
214-
npx amman --version # Verify installation
225+
yarn install
215226
216227
- name: Restore cached tools
217228
uses: actions/cache@v4
@@ -242,12 +253,12 @@ jobs:
242253

243254
- name: Run Amman Tests
244255
run: |
245-
amman start &
246-
AMMAN_PID=$!
256+
sh ./start-validator.sh &
257+
VALIDATOR_PID=$!
247258
sleep 15
248259
249260
anchor test --skip-local-validator --skip-deploy --skip-build
250261
TEST_EXIT_CODE=$?
251262
252-
kill $AMMAN_PID
263+
kill $VALIDATOR_PID
253264
exit $TEST_EXIT_CODE

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.10.0
1+
20.18.0

Anchor.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ cluster = "Localnet"
2727
wallet = "~/.config/solana/id.json"
2828

2929
[scripts]
30-
test = "tsc && yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests-ts/tests-*.ts"
30+
test = "yarn tsc && yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests-ts/tests-*.ts"
3131
# Needs to be serial https://github.com/kevinheavey/solana-bankrun/issues/2
32-
test-bankrun = "tsc && yarn ts-mocha -p ./tsconfig.json -t 1000000 --serial --recursive tests-ts/bankrun/test-runner.ts"
32+
test-bankrun = "yarn tsc && yarn ts-mocha -p ./tsconfig.json -t 1000000 --serial --recursive tests-ts/bankrun/test-runner.ts"
3333
# Anchor struggles with lock file version 4, even if it's locked at verison 3 in config.toml
3434
# seems like anchor changes it sometimes
3535
post-build = "cargo update --package cargo-lock --precise \"3\""

0 commit comments

Comments
 (0)