Skip to content

Commit

Permalink
Make Bridge UI optional
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier-romero committed Dec 23, 2024
1 parent c06d6b8 commit 1af8aa6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
21 changes: 11 additions & 10 deletions cdk_bridge_infra.star
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ zkevm_bridge_package = import_module("./lib/zkevm_bridge.star")
databases = import_module("./databases.star")


def run(plan, args, contract_setup_addresses):
def run(plan, args, contract_setup_addresses, deploy_bridge_ui=True):
db_configs = databases.get_db_configs(
args["deployment_suffix"], args["sequencer_type"]
)
Expand All @@ -24,16 +24,17 @@ def run(plan, args, contract_setup_addresses):
config=bridge_service_config,
)

# Start the bridge UI.
bridge_ui_config_artifact = create_bridge_ui_config_artifact(
plan, args, contract_setup_addresses
)
zkevm_bridge_package.start_bridge_ui(plan, args, bridge_ui_config_artifact)
if deploy_bridge_ui:
# Start the bridge UI.
bridge_ui_config_artifact = create_bridge_ui_config_artifact(
plan, args, contract_setup_addresses
)
zkevm_bridge_package.start_bridge_ui(plan, args, bridge_ui_config_artifact)

# Start the bridge UI reverse proxy. This is only relevant / needed if we have a fake l1
if args["use_local_l1"]:
proxy_config_artifact = create_reverse_proxy_config_artifact(plan, args)
zkevm_bridge_package.start_reverse_proxy(plan, args, proxy_config_artifact)
# Start the bridge UI reverse proxy. This is only relevant / needed if we have a fake l1
if args["use_local_l1"]:
proxy_config_artifact = create_reverse_proxy_config_artifact(plan, args)
zkevm_bridge_package.start_reverse_proxy(plan, args, proxy_config_artifact)


def create_bridge_config_artifact(plan, args, contract_setup_addresses, db_configs):
Expand Down
2 changes: 2 additions & 0 deletions input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ DEFAULT_DEPLOYMENT_STAGES = {
"deploy_cdk_central_environment": True,
# Deploy CDK bridge infrastructure.
"deploy_cdk_bridge_infra": True,
# Deploy CDK bridge UI.
"deploy_cdk_bridge_ui": True,
# Deploy the agglayer.
"deploy_agglayer": True,
# Deploy cdk-erigon node.
Expand Down
1 change: 1 addition & 0 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def run(plan, args={}):
plan,
args | {"use_local_l1": deployment_stages.get("deploy_l1", False)},
contract_setup_addresses,
deployment_stages.get("deploy_cdk_bridge_ui", True),
)
else:
plan.print("Skipping the deployment of cdk/bridge infrastructure")
Expand Down

0 comments on commit 1af8aa6

Please sign in to comment.