smartcontractkit / hardhat-starter-kit

A repo for boilerplate code for testing, deploying, and shipping chainlink solidity code.
MIT License
1.2k stars 491 forks source link

NomicLabsHardhatPluginError: Failed to send contract verification request. when using this command “npm run deploy --network sepolia” #169

Open lenny-mo opened 1 year ago

lenny-mo commented 1 year ago

I tried to deploy Hardhat Starter Kit following the tutorial in Quickstart, but it didn't work. Although I have changed the .env file and replaced the correct SEPOLIA_RPC_URL and my wallet address in the SEPOLIA network, the deployment still fails.

The following prompts in the terminal after failure:

APIConsumer deployed to 0xA8AB10f440949F3c779C002aa646543d0378094c on sepolia
Nothing to compile
NomicLabsHardhatPluginError: Failed to send contract verification request.
Endpoint URL: https://api-sepolia.etherscan.io/api
Reason: Connect Timeout Error
    at verifyContract (/Users/morethan/Documents/git/XJTLU_Master_Project/chainlink-smart-contract/hardhat-starter-kit/node_modules/@nomiclabs/hardhat-etherscan/src/etherscan/EtherscanService.ts:35:11)

This error means the connection timed out. I think the Sepolia network is a test network and may not be supported by Etherscan, hence the timeout error when trying to verify the contract.

lenny-mo commented 1 year ago

I found that etherscan supports SEPOLIA at this URL, but this URL https://api-sepolia.etherscan.io/ is currently inaccessible, so I think the quickstart of the Chainlink Hardhat Starter Kit seems to need to be modified