2024-07-16 06:15:17 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
2024-07-16 13:24:23 +00:00
|
|
|
set -u
|
2024-07-16 06:15:17 +00:00
|
|
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
|
2024-07-16 13:24:23 +00:00
|
|
|
toml_file="./environments/local.toml"
|
2024-07-16 06:15:17 +00:00
|
|
|
|
|
|
|
# Set faucet key from env
|
2024-07-16 13:24:23 +00:00
|
|
|
faucet_key=${CERC_FAUCET_KEY}
|
|
|
|
echo "The faucet key is $faucet_key"
|
2024-07-16 06:15:17 +00:00
|
|
|
|
|
|
|
# Update the faucetKey in local.toml
|
|
|
|
sed -i "s/faucetKey = \"\"/faucetKey = \"$faucet_key\"/" "$toml_file"
|
|
|
|
echo "Updated faucetKey in local.toml"
|
|
|
|
|
|
|
|
# Start node-js server
|
|
|
|
yarn start-faucet
|
2024-07-16 13:24:23 +00:00
|
|
|
echo "Started faucet"
|