testnet-laconicd-stack/stack-orchestrator/config/laconic-shopify/start-faucet.sh
Prathamesh Musale abc8c666eb Integrate shopify faucet into shopify stack (#35)
Part of [Service provider auctions for web deployments](https://www.notion.so/Service-provider-auctions-for-web-deployments-104a6b22d47280dbad51d28aa3a91d75)

Co-authored-by: Neeraj <neeraj.rtly@gmail.com>
Reviewed-on: #35
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-10-30 05:00:17 +00:00

30 lines
895 B
Bash
Executable File

#!/bin/bash
set -e
set -u
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
config_template=$(cat environments/config-template.toml)
target_config="./environments/local.toml"
# Check if faucet key is set
if [ -z "${CERC_FAUCET_KEY:-}" ]; then
echo "Error: CERC_FAUCET_KEY is not set. Exiting..."
exit 1
fi
echo "Using laconicd RPC endpoint: $CERC_LACONICD_RPC_ENDPOINT"
FAUCET_CONFIG=$(echo "$config_template" | \
sed -E "s|REPLACE_WITH_CERC_FAUCET_KEY|${CERC_FAUCET_KEY}|g; \
s|REPLACE_WITH_CERC_LACONICD_CHAIN_ID|${CERC_LACONICD_CHAIN_ID}|g; \
s|REPLACE_WITH_CERC_LACONICD_PREFIX|${CERC_LACONICD_PREFIX}|g; \
s|REPLACE_WITH_CERC_LACONICD_GAS_PRICE|${CERC_LACONICD_GAS_PRICE}|g; \
s|REPLACE_WITH_CERC_LACONICD_RPC_ENDPOINT|${CERC_LACONICD_RPC_ENDPOINT}|g; ")
echo "$FAUCET_CONFIG" > $target_config
echo "Starting faucet..."
node dist/index.js