Skip to content

Commit

Permalink
fix: set fg url in rollup.json (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
lesterli authored Nov 14, 2024
1 parent 9e40bbc commit 9122cbb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/l2/l2-op-node-restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ docker compose -f docker/docker-compose-l2.yml stop op-node
# set L2OO or DGF env vars
post_deployment_setup_env_vars $(pwd)/.deploy/op-devnet-deployments-${L2_CHAIN_ID}.json $DEVNET_L2OO

ROLLUP_CONFIG=$(pwd)/.deploy/rollup.json
# set babylonFinalityGadgetRpc in rollup.json
if [ -n "$BBN_FINALITY_GADGET_RPC" ]; then
echo "Setting babylonFinalityGadgetRpc in rollup.json with value: $BBN_FINALITY_GADGET_RPC"
sed -i.bak 's|"babylonFinalityGadgetRpc":.*|"babylonFinalityGadgetRpc": "'"$BBN_FINALITY_GADGET_RPC"'"|' $ROLLUP_CONFIG
rm $ROLLUP_CONFIG.bak
else
echo "BBN_FINALITY_GADGET_RPC is not set in the .env file. If the Finality Gadget is up, please set it to the gRPC URL and try again."
exit 1
fi

# get the babylonFinalityGadgetRpc from rollup.json
FG_URL_IN_ROLLUP=$(jq -r '.babylonFinalityGadgetRpc' $ROLLUP_CONFIG)
if [ "$FG_URL_IN_ROLLUP" != "$BBN_FINALITY_GADGET_RPC" ]; then
echo "babylonFinalityGadgetRpc in rollup.json ($FG_URL_IN_ROLLUP) is not equal to the value in .env ($BBN_FINALITY_GADGET_RPC)"
exit 1
fi

# Start the OP Node
echo "Starting the OP Node..."
docker compose -f docker/docker-compose-l2.yml up -d op-node

0 comments on commit 9122cbb

Please sign in to comment.