2. Configuration

Configure hardhat.config.js

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

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"
    }
  }
};

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

Then update your config:

Last updated