-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (42 loc) · 1.57 KB
/
Copy pathMakefile
File metadata and controls
51 lines (42 loc) · 1.57 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
.PHONY: build test test-vault test-registry check-interface-docs check-event-field-types test-gas-budget-check install-hooks deploy-testnet
build:
stellar contract build
# Wire scripts/hooks/pre-commit into git so `cargo fmt --check` runs before every commit (#251).
install-hooks:
git config core.hooksPath scripts/hooks
@echo "Pre-commit hook installed: cargo fmt --check now runs before every commit."
test:
cargo test
# Scope to a single crate for faster local iteration (#254).
test-vault:
cargo test -p investment-vault
test-registry:
cargo test -p project-registry
check-interface-docs:
python3 scripts/check_interface_docs.py
check-event-field-types:
python3 scripts/check_event_field_types.py
test-gas-budget-check:
python3 -m unittest discover -s scripts/tests
deploy-testnet: build
@mkdir -p deploy
@REGISTRY_ID=$$(stellar contract deploy \
--wasm target/wasm32v1-none/release/project_registry.wasm \
--source $(STELLAR_SECRET_KEY) \
--network testnet \
-- \
--admin $(ADMIN_ADDRESS) \
--whitelister $(WHITELISTER_ADDRESS)) && \
echo "ProjectRegistry: $$REGISTRY_ID" && \
VAULT_ID=$$(stellar contract deploy \
--wasm target/wasm32v1-none/release/investment_vault.wasm \
--source $(STELLAR_SECRET_KEY) \
--network testnet \
-- \
--admin $(ADMIN_ADDRESS) \
--usdc_sac $(USDC_SAC_ADDRESS) \
--registry $$REGISTRY_ID) && \
echo "InvestmentVault: $$VAULT_ID" && \
printf '{"network":"testnet","project_registry":"%s","investment_vault":"%s"}\n' \
"$$REGISTRY_ID" "$$VAULT_ID" > deploy/testnet.json && \
echo "Saved to deploy/testnet.json"