Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Marketen committed Jul 23, 2024
1 parent 8b19b56 commit 5377819
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions validator/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ SIGNER_API_URL=$(get_signer_api_url "${NETWORK}" "${SUPPORTED_NETWORKS}")
BEACON_API_URL=$(get_beacon_api_url "${NETWORK}" "${SUPPORTED_NETWORKS}" "${CLIENT}")
MEVBOOST_FLAG=$(get_mevboost_flag "${MEVBOOST_FLAG_KEY}" "${SKIP_MEVBOOST_URL}")

# Extract the hostname from BEACON_API_URL and append port 4000
BEACON_API_4000="$(echo "$BEACON_API_URL" | cut -d'/' -f3 | cut -d':' -f1):4000"
# Extract base URL. This assumes BEACON_API_URL will has the following format: http://<domain>:<port>
# Example: http://localhost:4000 -> localhost
BASE_URL="$(echo "$BEACON_API_URL" | cut -d'/' -f3 | cut -d':' -f1)"

# Prepare API endpoints (no http:// prefix && add port)
BEACON_API_4000="${BASE_URL}:4000"
BEACON_API_GATEWAY_PROVIDER="${BASE_URL}:3500"

case "$NETWORK" in
"holesky")
Expand Down Expand Up @@ -44,7 +49,7 @@ exec /validator \
--wallet-dir="${WALLET_DIR}" \
--monitoring-host 0.0.0.0 \
--beacon-rpc-provider="${BEACON_API_4000}" \
--beacon-rpc-gateway-provider="${BEACON_API_URL}" \
--beacon-rpc-gateway-provider="${BEACON_API_GATEWAY_PROVIDER}" \
--validators-external-signer-url="${SIGNER_API_URL}" \
--grpc-gateway-host=0.0.0.0 \
--grpc-gateway-port="${VALIDATOR_API_PORT}" \
Expand Down

0 comments on commit 5377819

Please sign in to comment.