-
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
forge verify-contract error when using --chain parameter #7466
Comments
Have the same issue, my error is using
forge 0.2.0 (72bc4f4 2024-04-08T00:17:17.438514000Z) |
cc @zerosnacks |
getting the same error. setting env var or passing forge 0.2.0 (d495216 2024-05-03T00:18:57.034339671Z) |
The same issue applies when using a Tenderly Testnet with custom chain ID. |
same error. |
I can also confirm that this is an issue with latest forge
|
Same issue |
I encountered this bug also. |
I got hit by that too, but from a different angle. I'm getting |
Although not an ideal solution, you can make slight modifications to the Forge source code to allow the verify command to work on arbitrary chains. In my case, I modified it to support verification for the SEI chain's seitrace. You can view the changes in my pull request here: |
I managed to get it fixed by adding this to my [etherscan]
unknown_chain = {
key = "${TENDERLY_ACCESS_KEY}",
chain = 314311,
url = "${ETH_RPC_URL}/verify/etherscan"
} This solves the issue when verifying contracts using Tenderly Virtual Testnets. Should do the trick for other situations as well, as long as the parameters are correct. |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (e5318c3 2024-03-21T00:17:26.798143000Z)
What command(s) is the bug in?
forge verify-contract
Operating System
macOS (Apple Silicon)
Describe the bug
Using
forge verify-contract
orforge create --verify
with an alternate chain ID always fails with "ETHERSCAN_API_KEY must be set"The
ETHERSCAN_API_KEY
environment variable is already set in my environment. There are no customizations to foundry.toml.The text was updated successfully, but these errors were encountered: