Prathamesh Musale
ceae9fe8d4
Part of [Create bridge channel in go-nitro](https://www.notion.so/Create-bridge-channel-in-go-nitro-22ce80a0d8ae4edb80020a8f250ea270) - Remove `go-nitro` repo from `bridge` and `nitro-node` stacks - Add a separate image for Nitro contracts deployment - Update `go-nitro` Dockerfile to: - Fetch `nitro` and `bridge` binaries from <https://git.vdb.to/cerc-io/nitro> instead of building from source - Use `ubuntu:latest` as base image instead of `deban:bullsye-slim` - Update `nitro-client` Dockerfile to: - Install `nitro-rpc-client` package from `git.vdb.to/cerc-io` instead of building from source Co-authored-by: Adw8 <adwaitgharpure@gmail.com> Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Reviewed-on: #12 Co-authored-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to> Co-committed-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to>
47 lines
1.4 KiB
Bash
Executable File
47 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
|
set -x
|
|
fi
|
|
|
|
nitro_addresses_file="/app/deployment/nitro-addresses.json"
|
|
bridge_config_file="/app/bridge.toml"
|
|
|
|
echo "Using the following environment variables:"
|
|
echo "NITRO_CHAIN_URL: ${NITRO_CHAIN_URL}"
|
|
echo "NITRO_CHAIN_PK: ${NITRO_CHAIN_PK}"
|
|
echo "NITRO_SC_PK: ${NITRO_SC_PK}"
|
|
echo "NITRO_L1_MSG_PORT: ${NITRO_L1_MSG_PORT}"
|
|
echo "NITRO_L2_MSG_PORT: ${NITRO_L2_MSG_PORT}"
|
|
echo "NITRO_RPC_PORT: ${NITRO_RPC_PORT}"
|
|
echo "NITRO_PUBLIC_P2P_HOST: ${NITRO_PUBLIC_P2P_HOST}"
|
|
echo "NITRO_L1_EXT_MULTIADDR: ${NITRO_L1_EXT_MULTIADDR}"
|
|
echo "NITRO_L2_EXT_MULTIADDR: ${NITRO_L2_EXT_MULTIADDR}"
|
|
echo "NA_ADDRESS: ${NA_ADDRESS}"
|
|
echo "CA_ADDRESS: ${CA_ADDRESS}"
|
|
echo "VPA_ADDRESS: ${VPA_ADDRESS}"
|
|
|
|
# Create required certs
|
|
./create-certs.sh
|
|
|
|
# Create the bridge config file
|
|
cat <<EOF > "$bridge_config_file"
|
|
chainpk = "$NITRO_CHAIN_PK"
|
|
statechannelpk = "$NITRO_SC_PK"
|
|
l1chainurl = "$NITRO_CHAIN_URL"
|
|
nodel1msgport = $NITRO_L1_MSG_PORT
|
|
nodel2msgport = $NITRO_L2_MSG_PORT
|
|
rpcport = $NITRO_RPC_PORT
|
|
bridgepublicip = "$NITRO_PUBLIC_P2P_HOST"
|
|
nodel1ExtMultiAddr = "$NITRO_L1_EXT_MULTIADDR"
|
|
nodel2ExtMultiAddr = "$NITRO_L2_EXT_MULTIADDR"
|
|
naaddress = "${NA_ADDRESS}"
|
|
vpaaddress = "${VPA_ADDRESS}"
|
|
caaddress = "${CA_ADDRESS}"
|
|
EOF
|
|
|
|
# Start bridge
|
|
echo "Starting nitro-bridge"
|
|
./bridge -config $bridge_config_file
|