forked from QuorumCredit/QuorumCredit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (27 loc) · 1.41 KB
/
Makefile
File metadata and controls
34 lines (27 loc) · 1.41 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
.PHONY: build test deploy-testnet deploy-mainnet
# ── Config ────────────────────────────────────────────────────────────────────
CONTRACT_DIR := QuorumCredit
WASM_TARGET := wasm32-unknown-unknown
# ── Targets ───────────────────────────────────────────────────────────────────
## Compile the contract (native + WASM release build)
build:
cd $(CONTRACT_DIR) && cargo build --target $(WASM_TARGET) --release
## Run the full test suite
test:
cd $(CONTRACT_DIR) && cargo test
## Deploy to Stellar testnet
deploy-testnet:
stellar contract deploy \
--wasm $(CONTRACT_DIR)/target/$(WASM_TARGET)/release/quorum_credit.wasm \
--network testnet \
--source $(DEPLOYER_SECRET_KEY)
## Deploy to Stellar mainnet — requires interactive confirmation
deploy-mainnet:
@echo "WARNING: You are about to deploy to MAINNET."
@read -p "Are you sure you want to deploy to MAINNET? [y/N]: " confirm && \
[ "$${confirm:-N}" = "y" ] || [ "$${confirm:-N}" = "Y" ] || \
(echo "Deployment aborted."; exit 1)
stellar contract deploy \
--wasm $(CONTRACT_DIR)/target/$(WASM_TARGET)/release/quorum_credit.wasm \
--network mainnet \
--source $(DEPLOYER_SECRET_KEY)