forked from openbook-dex/openbook-v2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
33 lines (24 loc) · 1.11 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
fuzz-toolchain := if `arch` == "arm64" { "+nightly-2023-04-01-x86_64-apple-darwin" } else { "+nightly-2023-04-01" }
build:
cargo build-sbf --features enable-gpl
lint:
cargo clippy --no-deps --tests --features enable-gpl --features test-bpf -- --allow=clippy::result-large-err
test TEST_NAME:
cargo test-sbf --features enable-gpl -- {{ TEST_NAME }}
test-all:
(cd ./programs/openbook-v2 && RUST_LOG=ERROR cargo test-sbf --features enable-gpl)
test-dev:
(find programs) | entr -s 'just test-all'
idl:
anchor build --arch sbf -- --features enable-gpl
bash {{ justfile_directory() }}/idl-fixup.sh
cp -v ./target/types/openbook_v2.ts ./ts/client/src/openbook_v2.ts
cp -v ./target/idl/openbook_v2.json ./idl/openbook_v2.json
yarn lint --fix
yarn format
fuzz:
cd ./programs/openbook-v2/fuzz && cargo {{ fuzz-toolchain }} fuzz run --strip-dead-code multiple_orders
fuzz-reproduce CASE:
cd ./programs/openbook-v2/fuzz && RUST_LOG=debug cargo {{ fuzz-toolchain }} fuzz run --strip-dead-code multiple_orders {{ CASE }}
publish:
yarn format && yarn lint && yarn build && npm publish