-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (41 loc) · 1.26 KB
/
Copy pathMakefile
File metadata and controls
48 lines (41 loc) · 1.26 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
.PHONY: help build test lint format clean deploy-testnet
help:
@echo "Creditedapp Contracts - Developer Commands"
@echo ""
@echo " make build Build contracts to WebAssembly"
@echo " make test Run all contract tests"
@echo " make lint Run cargo clippy"
@echo " make format Format Rust code"
@echo " make clean Clean build artifacts"
@echo " make deploy-testnet Deploy to Stellar testnet"
build:
@echo "Building Rust contracts..."
cargo build --release --target wasm32-unknown-unknown
test:
@echo "Running contract tests..."
cargo test --workspace
lint:
@echo "Running clippy..."
cargo clippy --workspace --all-targets
format:
@echo "Formatting Rust code..."
cargo fmt --all
clean:
@echo "Cleaning build artifacts..."
cargo clean
deploy-testnet:
@if [ -z "$(CREATOR)" ] || [ -z "$(TOKEN)" ] || [ -z "$(GOAL)" ] || [ -z "$(DEADLINE)" ]; then \
echo "Error: Required parameters missing"; \
echo "Usage: make deploy-testnet CREATOR=<account> TOKEN=<token_id> GOAL=<amount> DEADLINE=<unix_timestamp>"; \
exit 1; \
fi
@./scripts/deploy.sh \
"$(CREATOR)" \
"$(TOKEN)" \
"$(GOAL)" \
"$(DEADLINE)" \
"$(MIN_CONTRIBUTION)" \
"$(TITLE)" \
"$(DESCRIPTION)" \
"$(SOCIAL_LINKS)" \
"$(REGISTRY_ID)"