Hardhat verification for Polygon mumbai fails

Viewed 30

Smart contract was successfully deployed to 0x91Dc2eeC62cF6c8a16718FbE7Ca757C462AFBa8c on mumbai testnet. Now I am trying to verify it via hardhat, installed the hardhat-etherscan library and hardhat.config.ts looks like this:

const config: HardhatUserConfig = {
  solidity: "0.8.9",
  defaultNetwork: "mumbai",
  networks: {
    hardhat: {},
    mumbai: {
      url: `https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY}`,
      accounts: [MUMBAI_PRIVATE_KEY]
    }
  },
  etherscan: {
    apiKey: {
      mumbai: POLYGONSCAN_API_KEY
    },
    customChains: [
      {
        network: "mumbai",
        chainId: 80001,
        urls: {
          apiURL: "https://api-testnet.polygonscan.com",
          browserURL: "https://mumbai.polygonscan.com"
        }
      }
    ]
 }
};

But running npx hardhat verify with the smart contract address and settings above results in this:

npx hardhat verify --network mumbai 0x91Dc2eeC62cF6c8a16718FbE7Ca757C462AFBa8c 
Nothing to compile
No need to generate any newer typings.
An unexpected error occurred:

[Error: ENOENT: no such file or directory, open '/workspaces/devcontest/artifacts/build-info/326038f2a359a1b4c6d393af35e41db0.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/workspaces/devcontest/artifacts/build-info/326038f2a359a1b4c6d393af35e41db0.json'
}

What could be wrong? I am running all thise in a remote dev container via M$ Visial Studio Code with the Hardhat plugin installed...

0 Answers
Related