-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
62 lines (47 loc) · 1.65 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
anchor *args:
anchor {{args}}
build program:
just remove {{program}}
anchor build -p {{program}}
just copy-idl
build-all:
anchor build
just copy-idl
deploy program:
just remove-idl {{program}}
anchor build -p {{program}}
anchor deploy -p {{program}}
just copy-idl
deploy-all:
just remove-idl-all
anchor build
anchor deploy
just copy-idl
test program:
anchor run {{program}}
test-all:
anchor test --skip-build --skip-deploy --skip-local-validator
recover program:
solana-keygen recover -o ./target/deploy/intermediate-deploy-{{program}}.json -f
redeploy program:
solana program deploy --buffer ./target/deploy/intermediate-deploy-{{program}}.json --program-id ./target/deploy/{{program}}-keypair.json ./target/deploy/{{program}}.so -v
extend program amount:
solana program extend ./target/deploy/{{program}}-keypair.json {{amount}}
close program:
solana program close -k ~/.config/solana/deployer.json ./target/deploy/intermediate-deploy-{{program}}.json
remove-idl-all:
rm -f ./target/idl/*
rm -f ./target/types/*
find ./protocol/src/idl -mindepth 1 ! -name 'index.ts' -exec rm -rf {} +
remove-idl program:
rm -f ./target/idl/{{program}}.json
rm -f ./target/types/{{program}}.ts
rm -f ./protocol/src/idl/{{program}}.ts
rm -f ./protocol/src/idl/{{program}}.json
copy-idl:
cp -v ./target/idl/* ./protocol/src/idl
cp -v ./target/types/* ./protocol/src/idl
update-deps:
cargo update -p [email protected] --precise 1.18.17
run-validator:
solana-test-validator --reset --bpf-program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb ./spl/spl_token_2022.so