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

issue with setting hardhat config. #6

Open
sandeepV2 opened this issue Dec 1, 2023 · 0 comments
Open

issue with setting hardhat config. #6

sandeepV2 opened this issue Dec 1, 2023 · 0 comments

Comments

@sandeepV2
Copy link

sandeepV2 commented Dec 1, 2023

Facing an error when running hardhat clean. The error is asking for string type and url provided is string !.

Error HH8: There's one or more errors in your config file:

  • Invalid value undefined for HardhatConfig.networks.polygon_mumbai.url - Expected a value of type string.

To learn more about Hardhat's configuration, please go to https://hardhat.org/config/

Contents of hardhat.config.js file.

require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-etherscan");

const dotenv = require("dotenv");
dotenv.config();

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
  solidity: "0.8.9",
  defaultNetwork: "polygon_mumbai",
  networks: {
    polygon_mumbai: {
      uri: "https://rpc-mumbai.maticvigil.com/",
      accounts: [process.env.PRIVATE_KEY],
    },
  },
  etherscan: {
    apiKey: process.env.POLYGON_API_KEY,
  },
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant