Skip to main content
Bumped by Community user
Format code
Source Link
Ismael
  • 30.3k
  • 23
  • 54
  • 97

I am having an issue with smart contract deployment using hardhat. I don't see where is the error coming from. I have defined the .env file with values and also correctly called those values using process.env here is my hardhat.config file :

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

require('dotenv').config();

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
  defaultNetwork: "goerli",
  paths: {
    artifacts: "./artifacts",

  },

  networks: {
    goerli: {
      chainId: 5,
    },
    goerli: {
      url: process.env.API_URL ,
      accounts: [process.env.PRIVATE_KEY] ,
    }
  },
  solidity: "0.8.0",
}; ```

I am having an issue with smart contract deployment using hardhat. I don't see where is the error coming from. I have defined the .env file with values and also correctly called those values using process.env here is my hardhat.config file :


require('dotenv').config();

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
  defaultNetwork: "goerli",
  paths: {
    artifacts: "./artifacts",

  },

  networks: {
    goerli: {
      chainId: 5,
    },
    goerli: {
      url: process.env.API_URL ,
      accounts: [process.env.PRIVATE_KEY] ,
    }
  },
  solidity: "0.8.0",
}; ```

I am having an issue with smart contract deployment using hardhat. I don't see where is the error coming from. I have defined the .env file with values and also correctly called those values using process.env here is my hardhat.config file :

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

require('dotenv').config();

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
  defaultNetwork: "goerli",
  paths: {
    artifacts: "./artifacts",

  },

  networks: {
    goerli: {
      chainId: 5,
    },
    goerli: {
      url: process.env.API_URL ,
      accounts: [process.env.PRIVATE_KEY] ,
    }
  },
  solidity: "0.8.0",
};
Bumped by Community user
Bumped by Community user
Bumped by Community user
Source Link

Error in hardhat config file

I am having an issue with smart contract deployment using hardhat. I don't see where is the error coming from. I have defined the .env file with values and also correctly called those values using process.env here is my hardhat.config file :


require('dotenv').config();

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
  defaultNetwork: "goerli",
  paths: {
    artifacts: "./artifacts",

  },

  networks: {
    goerli: {
      chainId: 5,
    },
    goerli: {
      url: process.env.API_URL ,
      accounts: [process.env.PRIVATE_KEY] ,
    }
  },
  solidity: "0.8.0",
}; ```