#!/bin/bash
basedir=/app/contracts
target=$basedir/deployments

source /app/.envrc

rm -rf $target/*

ls $basedir/scripts/getting-started
cd $basedir && ./scripts/getting-started/config.sh
cd $basedir && \
DEPLOYMENT_OUTFILE=$target/artifact.json \
DEPLOY_CONFIG_PATH=$target/config.json  \
  forge script scripts/deploy/Deploy.s.sol:Deploy \
    --non-interactive \
    --broadcast --private-key $PRIVATE_KEY \
    --rpc-url $L1_RPC_URL
