-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjustfile
83 lines (64 loc) · 2.09 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Prints the list of recipes.
default:
@just --list
# Builds the whole project.
build:
cargo build
# Build all schemas
schemas:
scripts/build_schemas.sh
# Tests the whole project.
test:
cargo test
# Alias to the format recipe.
fmt:
@just format
# Formats the rust, toml and sh files in the project.
format:
cargo fmt --all
find . -type f -iname "*.toml" -print0 | xargs -0 taplo format
find . -type f -name '*.sh' -exec shfmt -w {} \;
scripts/utils/format_md.sh
# Runs clippy with the a feature flag if provided.
lint:
cargo clippy --all -- -D warnings
# Tries to fix clippy issues automatically.
lintfix:
cargo clippy --fix --allow-staged --allow-dirty --all-features
just format
# Checks the whole project with all the feature flags.
check-all:
cargo check --all-features
# Cargo check.
check:
cargo check
# Cargo clean and update.
refresh:
cargo clean && cargo update
# Cargo watch.
watch:
cargo watch -x lcheck
# Watches tests with the a feature flag if provided.
watch-test FEATURE='':
cargo watch -x "nextest run"
# Compiles and optimizes the contracts.
optimize:
scripts/build_release.sh
# Prints the artifacts versions on the current commit.
get-artifacts-versions:
scripts/get_artifacts_versions.sh --skip-verbose
# Prints the artifacts size. Optimize should be called before.
get-artifacts-size:
scripts/check_artifacts_size.sh
# Installs the env loader locally.
install-env-loader:
scripts/deployment/deploy_env/add_load_chain_env_alias.sh
# Deploys MANTRA Dex on the given CHAIN, default is mantra-testnet.
deploy CHAIN='mantra-testnet' CONTRACT='all':
./scripts/deployment/deploy_mantra_dex.sh -c {{CHAIN}} -d {{CONTRACT}}
# Stores the MANTRA Dex contracts on the given CHAIN, default is mantra-testnet.
store CHAIN='mantra-testnet' CONTRACT='all':
./scripts/deployment/deploy_mantra_dex.sh -c {{CHAIN}} -s {{CONTRACT}}
# Deploys a pool on MANTRA Dex on the given CHAIN, default is mantra-testnet.
deploy-pool CHAIN='mantra-testnet' POOL_FILE='pool.json' AMOUNTS='':
./scripts/deployment/deploy_pool.sh -c {{CHAIN}} -p {{POOL_FILE}} -a {{AMOUNTS}}