1

I have configure my project with nomiclabs hardhat-etherscan and hardhat.config.ts with sepolia network as goerli network as high gas fees.

I could also deploy the contract with hardhat.config.ts but I am unable to verify the contract on sepolia test network.

Deployed Contract Address: 0x6Fc8481F93Ae4725DA1120BBEF6B1E593F7956c4

Here's my hardhat.config.ts

 etherscan: {
    apiKey: process.env.ETHERSCAN_API_KEY
  },

if (process.env.NETWORK_SEPOLIA_URL !== undefined) {
  console.log("Using Sepolia network");

  config.networks!.testnet = {
    url: process.env.NETWORK_SEPOLIA_URL,
    accounts: [process.env.SEPOLIA_PRIVATE_KEY!],
  }

I am using command hardhat verify --constructor-args config/ContractArguments.ts

Here's ContractArguments.ts

import { utils } from "ethers";
import CollectionConfig from "./CollectionConfig";

// Update the following array if you change the constructor arguments...
const ContractArguments = [
  CollectionConfig.tokenName,
  CollectionConfig.tokenSymbol,
  utils.parseEther(CollectionConfig.whitelistSale.price.toString()),
  CollectionConfig.maxSupply,
  CollectionConfig.whitelistSale.maxMintAmountPerTx,
  CollectionConfig.hiddenMetadataUri,
] as const;

export default ContractArguments;

Error: Error in plugin @nomiclabs/hardhat-etherscan: Unsupported network ("sepolia", chainId: 11155111).

1
  • Hey, Did you get a solution for this? Apr 26, 2023 at 5:15

3 Answers 3

3

I faced a similar error, but updating @nomiclabs/hardhat-etherscan to the latest version worked for me.

npm update @nomiclabs/hardhat-etherscan
1
  • I am using @nomiclabs/hardhat-etherscan 3.1.7 version Mar 31, 2023 at 6:17
2

I faced the same issue while verifying my contract using [hardhat-etherscan] so I updated the package using this command in the console >>> npm update @nomiclabs/hardhat-etherscan

This worked for me, you can give it a try too!

0

As your error says, Sepolia is not supported by hardhat-etherscan

1
  • I know it's not supported but when you check hardhat documentation they've provided configuration for sepolia network. I have followed them as is but still it doesn't work. Mar 28, 2023 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.