-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (46 loc) · 1.07 KB
/
Makefile
File metadata and controls
60 lines (46 loc) · 1.07 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
.PHONY: all init build test format snapshot anvil cast help clean
all: init build test
# Initialize submodules
init:
git submodule update --init --recursive
# Build the project
build:
forge build
# Run tests
test:
forge test
# Format code
format:
forge fmt
# Generate gas snapshots
snapshot:
forge snapshot
# Start Anvil local testnet
anvil:
anvil
# Run Cast commands
cast:
@echo "Usage: make cast ARGS='<subcommand>'"
@if [ -n "$(ARGS)" ]; then \
cast $(ARGS); \
fi
# Install dependencies
install-foundry:
@echo "Installing Foundry..."
@curl -L https://foundry.paradigm.xyz | bash
@. ~/.bashrc || . ~/.zshrc
@foundryup
install-npm:
npm install @predicate/predicate-contracts
install: install-foundry install-npm
# Clean build artifacts and cache
clean:
forge clean
rm -rf cache
rm -rf out
rm -rf node_modules
# Help target to display available commands
.PHONY: help
# Help target to display available commands
help:
@awk '/^#/{c=substr($$0,3);next}c&&/^[[:alpha:]][[:alnum:]_-]+:/{print substr($$1,1,index($$1,":")),c}1{c=0}' $(MAKEFILE_LIST) | column -s: -t