Skip to content
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 does not honor [etherscan] configs in foundry.toml for certain chains when using --chain #3560

Closed
1 of 2 tasks
ezynda3 opened this issue Oct 27, 2022 · 0 comments · Fixed by gakonst/ethers-rs#1809
Labels
C-forge Command: forge Cmd-forge-verify Command: forge verify-contract/check T-bug Type: bug

Comments

@ezynda3
Copy link

ezynda3 commented Oct 27, 2022

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (9d64f1f 2022-10-26T00:08:20.899561012Z)

What command(s) is the bug in?

forge verify-contract

Operating System

Linux

Describe the bug

Given I have [etherscan] config settings in foundry.toml like so

[etherscan]
mainnet = { key = "${MAINNET_ETHERSCAN_API_KEY}" }
polygon = { key = "${POLYGON_ETHERSCAN_API_KEY}", url = "https://api.polygonscan.com/api" }
bsc = { key = "${BSC_ETHERSCAN_API_KEY}", url = "https://api.bscscan.com/api" }
gnosis = { key = "${GNOSIS_ETHERSCAN_API_KEY}", url = "https://blockscout.com/poa/xdai/api" }

When running forge verify-contract --chain gnosis ... I get the following error

error: Invalid value "gnosis" for '--chain <CHAIN>': Expected known chain or integer, found: gnosis

When using --chain mainnet or --chain polygon the command runs with no issues.

I would expect that forge verify-contract would honor the configuration in my foundry.toml file

@ezynda3 ezynda3 added the T-bug Type: bug label Oct 27, 2022
@gakonst gakonst added this to Foundry Oct 27, 2022
@gakonst gakonst moved this to Todo in Foundry Oct 27, 2022
@rkrasiuk rkrasiuk added C-forge Command: forge Cmd-forge-verify Command: forge verify-contract/check labels Oct 28, 2022
Repository owner moved this from Todo to Done in Foundry Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-verify Command: forge verify-contract/check T-bug Type: bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants