0

I'm new to hardhat and trying to specify forked as well as testnet networks in the config file. Using various samples from hardhat.org and various tutorials, I thought I had it nailed with the following:

require("@nomicfoundation/hardhat-toolbox");

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
  solidity: {
    compilers: [
      { version: "0.5.16" },
      { version: "0.6.6" },
      { version: "0.8.17" },
    ],
  },
  networks: {
    hardhat: {
      forking: {
        url: "https://eth-mainnet.alchemyapi.io/v2/c34565hsdfrdsTfuPip1_l24sddewe4ddB3wn",
      },
    },
  },
};

Running npx hardhat node, with this config however, I always get an Error HH604 JSON-RPC timeout. Without the network part, i.e. with

module.exports = {
  solidity: {
    compilers: [
      { version: "0.5.16" },
      { version: "0.6.6" },
      { version: "0.8.17" },
    ],
  },
};

Tried other network configurations as well, including copy paste from hardhat.org, but can't make it work.

What is strange as well, is that I can see hardhat connecting to the provider (alchemy) with a whole bunch of getTransactionCount requests.

Any help how to resolve this issue would be greatly appreciated.

1 Answer 1

0

Solved the issue in the end: it seems that hardhat does not work well together with a VPN. Had to use split tunnelling in the VPN (or shut it down completely) to make it work.

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.