-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (63 loc) · 1.61 KB
/
Makefile
File metadata and controls
75 lines (63 loc) · 1.61 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.PHONY: install build test clean deploy help
# Default target
help:
@echo "Steer Vault Template - Available Commands:"
@echo ""
@echo " make install - Install dependencies"
@echo " make build - Compile contracts"
@echo " make test - Run all tests"
@echo " make test-v - Run tests with verbose output"
@echo " make coverage - Generate coverage report"
@echo " make clean - Clean build artifacts"
@echo " make format - Format code"
@echo " make lint - Lint code"
@echo ""
# Install dependencies
install:
@echo "Installing dependencies..."
forge install OpenZeppelin/openzeppelin-contracts@v5.0.0 --no-commit
forge install OpenZeppelin/openzeppelin-contracts-upgradeable@v5.0.0 --no-commit
@echo "Dependencies installed!"
# Build contracts
build:
@echo "Building contracts..."
forge build
@echo "Build complete!"
# Run tests
test:
@echo "Running tests..."
forge test
# Run tests with verbose output
test-v:
@echo "Running tests (verbose)..."
forge test -vvv
# Run specific test
test-match:
@echo "Running specific test..."
@read -p "Enter test name: " test_name; \
forge test --match-test $$test_name -vvv
# Generate coverage report
coverage:
@echo "Generating coverage report..."
forge coverage
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
forge clean
rm -rf cache out
# Format code
format:
@echo "Formatting code..."
forge fmt
# Lint code
lint:
@echo "Linting code..."
forge fmt --check
# Gas report
gas:
@echo "Generating gas report..."
forge test --gas-report
# Snapshot
snapshot:
@echo "Creating gas snapshot..."
forge snapshot