Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't verify contracts on pulsechain testnet v4. #4411

Closed
gurujustin opened this issue Sep 22, 2023 · 4 comments
Closed

I can't verify contracts on pulsechain testnet v4. #4411

gurujustin opened this issue Sep 22, 2023 · 4 comments
Assignees

Comments

@gurujustin
Copy link

https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify#adding-support-for-other-networks

I followed this guide but I got this error.

NomicLabsHardhatPluginError: An etherscan endpoint could not be found for this network. ChainID: 943. The selected network is pulseTestnet.

Possible causes are:
  - The selected network (pulseTestnet) is wrong.
  - Faulty hardhat network config.
    at Object.getEtherscanEndpoints (D:\Software_works\blockchain\pancake-v3\pancake-v3-contracts\projects\v3-core\node_modules\@nomiclabs\hardhat-etherscan\src\network\prober.ts:154:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Environment._runTaskDefinition (D:\Software_works\blockchain\pancake-v3\pancake-v3-contracts\node_modules\hardhat\src\internal\core\runtime-environment.ts:330:14)
    at Environment.run (D:\Software_works\blockchain\pancake-v3\pancake-v3-contracts\node_modules\hardhat\src\internal\core\runtime-environment.ts:163:14)
    at SimpleTaskDefinition.verifySubtask [as action] (D:\Software_works\blockchain\pancake-v3\pancake-v3-contracts\projects\v3-core\node_modules\@nomiclabs\hardhat-etherscan\src\index.ts:194:48)    at Environment._runTaskDefinition (D:\Software_works\blockchain\pancake-v3\pancake-v3-contracts\node_modules\hardhat\src\internal\core\runtime-environment.ts:330:14)
    at Environment.run (D:\Software_works\blockchain\pancake-v3\pancake-v3-contracts\node_modules\hardhat\src\internal\core\runtime-environment.ts:163:14)
    at Object.verifyContract (D:\Software_works\blockchain\pancake-v3\pancake-v3-contracts\common\verify.ts:27:28)
    at main (D:\Software_works\blockchain\pancake-v3\pancake-v3-contracts\projects\v3-core\scripts\verify.ts:29:5)

my config is as following:


  networks: {
    hardhat: {
      allowUnlimitedContractSize: true,
    },
    ...(process.env.KEY_TESTNET && { pulseTestnet }),
    ...(process.env.KEY_MAINNET && { bscMainnet }),
    ...(process.env.KEY_GOERLI && { goerli }),
    ...(process.env.KEY_ETH && { eth }),
    // mainnet: bscMainnet,
  },
  etherscan: {
    apiKey: process.env.ETHERSCAN_API_KEY,
    customChains: [
      {
        network: "pulseTestnet",
        chainId: 943,
        urls: {
          apiURL: "https://scan.v4.testnet.pulsechain.com/api",
          browserURL: "https://scan.v4.testnet.pulsechain.com/"
        }
      }
    ],
  },

plz help this problem.

@gurujustin
Copy link
Author

I found some interesting problems.

Some contracts are verified using same code.
But some contracts are not verified using this code.

@schaable
Copy link
Member

schaable commented Oct 11, 2023

Hi @gurujustin, from your stack trace it seems you're using hardhat-etherscan, which is an older version of the hardhat-verify plugin:

at Object.getEtherscanEndpoints (D:\Software_works\blockchain\pancake-v3\pancake-v3-contracts\projects\v3-core\node_modules@nomiclabs\hardhat-etherscan\src\network\prober.ts:154:11)

Please install hardhat-verify and try again. The interface is the same, so the upgrade should be easy. You can install it by running:

npm install --save-dev @nomicfoundation/hardhat-verify

or

yarn add --dev @nomicfoundation/hardhat-verify

I'm tentatively closing this issue, but feel free to reopen if you still have issues after installing the new version.

@schaable schaable closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
@github-project-automation github-project-automation bot moved this from Ready to Done in Hardhat Oct 11, 2023
@gurujustin
Copy link
Author

I updated hardhat-verify module but is getting same error.

@fvictorio
Copy link
Member

@gurujustin did you also update your Hardhat config to import @nomicfoundation/hardhat-verify and removed the import of @nomiclabs/hardhat-etherscan?

If you did and you are still having issues, we'll need a minimal reproducible example to be able to look into it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

3 participants