diff --git a/contracts/entrypoint.sh b/contracts/entrypoint.sh index bc2b503d3..6ccfd07c6 100755 --- a/contracts/entrypoint.sh +++ b/contracts/entrypoint.sh @@ -14,6 +14,10 @@ KEYSTORE_FILENAME=${KEYSTORE_FILENAME:-*} KEYSTORE_PASSWORD=${KEYSTORE_PASSWORD:-"pwd"} CONTRACT_REPO_ROOT_PATH=${CONTRACT_REPO_ROOT_PATH:-$PWD} +if [ -n "${ETHERSCAN_API_KEY}" ]; then + VERIFY_OPTION="--verify" +fi + if [ "${DEPLOY_TYPE}" = "core" ]; then if [ -z "$ORACLE_KEYSTORE_ADDRESS" ]; then echo "ORACLE_KEYSTORE_ADDRESS not specified" @@ -65,6 +69,6 @@ elif [ "${DEPLOY_TYPE}" = "l1-gateway" ]; then --use 0.8.26 \ --broadcast \ --json \ - --verify \ + ${VERIFY_OPTION} \ --via-ir fi diff --git a/infrastructure/nomad/playbooks/variables/profiles.yml b/infrastructure/nomad/playbooks/variables/profiles.yml index 868b81f57..bdaf451ff 100644 --- a/infrastructure/nomad/playbooks/variables/profiles.yml +++ b/infrastructure/nomad/playbooks/variables/profiles.yml @@ -183,7 +183,7 @@ jobs: env: chain-id: "{{ environments[env].chain_id }}" l1_rpc_url: "{{ resolved_l1_rpc_urls.split(',')[0] }}" - etherscan_api_key: "{{ etherscan_api_key }}" + etherscan_api_key: "{{ (etherscan_api_key) if env == 'testnet' else '' }}" mev_commit_dashboard: &mev_commit_dashboard_job name: mev-commit-dashboard