Hardhat

Hardhat is a development environment to compile, deploy, test, and debug your smart contract. It helps developers manage and automate the recurring tasks that are inherent to the process of building smart contracts and dApps, as well as easily introducing more functionality around this workflow. This means compiling, running and testing smart contracts at the very core.

More information can be found on Hardhat's official documentation here

Configuration for KardiaChain

When run, Hardhat will read configuration from hardhat.config.js file. To set up your config, you have to export an object from that.

Configuration for KardiaChain network can be as simple as below

module.exports = {
  defaultNetwork: "kardiachain",
  networks: {
    hardhat: {
    },
    kardiachain: {
      url: "https://rpc.kardiachain.io",
      accounts: ["YOUR_PRIVATE_KEY"]
    }
  },
  solidity: {
    version: "0.8.0", // Recommended version >= 0.5.0
    settings: {
      optimizer: {
        enabled: true,
        runs: 200
      }
    }
  }
}

More detailed config such as gas, gasPrice... can be found in Hardhat's documentation for configuration here

Last updated