forked from TTL-Legacy/TTL-Legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
86 lines (64 loc) · 3.55 KB
/
Copy pathJustfile
File metadata and controls
86 lines (64 loc) · 3.55 KB
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
84
85
86
# TTL-Legacy Justfile
# Run `just` or `just --list` to see all available targets.
# Install just: https://just.systems/man/en/packages.html
# Default: list all targets
default:
@just --list
# ── Build ─────────────────────────────────────────────────────────────────────
# Build both Soroban contracts for wasm32 release
build:
@echo "Building TTL-Legacy contracts..."
cargo build --target wasm32-unknown-unknown --release --manifest-path contracts/ttl_vault/Cargo.toml
cargo build --target wasm32-unknown-unknown --release --manifest-path contracts/zk_verifier/Cargo.toml
@echo "Build complete."
# ── Test ──────────────────────────────────────────────────────────────────────
# Run the full ttl_vault test suite
test:
@echo "Running TTL-Legacy tests..."
cargo test --manifest-path contracts/ttl_vault/Cargo.toml
@echo "All tests passed."
# ── Lint / Quality ────────────────────────────────────────────────────────────
# Run clippy (warnings treated as errors, matching CI)
clippy:
cargo clippy --package ttl-vault -- -D warnings
# Check code formatting
fmt-check:
cargo fmt --all -- --check
# Auto-format all code
fmt:
cargo fmt --all
# ── Security ──────────────────────────────────────────────────────────────────
# Run cargo-audit (install with: cargo install cargo-audit)
audit:
cargo audit --deny warnings
# ── Deploy ────────────────────────────────────────────────────────────────────
# Deploy to Stellar testnet (prompts if a contract already exists)
deploy-testnet:
./scripts/deploy_testnet.sh
# Force-redeploy to testnet without confirmation prompt
deploy-testnet-force:
./scripts/deploy_testnet.sh --force
# Deploy to Stellar mainnet (requires STELLAR_MAINNET_RPC_URL; prompts for confirmation)
deploy-mainnet:
./scripts/deploy_mainnet.sh
# Force-redeploy to mainnet without the existing-contract prompt
deploy-mainnet-force:
./scripts/deploy_mainnet.sh --force
# ── Docker ────────────────────────────────────────────────────────────────────
# Start local dev stack (PostgreSQL, backend, Stellar Quickstart)
docker-up:
docker-compose up -d
# Stop and remove local dev stack containers
docker-down:
docker-compose down
# ── Helpers ───────────────────────────────────────────────────────────────────
# Run build + test + clippy in one shot (useful before opening a PR)
ci: build test clippy
# Copy .env.example to .env (skips if .env already exists)
env-setup:
@if [ -f .env ]; then \
echo ".env already exists — skipping."; \
else \
cp .env.example .env; \
echo "Created .env from .env.example. Fill in your values."; \
fi