Lesson 6 : Api Key error while verifying my contract on Rinkeby network #669
-
time: 08:55:00 NomicLabsHardhatPluginError: You are trying to verify a contract in 'rinkeby', but no API token was found for this network. Please provide one in your hardhat config. For example:
{
...
etherscan: {
apiKey: {
rinkeby: 'your API key'
}
}
} I've checked my API and its fresh and does not have problem. Also I have used. module.exports = {
defaultNetwork: "hardhat",
networks: {
rinkeby: {
url: RPC_URL,
accounts: [PRIVATE_KEY],
chainId: 4,
},
},
solidity: "0.8.8",
etherscan: {
apikey: ETHERSCAN_API_KEY,
}
} so where is the problem, why can I not verify my contract? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
did you declare your api key using |
Beta Was this translation helpful? Give feedback.
-
I just deleted artifacts and cache folders and re-deployed it and it worked. |
Beta Was this translation helpful? Give feedback.
-
apiKEY will cause the error! apiKey should fix this This small change worked for me! |
Beta Was this translation helpful? Give feedback.
-
you have typed apikey instead of apiKey. |
Beta Was this translation helpful? Give feedback.
-
What worked for me is changing: etherscan: { etherscan: { |
Beta Was this translation helpful? Give feedback.
I just deleted artifacts and cache folders and re-deployed it and it worked.