Skip to content

Commit

Permalink
update api key
Browse files Browse the repository at this point in the history
  • Loading branch information
yiweichi committed Oct 30, 2024
1 parent 90934ca commit 9b19c1a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docker/scripts/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,17 @@ while IFS= read -r line; do
echo "verifing contract $contract_name with address $contract_addr on $layer"
EXTRA_PARAMS=""
if [[ "$layer" == "L1" ]]; then
if [[ "$VERIFIER_TYPE_L1" != "etherscan" && "$VERIFIER_TYPE_L1" != "" ]]; then
EXTRA_PARAMS="--verifier-url $EXPLORER_URI_L1 --verifier $VERIFIER_TYPE_L1"
if [[ "$VERIFIER_TYPE_L1" == "etherscan" && "$VERIFIER_TYPE_L1" == "" ]]; then
EXTRA_PARAMS="--etherscan-api-key $EXPLORER_API_KEY_L1"
else
EXTRA_PARAMS="--verifier-url $EXPLORER_URI_L1 --verifier $VERIFIER_TYPE_L1 --api-key $EXPLORER_API_KEY_L1"
fi
forge verify-contract $contract_addr $source_code_name --rpc-url $L1_RPC_ENDPOINT --chain-id $CHAIN_ID_L1 --watch --api-key $EXPLORER_API_KEY_L1 --guess-constructor-args --skip-is-verified-check --etherscan-api-key $EXTRA_PARAMS
forge verify-contract $contract_addr $source_code_name --rpc-url $L1_RPC_ENDPOINT --chain-id $CHAIN_ID_L1 --watch --api-key --guess-constructor-args --skip-is-verified-check --etherscan-api-key $EXTRA_PARAMS
elif [[ "$layer" == "L2" ]]; then
if [[ "$VERIFIER_TYPE_L2" != "etherscan" && "$VERIFIER_TYPE_L2" != "" ]]; then
EXTRA_PARAMS="--verifier-url $EXPLORER_URI_L2 --verifier $VERIFIER_TYPE_L2"
if [[ "$VERIFIER_TYPE_L2" == "etherscan" && "$VERIFIER_TYPE_L2" == "" ]]; then
EXTRA_PARAMS="--etherscan-api-key $EXPLORER_API_KEY_L2"
else
EXTRA_PARAMS="--verifier-url $EXPLORER_URI_L2 --verifier $VERIFIER_TYPE_L2 --api-key $EXPLORER_API_KEY_L2"
fi
forge verify-contract $contract_addr $source_code_name --rpc-url $L2_RPC_ENDPOINT --chain-id $CHAIN_ID_L2 --watch --api-key $EXPLORER_API_KEY_L2 --guess-constructor-args --skip-is-verified-check --etherscan-api-key $EXTRA_PARAMS
fi
Expand Down

0 comments on commit 9b19c1a

Please sign in to comment.