forked from cerc-io/stack-orchestrator
cf039d9562
* Add a fixturenet-payments stack * Export the WebSocket port in fixturenet-eth-geth service * Add container to run a go-nitro node * Add container to deploy Nitro contracts * Read contract addresses from a volume when running the Nitro node * Add a service for Nitro reverse payment proxy * Expose payment proxy endpoint to be accessible from host * Map nitro node messaging and payment proxy ports to host * Use container to deploy Nitro contracts in mobymask-v3 stack * Use a common contract deployment script from mobymask-v3 stack * Add MobyMask contract deployment and watcher services * Fixes for contract deployment and watcher scripts * Add a container and service for mobymask-snap * Add MobyMask app service * Add container and service for a ponder app * Fix ponder setup and update instructions * Handle review comments * Use enablepaidrpcmethods flag in reverse payment proxy server * Update go-nitro branch * Fixes for mobymask-v3 stack --------- Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
36 lines
1.2 KiB
Bash
Executable File
36 lines
1.2 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"
|
|
|
|
# Check if CERC_NA_ADDRESS environment variable is set
|
|
if [ -n "$CERC_NA_ADDRESS" ]; then
|
|
echo "CERC_NA_ADDRESS is set to '$CERC_NA_ADDRESS'"
|
|
echo "CERC_VPA_ADDRESS is set to '$CERC_VPA_ADDRESS'"
|
|
echo "CERC_CA_ADDRESS is set to '$CERC_CA_ADDRESS'"
|
|
echo "Using the above Nitro addresses"
|
|
|
|
NA_ADDRESS=${CERC_NA_ADDRESS}
|
|
VPA_ADDRESS=${CERC_VPA_ADDRESS}
|
|
CA_ADDRESS=${CERC_CA_ADDRESS}
|
|
elif [ -f ${nitro_addresses_file} ]; then
|
|
echo "Reading Nitro addresses from ${nitro_addresses_file}"
|
|
|
|
NA_ADDRESS=$(jq -r '.nitroAdjudicatorAddress' ${nitro_addresses_file})
|
|
VPA_ADDRESS=$(jq -r '.virtualPaymentAppAddress' ${nitro_addresses_file})
|
|
CA_ADDRESS=$(jq -r '.consensusAppAddress' ${nitro_addresses_file})
|
|
else
|
|
echo "File ${nitro_addresses_file} not found"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Running Nitro node"
|
|
|
|
# TODO Wait for RPC endpoint to come up
|
|
|
|
./nitro -chainurl ${NITRO_CHAIN_URL} -msgport 3005 -rpcport 4005 -wsmsgport 5005 -pk ${NITRO_PK} -chainpk ${NITRO_CHAIN_PK} -naaddress ${NA_ADDRESS} -vpaaddress ${VPA_ADDRESS} -caaddress ${CA_ADDRESS} -usedurablestore ${NITRO_USE_DURABLE_STORE} -durablestorefolder ${NITRO_DURABLE_STORE_FOLDER}
|