Closed arjunblj closed 1 month ago
Should we prompt for a key or more simply return an error like "No key provided for verifying the contract" ?
Now prompts when running forge script script/Counter.s.sol --verify --broadcast --rpc-url <RPC_URL>
without an Etherscan API key set:
Error:
Missing etherscan key for chain 17000
This errors before an actual deployment is done
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (6174975 2022-11-30T00:15:57.020771Z)
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
forge script --verify
silently fails without verifying a contract deployment when the user does not provide an Etherscan API key. Foundry should prompt the user to provide an Etherscan API key if the--verify
flag is used.