Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(forge verify-contract): --verifier-url doesn't change the URL that the contract is submitted for verification #8254

Closed
2 tasks done
rori4 opened this issue Jun 25, 2024 · 1 comment · Fixed by #9311
Closed
2 tasks done
Labels
C-forge Command: forge Cmd-forge-verify Command: forge verify-contract/check P-normal Priority: normal T-bug Type: bug
Milestone

Comments

@rori4
Copy link

rori4 commented Jun 25, 2024

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (ba9fa20 2024-06-24T00:23:20.410766000Z)

What command(s) is the bug in?

forge verify-contract $address $contract_name --verifier-url $verifierUrl --etherscan-api-key $VERIFIER_API_KEY --retries 10 --delay 10 --watch

Operating System

macOS (Apple Silicon)

Describe the bug

When running a manual contract verification and the passed verfifier-url is one it still defaults to Etherscan's.

Submitted contract for verification:
        Response: `OK`
        GUID: `0xc678dc1bb9f0d78b42c125633bc2daf726fdef1f`
        URL: https://etherscan.io/address/0xc678dc1bb9f0d78b42c125633bc2daf726fdef1f
Contract verification status:
...

Although I have passed another url

When a contract has been verified at creation time there is no issue like that

@rori4 rori4 added the T-bug Type: bug label Jun 25, 2024
@mattsse
Copy link
Member

mattsse commented Jun 25, 2024

ah this is actually a bug with how we display the URL:

which does not take into account the API url

etherscan.address_url(args.address)

.with_url(base_url.unwrap_or(api_url))?

#4151

which falls back to the known explorer URL in this case etherscan...
not sure if there's a way to guess the explorer URL from the API url

which verifier URL are you using?

@zerosnacks zerosnacks added C-forge Command: forge Cmd-forge-verify Command: forge verify-contract/check labels Jun 28, 2024
@zerosnacks zerosnacks added the T-to-reproduce Type: requires reproduction label Jul 16, 2024
@zerosnacks zerosnacks changed the title --verifier-url in forge verify-contract doesn't change the URL that the contract is submitted for verifciation bug(forge verify-contract): --verifier-url doesn't change the URL that the contract is submitted for verification Jul 16, 2024
@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 26, 2024
@zerosnacks zerosnacks added P-normal Priority: normal and removed T-to-reproduce Type: requires reproduction labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-verify Command: forge verify-contract/check P-normal Priority: normal T-bug Type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants