forked from mergemint-mint/mergemint-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (36 loc) · 1.22 KB
/
Copy pathMakefile
File metadata and controls
44 lines (36 loc) · 1.22 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
.PHONY: build test lint fmt deploy bindings clean help
## Build the contract for WASM target
build:
cargo build --release --target wasm32-unknown-unknown
## Run the full test suite
test:
cargo test
## Run Clippy linter (warnings as errors) and check formatting
lint:
cargo clippy -- -D warnings && cargo fmt --check
## Auto-format all source files with rustfmt
fmt:
cargo fmt
## Deploy the contract using the deploy script
deploy:
./scripts/deploy.sh
## Generate TypeScript bindings from the compiled WASM
bindings: build
mkdir -p sdk/generated
stellar contract bindings typescript \
--wasm target/wasm32-unknown-unknown/release/mergemint_contracts.wasm \
--output-dir sdk/generated
## Remove build artifacts and generated bindings
clean:
cargo clean
rm -rf sdk/generated
help:
@echo "Available targets:"
@echo " make build - Build WASM contract"
@echo " make test - Run test suite"
@echo " make lint - Run Clippy and check formatting"
@echo " make fmt - Auto-format source files"
@echo " make deploy - Deploy contract via scripts/deploy.sh"
@echo " make bindings - Generate TypeScript bindings"
@echo " make clean - Clean build artifacts"
@echo " make help - Show this help"