foundry: Error verifying contract on arb sepolia
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
0.2.0
What command(s) is the bug in?
forge verify-contract
Operating System
macOS (Apple Silicon)
Describe the bug
I cannot verify contract that has been deployed on arbitrum sepolia. I have tried using the cli arg and the environment variable for the etherscan api key.
I think it may have something to do with foundry not having the chain config for arbitrum sepolia yet which is now on the master branch of ethers-rs after my PR was merged yesterday
forge verify-contract --etherscan-api-key xxx --chain-id 421614 0x8d4CCBaa194ED721AC3e231a1A3863966c2D7921 Simple1271AccountFactory
Start verifying contract `0x8d4CCBaa194ED721AC3e231a1A3863966c2D7921` deployed on 421614
Error:
ETHERSCAN_API_KEY must be set.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 16 (2 by maintainers)
Command that worked for me
forge 0.3.0 (5a8bd89 2024-12-20T08:46:21.555250780Z):Notes:
--etherscan-api-keyis generated by an account on mainnet arbitrum: https://arbiscan.io/myapikey--constructor-argsif you deployed contract with constructor args you have to provide them as wellActually I installed the wrong one. The error is gone now in
nightly-34f684ddfacc5b2ed371353ba6f730c485616ffe(1 hour ago) https://github.com/foundry-rs/foundry/releases/tag/nightly-34f684ddfacc5b2ed371353ba6f730c485616ffeStill some more testing to do but this is good progress. Thanks!