Skip to content

Commit 11c2290

Browse files
Keszey DánielKeszey Dániel
authored andcommitted
dynamic naming
1 parent 290046f commit 11c2290

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/blockscout/blockscout_launcher.star

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def launch_blockscout(
132132
network_params,
133133
global_node_selectors,
134134
blockscout_service,
135+
nth_blockscout,
135136
)
136137
plan.add_service(frontend_service_name, config_frontend)
137138
return blockscout_url
@@ -245,7 +246,17 @@ def get_config_frontend(
245246
network_params,
246247
node_selectors,
247248
blockscout_service,
249+
nth_blockscout,
248250
):
251+
252+
# Determine network name based on nth_blockscout
253+
if nth_blockscout == 0:
254+
network_name = "Gwyneth L1"
255+
else:
256+
# For L2, use L2A, L2B, etc. based on nth_blockscout
257+
l2_suffix = chr(ord('A') + nth_blockscout - 1) # Convert 1 to A, 2 to B, etc.
258+
network_name = "Gwyneth L2{}".format(l2_suffix)
259+
249260
return ServiceConfig(
250261
image=shared_utils.docker_cache_image_calc(
251262
docker_cache_params,
@@ -255,7 +266,7 @@ def get_config_frontend(
255266
env_vars={
256267
"NEXT_PUBLIC_API_PROTOCOL": "http",
257268
"NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL": "ws",
258-
"NEXT_PUBLIC_NETWORK_NAME": "Gwyneth",
269+
"NEXT_PUBLIC_NETWORK_NAME": network_name,
259270
"NEXT_PUBLIC_NETWORK_ID": network_params.network_id,
260271
"NEXT_PUBLIC_NETWORK_RPC_URL": el_client_rpc_url,
261272
"NEXT_PUBLIC_APP_HOST": "0.0.0.0",

0 commit comments

Comments
 (0)