Skip to content

Commit

Permalink
Remove --chain flag when verifying on Etherscan; this works around …
Browse files Browse the repository at this point in the history
…a bug/incompatibility between Etherscan V1 and `forge`
  • Loading branch information
duncancmt committed Dec 17, 2024
1 parent ac08d41 commit b368721
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sh/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b368721

Please sign in to comment.