This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
89 lines (64 loc) · 2.3 KB
/
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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# ==============================================================================
# Deployment
NETWORK ?= auto
OUTPUT ?= ./out
deploy-ipc:
./ops/deploy.sh $(NETWORK)
compile-abi: | forge
./ops/compile-abi.sh $(OUTPUT)
rust-binding:
BUILD_BINDINGS=1 cargo build --release --manifest-path ./binding/Cargo.toml -p ipc_actors_abis
# ==============================================================================
# Running security checks within the local computer
slither:
slither . --config-file ./slither.config.json
check-gateway:
docker run --rm -v $(shell pwd):/app -w /app mythril/myth:latest -v4 analyze --solc-json remappings.json ./src/Gateway.sol --solv 0.8.19
check-subnet:
docker run --rm -v $(shell pwd):/app -w /app mythril/myth:latest -v4 analyze --solc-json remappings.json ./src/SubnetActor.sol --solv 0.8.19
# ==============================================================================
# Development support
lint:
solhint 'src/**/*.sol'
fmt:
npx prettier --check -w 'src/**/*.sol' 'test/*.sol'
build: | forge
forge build
test:
forge test -vvv --ffi
install-dev: install-npm-package install-eth-abi
install-npm-package:
npm install --save-dev
install-eth-abi:
curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py && rm get-pip.py && python3 -m pip install eth_abi
check-rust-binding:
cargo fmt --manifest-path ./binding/Cargo.toml && \
cargo clippy --manifest-path ./binding/Cargo.toml && \
./ops/check-rust-binding.sh
commit-rust-binding:
./ops/commit-rust-binding.sh
commit-abi:
./ops/commit-abi.sh
storage:
rm -rf ./cache
rm -rf ./cache_hardhat
npx hardhat storage-layout --update
clean:
rm -rf ./artifacts
rm -rf ./cache
rm -rf ./cache_hardhat
rm -rf ./typechain
coverage: | forge
forge coverage --ffi --report lcov -C ./src
genhtml -o coverage_report lcov.info --branch-coverage
./tools/check_coverage.sh
prepare: fmt lint test slither
# Forge is used by the ipc-solidity-actors compilation steps.
.PHONY: forge
forge:
@if [ -z "$(shell which forge)" ]; then \
echo "Please install Foundry. See https://book.getfoundry.sh/getting-started/installation"; \
exit 1; \
fi
# ==============================================================================
.PHONY: deploy-ipc lint fmt check-subnet slither check-gateway test prepare storage build clean