forked from omni-network/omni
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
54 lines (41 loc) · 1.97 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
.PHONY: help
help: ## Display this help message.
@egrep -h '\s##\s' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-30s\033[0m %s\n", $$1, $$2}'
.PHONY: version
version: ## Print tool versions.
@forge --version
@abigen --version
.PHONY: install-deps
install-deps: ## Install dependencies.
(cd avs && pnpm install --frozen-lockfile)
(cd core && pnpm install --frozen-lockfile)
go install github.com/ethereum/go-ethereum/cmd/[email protected]
.PHONY: build
build: version ## Build contracts.
forge build --force --root core
forge build --force --root avs
.PHONY: all
all: install-deps build bindings allocs ## Build contracts, generate bindings and predeploy allocations.
CORE_CONTRACTS := OmniPortal FeeOracleV1 Create3 TransparentUpgradeableProxy \
Staking Slashing OmniBridgeL1 OmniBridgeNative Omni WOmni \
PortalRegistry AllocPredeploys PingPong ProxyAdmin Admin \
OmniGasPump OmniGasStation
AVS_CONTRACTS := OmniAVS DelegationManager StrategyManager StrategyBase AVSDirectory \
avs/test/common/MockERC20.sol:MockERC20
.PHONY: bindings
bindings: check-abigen-version build ## Generate golang contract bindings.
ROOT=./core ./bindings/scripts/gen.sh $(CORE_CONTRACTS)
ROOT=./avs ./bindings/scripts/gen.sh $(CONTRACTS)
go run ./bindings/scripts/commenttypes.go -- bindings/strategymanager.go IStrategyManagerDeprecatedStructQueuedWithdrawal IStrategyManagerDeprecatedStructWithdrawerAndNonce
go run ./bindings/scripts/commenttypes.go -- bindings/avsdirectory.go ISignatureUtilsSignatureWithSaltAndExpiry
.PHONY: allocs
allocs: bindings ## Generate predeploy allocations.
go run ./allocs/scripts/genallocs.go
.PHONY: check-abigen-version
check-abigen-version: ## Check abigen version, exit(1) if not 1.13.14-stable.
@version=$$(abigen --version); \
if [ "$$version" != "abigen version 1.14.8-stable" ]; then \
echo "abigen version is not 1.14.8-stable"; \
echo "Install with go install github.com/ethereum/go-ethereum/cmd/[email protected]"; \
exit 1; \
fi