scaffold-eth-challenges
scaffold-eth-challenges copied to clipboard
Challenge 0: Invalid Etherscan API Key
Description
Branch: challenge-0-simple-nft
Checkpoint 5: 📜 Contract Verification
When verifying a contract with a newly created API key from etherscan users might encounter the following error when running yarn verify
since it can take roughly 5 minutes for the API key to become active.
contract YourCollectible failed to submit : "NOTOK" : "Invalid API Key" [object Object]
Steps to Reproduce
Note: The speed with which you complete these steps will impact the outcome.
- Create a new API key on etherscan
- Add the API key to the
yarn verify
script inpackages/hardhat/package.json
- Run
yarn verify
(with the--network
of your choice) - The console logs an "Invalid API Key" error
Resolution
Perhaps a small note could be added to the Contract Verification section explaining that it might take a few minutes for the Etherscan API key to become active.