Skip to content
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export OPERATOR_ADDRESS ?= $(shell yq -r '.operator.address' $(CONFIG_FILE))
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml

OPERATOR_VERSION=v0.13.0
EIGEN_SDK_GO_VERSION_TESTNET=v0.2.0-beta.1
EIGEN_SDK_GO_VERSION_MAINNET=v0.1.13

ifeq ($(OS),Linux)
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
Expand All @@ -29,6 +31,16 @@ endif
ifeq ($(OS),Darwin)
BUILD_OPERATOR = $(MAKE) build_operator_macos
endif

ifeq ($(ENVIRONMENT), devnet)
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_devnet
else ifeq ($(ENVIRONMENT), testnet)
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_testnet
else ifeq ($(ENVIRONMENT), mainnet)
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_mainnet
else
GET_SDK_VERSION = $(MAKE) operator_set_eigen_sdk_go_version_error
endif


FFI_FOR_RELEASE ?= true
Expand Down Expand Up @@ -141,6 +153,7 @@ anvil_start_with_block_time_with_more_prefunded_accounts:
_AGGREGATOR_:

aggregator_start:
$(GET_SDK_VERSION)
@echo "Starting Aggregator..."
@go run aggregator/cmd/main.go --config $(AGG_CONFIG_FILE) \
2>&1 | zap-pretty
Expand All @@ -156,15 +169,31 @@ test_go_retries:
__OPERATOR__:

operator_start:
$(GET_SDK_VERSION)
@echo "Starting Operator..."
go run operator/cmd/main.go start --config $(CONFIG_FILE) \
2>&1 | zap-pretty

operator_set_eigen_sdk_go_version_testnet:
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_TESTNET)"
go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_TESTNET)

operator_set_eigen_sdk_go_version_devnet: operator_set_eigen_sdk_go_version_mainnet

operator_set_eigen_sdk_go_version_mainnet:
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_MAINNET)"
go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_MAINNET)

operator_set_eigen_sdk_go_version_error:
@echo "Error setting Eigen SDK version, missing ENVIRONMENT"
exit 1
Comment thread
Oppen marked this conversation as resolved.

operator_full_registration: operator_get_eth operator_register_with_eigen_layer operator_mint_mock_tokens operator_deposit_into_mock_strategy operator_whitelist_devnet operator_register_with_aligned_layer

operator_register_and_start: operator_full_registration operator_start

build_operator: deps
$(GET_SDK_VERSION)
$(BUILD_OPERATOR)

build_operator_macos:
Expand All @@ -178,6 +207,7 @@ build_operator_linux:
@echo "Operator built into /operator/build/aligned-operator"

update_operator:
$(GET_SDK_VERSION)
@echo "Updating Operator..."
@./scripts/fetch_latest_release.sh
@make build_operator
Expand Down