wighawag / hardhat-deploy

hardhat deployment plugin
MIT License
1.17k stars 283 forks source link

Unable to verify contract on Avalanche testnet using hardhat-deploy #444

Closed NatashkinAlex closed 1 year ago

NatashkinAlex commented 1 year ago

I am having trouble verifying a contract on the Avalanche testnet. The error I receive is: "contract Lottery failed to submit : "NOTOK" : "Invalid API Key" [object Object]". However, I was able to verify the contract using hardhat-etherscan. Could you please assist me in resolving this issue?

NatashkinAlex commented 1 year ago

I checked on Goerli and Sepolia, everything is fine, but on Polygon-Mumbai, Chapel, and Fuji there is an error.

NatashkinAlex commented 1 year ago

I've figured out the issue. It turns out that the API key is taken from the ETHERSCAN_API_KEY environment variable first and then tries to find it in the Hardhat config, which is quite odd. A year ago, it was taken correctly from the config in the first place. This issue can be closed now.