From b36872115734dca0b13b6577d288010d26949450 Mon Sep 17 00:00:00 2001 From: Duncan Townsend Date: Tue, 17 Dec 2024 08:34:53 -0500 Subject: [PATCH] Remove `--chain` flag when verifying on Etherscan; this works around a bug/incompatibility between Etherscan V1 and `forge` --- sh/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/common.sh b/sh/common.sh index 4f7507a7..8ebfac45 100644 --- a/sh/common.sh +++ b/sh/common.sh @@ -84,7 +84,7 @@ function verify_contract { if (( chainid == 34443 )) ; then # Mode uses Blockscout, not Etherscan forge verify-contract --watch --chain $chainid --verifier blockscout --verifier-url "$(get_config blockscoutApi)" --constructor-args "$_verify_constructor_args" "$_verify_deployed_address" "$_verify_source_path" else - forge verify-contract --watch --chain $chainid --verifier custom --verifier-api-key "$(get_api_secret etherscanKey)" --verifier-url "$(get_config etherscanApi)" --constructor-args "$_verify_constructor_args" "$_verify_deployed_address" "$_verify_source_path" + forge verify-contract --watch --verifier custom --verifier-api-key "$(get_api_secret etherscanKey)" --verifier-url "$(get_config etherscanApi)" --constructor-args "$_verify_constructor_args" "$_verify_deployed_address" "$_verify_source_path" fi if (( chainid != 146 )) && (( chainid != 480 )) && (( chainid != 81457 )) && (( chainid != 167000 )); then # Sourcify doesn't support Sonic, World Chain, Blast, or Taiko forge verify-contract --watch --chain $chainid --verifier sourcify --constructor-args "$_verify_constructor_args" "$_verify_deployed_address" "$_verify_source_path"