> For the complete documentation index, see [llms.txt](https://docs.kardiachain.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kardiachain.io/docs/archived-docs/tutorials/smart-contract-development/dev-environment/ide-and-tools/hardhat.md).

# 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](https://hardhat.org/getting-started/#overview)

## 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

```json
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](https://hardhat.org/config/)
