nabarun
034778ebeb
Part of [Create bridge channel in go-nitro](https://www.notion.so/Create-bridge-channel-in-go-nitro-22ce80a0d8ae4edb80020a8f250ea270) - Remove L2 stack setup from demo steps - Remove steps to deploy l2 contract Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Co-authored-by: Neeraj <neeraj.rtly@gmail.com> Reviewed-on: #11
49 lines
1.4 KiB
Bash
Executable File
49 lines
1.4 KiB
Bash
Executable File
#!/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_EXT_MULTIADDR: ${NITRO_EXT_MULTIADDR}"
|
|
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}"
|
|
|
|
# Create required certs
|
|
./create-certs.sh
|
|
|
|
# Create the required config file
|
|
cat <<EOF > "$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}"
|
|
publicip = "${NITRO_PUBLIC_P2P_HOST}"
|
|
extMultiAddr = "${NITRO_EXT_MULTIADDR}"
|
|
l2 = ${NITRO_L2}
|
|
|
|
naaddress = "${NA_ADDRESS}"
|
|
vpaaddress = "${VPA_ADDRESS}"
|
|
caaddress = "${CA_ADDRESS}"
|
|
EOF
|
|
|
|
# Start the node
|
|
./nitro -config $node_config_file
|