forked from base-org/contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (30 loc) · 903 Bytes
/
Makefile
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
include .env
##
# Solidity Setup / Testing
##
.PHONY: install-foundry
install-foundry:
curl -L https://foundry.paradigm.xyz | bash
~/.foundry/bin/foundryup
.PHONY: deps
deps: clean-lib checkout-op-commit
forge install --no-git github.com/foundry-rs/forge-std \
github.com/OpenZeppelin/openzeppelin-contracts@v4.9.3 \
github.com/OpenZeppelin/openzeppelin-contracts-upgradeable@v4.7.3 \
github.com/rari-capital/solmate@8f9b23f8838670afda0fd8983f2c41e8037ae6bc
.PHONY: test
test:
forge test --ffi -vvv
.PHONY: clean-lib
clean-lib:
rm -rf lib
.PHONY: checkout-op-commit
checkout-op-commit:
[ -n "$(OP_COMMIT)" ] || (echo "OP_COMMIT must be set in .env" && exit 1)
rm -rf lib/optimism
mkdir -p lib/optimism
cd lib/optimism; \
git init; \
git remote add origin https://github.com/ethereum-optimism/optimism.git; \
git fetch --depth=1 origin $(OP_COMMIT); \
git reset --hard FETCH_HEAD