forked from metaDAOproject/futarchy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
45 lines (31 loc) · 2.23 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
34
35
36
37
38
39
40
41
42
43
44
45
test:
find programs tests futarchy-ts | entr -s 'clear && RUST_LOG= anchor test'
test-no-build:
find programs tests futarchy-ts | entr -sc 'RUST_LOG= anchor test --skip-build'
# build-verifiable autocrat_v0
build-verifiable PROGRAM_NAME:
solana-verify build --library-name {{ PROGRAM_NAME }} -b ellipsislabs/solana:1.16.10
deploy PROGRAM_NAME CLUSTER:
solana program deploy -u {{ CLUSTER }} --program-id ./target/deploy/{{ PROGRAM_NAME }}-keypair.json ./target/deploy/{{ PROGRAM_NAME }}.so --final && PROGRAM_ID=$(solana-keygen pubkey ./target/deploy/{{ PROGRAM_NAME }}-keypair.json) && anchor idl init --filepath ./target/idl/{{ PROGRAM_NAME }}.json $PROGRAM_ID --provider.cluster {{ CLUSTER }}
upgrade PROGRAM_NAME PROGRAM_ID CLUSTER:
anchor upgrade ./target/deploy/{{ PROGRAM_NAME }}.so -p {{ PROGRAM_ID }} --provider.cluster {{ CLUSTER }}
upgrade-idl PROGRAM_NAME PROGRAM_ID CLUSTER:
anchor idl upgrade --filepath ./target/idl/{{ PROGRAM_NAME }}.json {{ PROGRAM_ID }} --provider.cluster {{ CLUSTER }}
bankrun:
(find programs && find tests) | entr -csr 'anchor build -p autocrat && RUST_LOG= yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/autocrat.ts'
test-amm:
find programs tests | entr -csr 'anchor build -p amm && RUST_LOG= yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/amm.ts'
test-amm-logs:
find programs tests | entr -csr 'anchor build -p amm && yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/amm.ts'
bankrun-vault:
(find programs && find tests) | entr -csr 'anchor build -p conditional_vault && RUST_LOG= yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/conditionalVault.ts'
bankrun-migrator:
(find programs && find tests) | entr -csr 'anchor build -p autocrat_migrator && RUST_LOG= yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/migrator.ts'
bankrun-vault-logs:
(find programs && find tests) | entr -csr 'anchor build -p conditional_vault && yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/conditionalVault.ts'
bankrun-logs:
(find programs && find tests) | entr -csr 'anchor build -p autocrat_v0 && yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/autocratV0.ts'
build-amm:
(find programs) | entr -s 'anchor build -p amm'
build:
(find programs) | entr -s 'anchor build'