Skip to content

Commit

Permalink
Remove optimism holdovers
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Nov 7, 2023
1 parent 343e5e8 commit 6642dc2
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions ethd
Original file line number Diff line number Diff line change
Expand Up @@ -430,17 +430,7 @@ envmigrate() {
__adjust_NETWORK=""
for var in "${ALL_VARS[@]}"; do
value=$(sed -n -e "s/^${var}=\(.*\)/\1/p" "${ENV_FILE}.source" || true)
if [ -n "${value}" ] || [ "${var}" = "EXTRA_STATIC_NODES" ] || [ "${var}" = "SNAPSHOT" ]; then
# For goerli and mainnet, we mean op-goerli and op-mainnet
if [[ "${var}" = "NETWORK" && ( "${value}" = "goerli" || "${value}" = "mainnet" ) ]]; then
__adjust_NETWORK="${value}"
value="op-${value}"
fi
# Coming from the original Optimism Docker, replace ${NETWORK} in strings with goerli or mainnet
if [[ -n "${__adjust_NETWORK}" && ( "${var}" = "SNAPSHOT" || "${var}" = "SEQUENCER"
|| "${var}" = "LEGACY_TAR" ) ]]; then
value="${value//\$\{NETWORK\}/${__adjust_NETWORK}}"
fi
if [ -n "${value}" ] || [ "${var}" = "SNAPSHOT" ]; then
sed -i'.original' -e "s~^\(${var}\s*=\s*\).*$~\1${value}~" "${ENV_FILE}"
fi
done
Expand Down

0 comments on commit 6642dc2

Please sign in to comment.