forked from SO4-Markets/contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.mk
More file actions
60 lines (52 loc) · 1.51 KB
/
Copy pathcommon.mk
File metadata and controls
60 lines (52 loc) · 1.51 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
# Shared Make settings for SO4.market contract operations.
SHELL := bash
.SHELLFLAGS := --noprofile --norc -eu -o pipefail -c
.ONESHELL:
NETWORK ?= testnet
SOURCE ?= alice
CONTRACT ?= deposit_handler
DEPLOY_DIR ?= .deployed
DEPLOY_ENV ?= $(DEPLOY_DIR)/$(NETWORK).env
TOKEN_ENV ?= $(DEPLOY_DIR)/tokens-$(NETWORK).env
# Stellar CLI v23+ writes SDK 23+ builds to wasm32v1-none. Older local builds in
# this repo used wasm32-unknown-unknown, so keep the target configurable.
WASM_TARGET ?= wasm32v1-none
WASM_PROFILE ?= release
WASM_DIR ?= target/$(WASM_TARGET)/$(WASM_PROFILE)
CONTRACTS := \
role_store \
data_store \
oracle \
test_token \
test_faucet \
market_token \
market_factory \
deposit_vault \
deposit_handler \
withdrawal_vault \
withdrawal_handler \
order_vault \
order_handler \
liquidation_handler \
adl_handler \
fee_handler \
referral_storage \
reader \
exchange_router \
market_util_reader \
fee_batch_sweeper \
insurance_fund_router \
order_cleanup
.PHONY: preflight print-config help-mx
preflight:
@command -v stellar >/dev/null || { printf '%s\n' 'stellar CLI not found. Install stellar-cli first.'; exit 1; }
@command -v cargo >/dev/null || { printf '%s\n' 'cargo not found. Install Rust first.'; exit 1; }
print-config:
@printf 'NETWORK=%s\n' '$(NETWORK)'
@printf 'SOURCE=%s\n' '$(SOURCE)'
@printf 'CONTRACT=%s\n' '$(CONTRACT)'
@printf 'DEPLOY_ENV=%s\n' '$(DEPLOY_ENV)'
@printf 'TOKEN_ENV=%s\n' '$(TOKEN_ENV)'
@printf 'WASM_DIR=%s\n' '$(WASM_DIR)'
help-mx:
@sed -n '1,220p' mx/README.md