-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
A-verificationArea: verificationArea: verificationC-forgeCommand: forgeCommand: forgeCmd-forge-scriptCommand: forge scriptCommand: forge scriptT-bugType: bugType: bug
Milestone
Description
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge Version: 1.0.0-stable
What version of Foundryup are you on?
foundryup: 0.3.1
What command(s) is the bug in?
forge script
Operating System
Linux
Describe the bug
We're trying to verify a contract on Sourcify, but the forge script attempts to verify on Etherscan instead. This only happens when the ETHERSCAN_API_KEY environment variable is defined. It's unexpected that the variable would take precedence over the --verifier sourcify flag. When I delete the environment variable, Foundry correctly verifies against Sourcify.
I set up a simple example repository to reproduce the issue at https://github.com/runtimeverification/buildbear-verifiy
This fails:
export ETHERSCAN_API_KEY="some-api-key"
forge script script/Counter.s.sol \
--rpc-url buildbear \
--verify \
--verifier sourcify \
--verifier-url "https://rpc.buildbear.io/verify/sourcify/server/raoul" \
-vvvv \
--broadcast \
--slowIt looks like the error was introduced in this PR:
https://github.com/foundry-rs/foundry/pull/9630/files#diff-83809d8e219fe52b39eed2ae2f638def658f8a8d2121e298bf48cb8c39af6fdfR173
Metadata
Metadata
Assignees
Labels
A-verificationArea: verificationArea: verificationC-forgeCommand: forgeCommand: forgeCmd-forge-scriptCommand: forge scriptCommand: forge scriptT-bugType: bugType: bug
Type
Projects
Status
Completed