From 34596450be4e7952b2969eb54f7a9b9cf0cfaf7c Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:39:20 -0800 Subject: [PATCH] Update contracts-deployer.nomad.j2 --- .../templates/jobs/contracts-deployer.nomad.j2 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/infrastructure/nomad/playbooks/templates/jobs/contracts-deployer.nomad.j2 b/infrastructure/nomad/playbooks/templates/jobs/contracts-deployer.nomad.j2 index e898faaae..f7043a433 100644 --- a/infrastructure/nomad/playbooks/templates/jobs/contracts-deployer.nomad.j2 +++ b/infrastructure/nomad/playbooks/templates/jobs/contracts-deployer.nomad.j2 @@ -237,7 +237,17 @@ job "{{ job.name }}" { {{ end }} {% endraw %} export L1_OWNER_ADDRESS=${SENDER} #TODO: this should be a multisig address on mainnet. - LOGS="$(${CONTRACT_REPO_ROOT_PATH}/entrypoint.sh)" + + # --verify flag in entrypoint.sh only works when running forge script from the contracts directory. + # Here we setup the environment variables to function when cd'ing into the contracts directory. + export FORGE_BIN_PATH="../../${XDG_CONFIG_HOME}/.foundry/bin/forge" + export SCRIPT_PATH_PREFIX="scripts" + export CONTRACT_REPO_ROOT_PATH="./" + LOGS="$(cd ${CONTRACT_REPO_ROOT_PATH} && ./entrypoint.sh)" + + # Now cd back to previous directory. + cd ../../ + if [ $? -ne 0 ]; then echo "Failed to deploy contracts!" echo "${LOGS}"