-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (44 loc) · 1.29 KB
/
Makefile
File metadata and controls
55 lines (44 loc) · 1.29 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
# ---------------------------------------------------
# Load environment variables from .env if present
# ---------------------------------------------------
ifneq (,$(wildcard ./.env))
include .env
export
endif
# ---------------------------------------------------
# Default target when you just run `make`
# ---------------------------------------------------
.DEFAULT_GOAL := help
# ---------------------------------------------------
# Variables (override in your .env if needed)
# ---------------------------------------------------
RPC_URL ?= https://sepolia.infura.io/v3/YOUR_KEY
PRIVATE_KEY ?= 0xyourprivatekey
DEPLOY_SCRIPT ?= script/Deploy.s.sol
# ---------------------------------------------------
# Targets
# ---------------------------------------------------
## format: Format Solidity code using forge fmt
format:
forge fmt
## build: Compile the contracts
build:
forge build
## test: Run all tests with verbosity
test:
forge test -vvv
## deploy: Run the deployment script
deploy:
forge script $(DEPLOY_SCRIPT) \
--rpc-url $(RPC_URL) \
--private-key $(PRIVATE_KEY) \
--broadcast
## clean: Clean the build artifacts
clean:
forge clean
## help: Show available commands
help:
@echo ""
@echo "Available commands:"
@grep -E '^##' Makefile | sed 's/## //'
@echo ""