# 2. Configuration

### Configure hardhat.config.js

Replace the contents of your `hardhat.config.js` file with:

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

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
  solidity: "0.8.28",
  networks: {
    luntraChain: {
      url: "https://rpc.luntrainfrastructure.com/http",
      chainId: 3470144,
      accounts: ["YOUR_PRIVATE_KEY_HERE"], // Replace with your actual private key
    },
    hardhat: {
      // Local development network
    },
    localhost: {
      url: "http://127.0.0.1:8545"
    }
  },
  etherscan: {
    // Add block explorer API key if available for Luntra
    apiKey: {
      luntraChain: "YOUR_API_KEY"
    }
  }
};

```

### Environment Variables (Recommended)

For security, create a `.env` file in your project root:

```shell
LUNTRA_PRIVATE_KEY=your_private_key_here
LUNTRA_RPC_URL=https://rpc.luntrainfrastructure.com/http
```

#### Then update your config:

```javascript
require("dotenv").config();

module.exports = {
  solidity: "0.8.28",
  networks: {
    luntraChain: {
      url: process.env.LUNTRA_RPC_URL,
      chainId: 3470144,
      accounts: [process.env.LUNTRA_PRIVATE_KEY],
    },
  }
};

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://luntra.gitbook.io/luntra-infrastructure/smart-contract-deployment-guide-on-hardhat/2.-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
