---
description: >-
  Hardhat is a development environment used for compiling, deploying, testing,
  and debugging smart contracts.
---

# Hardhat

Check out Hardhat for [installation details](https://hardhat.org/hardhat-runner/docs/getting-started#installation) and [an overview](https://hardhat.org/hardhat-runner/docs/getting-started#overview).

### Hardhat Configuration for Lycan[​](https://docs.gnosischain.com/developers/dev-environment/hardhat#config-hardhat-for-gnosis) <a href="#config-hardhat-for-gnosis" id="config-hardhat-for-gnosis"></a>

Update the configuration file with the changes shown below for Lycan Chain, providing examples for both JavaScript and TypeScript.

{% tabs %}
{% tab title="JavaScript" %}
```javascript
require("@nomiclabs/hardhat-waffle");
const fs = require("fs");
const mnemonic = fs.readFileSync(".secret").toString().trim();
let accounts = { mnemonic: mnemonic };

module.exports = {
  defaultNetwork: "lycan",
  solidity: "0.8.4",
  networks: {
    lycan: {
      url: "https://rpc.lycanchain.com",
      accounts: accounts,
    },
  },
};
```
{% endtab %}

{% tab title="TypeScript" %}
```typescript
import { HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import * as fs from "fs";

const mnemonic: string = fs.readFileSync(".secret").toString().trim();
let accounts = { mnemonic: mnemonic };

const config: HardhatUserConfig = {
  defaultNetwork: "lycan",
  solidity: "0.8.4",
  networks: {
    lycan: {
      url: "https://rpc.lycanchain.com",
      accounts: accounts,
    },
  },
};

export default config;
```
{% endtab %}
{% endtabs %}

### Compile your contract[​](https://docs.gnosischain.com/developers/dev-environment/hardhat#compile-your-contract) <a href="#compile-your-contract" id="compile-your-contract"></a>

```properties
npx hardhat compile
```

### Deploy your contract[​](https://docs.gnosischain.com/developers/dev-environment/hardhat#deploy-your-contract) <a href="#deploy-your-contract" id="deploy-your-contract"></a>

{% tabs %}
{% tab title="Javascript" %}
```properties
npx hardhat run scripts/deploy.js --network lycan
```
{% endtab %}

{% tab title="Typescript" %}
```properties
npx hardhat run scripts/deploy.ts --network lycan
```
{% endtab %}
{% endtabs %}

View your deployed contract on any of the [explorers](https://explorer.lycanchain.com/).
