-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Can't Verify Contracts in Either Sepolia or Moonbase Alpha/Moonbeam because of Failed to deserialize response
#5741
Comments
gotcha—from the output i believe this might be a divergence in the moonbase and sepolia API—could you please repost this on #5251 ? we're trying to consolidate verification failures to a few issues. Thanks for reporting and the repro! |
PS: Team Etherscan here. When we profiled the API call from Foundry, it was something akin to If we can get the calls to be I "think" if we try |
thank you for chiming in @Enigmatic331 ! yep this will prob cause problems, will investigate. |
Hey to echo what @Enigmatic331 stated. I tried the same as before with the extra
And got the right message:
Unfortunately it failed with just @Evalir I'll move the post to the Issue you suggested. Thanks for looking into it |
Etherscan verification for non-mainnet chains requires a question mark at the end of the verifier url in order to prevent a forward slash from being added to the url which trips a cloudflare rule on requests from ec2 boxes. Verification on both Goerli and Sepolia both fails without this character present. Hardhat-verify does not add the extra forward slash to the verifier url and has no issues verifying contracts on etherscan. Fixes foundry-rs#4865, foundry-rs#5251, foundry-rs#5741
* fix `forge verify-contract` etherscan cloudflare bug Etherscan verification for non-mainnet chains requires a question mark at the end of the verifier url in order to prevent a forward slash from being added to the url which trips a cloudflare rule on requests from ec2 boxes. Verification on both Goerli and Sepolia both fails without this character present. Hardhat-verify does not add the extra forward slash to the verifier url and has no issues verifying contracts on etherscan. Fixes #4865, #5251, #5741 * run cargo +nightly fmt -- --check * check if the api url already ends with ? Also apply the fix to --verifier-url urls
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (bff4ed9 2023-08-29T00:16:15.395348141Z)
What command(s) is the bug in?
forge verify-contract
Operating System
Linux
Describe the bug
I have a very simple contract that I was able to verify with the Hardhat Etherscan plugin. Consequently I was going to try verifying it with Foundry in Moonbase Alpha and I ran into the following error:
Then I was thinking this could be an issue with Etherscan's Moonbase Alpha API. Soooo, I went to test the same thing against Sepolia (changing API Key, endpoint, chain id, etc) and the same error message there as well. I know some of my inputs are not mandatory but I was just trying different things.
The basic contract I was trying to verify is this one:
Thanks for looking into it
The text was updated successfully, but these errors were encountered: