You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just ran foundryup and started getting Invalid API key when running cast queries for non-mainnet chains (mainnet works fine).
I was running the commands from a directory with a .env file that contains various explorer API keys, named e.g. ETHERSCAN_API_KEY, BSCSCAN_API_KEY, etc.
The non-mainnet commands work when run from a different directory (without a .env), so it seems the .env:ETHERSCAN_API_KEY is getting picked up and used over anything else, even when I run e.g. cast storage 0xf7de7e8a6bd59ed41a4b5fe50278b3b7f31384df --etherscan-api-key $BSCSCAN_API_KEY --rpc-url $BSC_RPC_URL.
I believe it may be a result of this commit: 2249e07
The text was updated successfully, but these errors were encountered:
Component
Cast
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (56e9583 2024-01-30T12:30:23.386976000Z)
What command(s) is the bug in?
cast storage --etherscan-api-key
Operating System
macOS (Apple Silicon)
Describe the bug
Just ran
foundryup
and started gettingInvalid API key
when running cast queries for non-mainnet chains (mainnet works fine).I was running the commands from a directory with a
.env
file that contains various explorer API keys, named e.g.ETHERSCAN_API_KEY
,BSCSCAN_API_KEY
, etc.The non-mainnet commands work when run from a different directory (without a
.env
), so it seems the.env:ETHERSCAN_API_KEY
is getting picked up and used over anything else, even when I run e.g.cast storage 0xf7de7e8a6bd59ed41a4b5fe50278b3b7f31384df --etherscan-api-key $BSCSCAN_API_KEY --rpc-url $BSC_RPC_URL
.I believe it may be a result of this commit:
2249e07
The text was updated successfully, but these errors were encountered: