▶️Setup Hardhat on Swisstronik Network

After successfully setting up your Hardhat project, the next step is to configure the hardhat.config.js file. This will be the essential configuration file where you can customize the networks, plugins, compiler settings, and more.

  1. Open the hardhat.config.js file

For the scope of this tutorial, we will only configure the networks, leaving the solidity compiler at its default version 0.8.19.

  1. Setup the Swisstronik's network

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

module.exports = {
  solidity: "0.8.19",
  networks: {
    swisstronik: {
      url: "https://json-rpc.testnet.swisstronik.com/", //URL of the RPC node for Swisstronik.
      accounts: ["0xd5..."], //Your private key starting with "0x" 
      //Make sure you have enough funds in this wallet to deploy the smart contract
    },
  },
};

Last updated

Was this helpful?