#!/bin/bash if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi node_config_file="/app/config.toml" echo "Using the following environment variables:" echo "NITRO_USE_DURABLE_STORE: ${NITRO_USE_DURABLE_STORE}" echo "NITRO_MSG_PORT: ${NITRO_MSG_PORT}" echo "NITRO_RPC_PORT: ${NITRO_RPC_PORT}" echo "NITRO_SC_PK: ${NITRO_SC_PK}" echo "NITRO_CHAIN_PK: ${NITRO_CHAIN_PK}" echo "NITRO_CHAIN_URL: ${NITRO_CHAIN_URL}" echo "NITRO_BOOTPEERS: ${NITRO_BOOTPEERS}" echo "NITRO_PUBLIC_P2P_HOST: ${NITRO_PUBLIC_P2P_HOST}" echo "NITRO_L2: ${NITRO_L2}" echo "Using Nitro contract addresses:" echo "NA_ADDRESS: ${NA_ADDRESS}" echo "CA_ADDRESS: ${CA_ADDRESS}" echo "VPA_ADDRESS: ${VPA_ADDRESS}" echo "BRIDGE_ADDRESS: ${BRIDGE_ADDRESS}" # Create required certs ./create-certs.sh # Create the required config file cat < "$node_config_file" usedurablestore = ${NITRO_USE_DURABLE_STORE} msgport = ${NITRO_MSG_PORT} rpcport = ${NITRO_RPC_PORT} pk = "${NITRO_SC_PK}" chainpk = "${NITRO_CHAIN_PK}" chainurl = "${NITRO_CHAIN_URL}" bootpeers = "${NITRO_BOOTPEERS}" bridgepublicip = "${NITRO_PUBLIC_P2P_HOST}" l2 = ${NITRO_L2} naaddress = "${NA_ADDRESS}" vpaaddress = "${CA_ADDRESS}" caaddress = "${VPA_ADDRESS}" bridgeaddress = "${BRIDGE_ADDRESS}" EOF # Start the node ./nitro -config $node_config_file