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
When you use the --etherscan-apikey along with other explorer API key parameters, such as --optim-apikey, the etherscan API key will be added as the first apikey parameter, with other explorer's keys following. This will cause the etherscan key to be counted and loaded when requesting explorer API, which is not expected when used with other explorers such as Optim, and it will result in an invalid API key error.
For example:
❯ crytic-compile optim:0x5499178919c79086fd580d6c5f332a4253244d91 --etherscan-apikey $ETHERSCAN_API_KEY --optim-apikey $OPTIM_API_KEY
ERROR:CryticCompile:Invalid etherscan API Key
ERROR:CryticCompile:Invalid etherscan API Key: https://api-optimistic.etherscan.io/api?module=contract&action=getsourcecode&address=0x5499178919c79086fd580d6c5f332a4253244d91&apikey=<$ETHERSCAN_API_KEY>&apikey=<$OPTIM_API_KEY>
Expected Behavior:
It should work seamlessly, and the provided priority API key should adhere to the explorer's address prefix.
The text was updated successfully, but these errors were encountered:
Hi! thanks for the report. It looks like the optimism scanner includes the word "etherscan" on the URL, causing the check implemented here not be accurate:
When you use the
--etherscan-apikey
along with other explorer API key parameters, such as--optim-apikey
, the etherscan API key will be added as the firstapikey
parameter, with other explorer's keys following. This will cause the etherscan key to be counted and loaded when requesting explorer API, which is not expected when used with other explorers such as Optim, and it will result in an invalid API key error.For example:
Expected Behavior:
It should work seamlessly, and the provided priority API key should adhere to the explorer's address prefix.
The text was updated successfully, but these errors were encountered: