HARDHAT CONFIGURATION AND DEPLOYMENT

This document is a guide to help you configure Hardhat and deploy your dapp smart contracts for the Gather Network.

Follow these steps in sequential order:

  1. In your Hardhat dapp project open the file named hardhat.config.js and add the details of a Gather Networks (testnet and mainnet) in the networks object:

    require("@nomiclabs/hardhat-ethers");
    
    const mnemonic = "Enter_your_account_mnemonic_here";
    
    module.exports = {
      solidity: "0.6.12",
      networks: {
          
        gather-testnet: {
          url: `https://testnet.gather.network`,
          chainId: 356256156,
          accounts: {mnemonic: mnemonic}
        },
        
        gather-mainnet: {
          url: `https://mainnet.gather.network`,
          chainId: 192837465,
          accounts: {mnemonic: mnemonic}
        }
      }
    };
  2. Compile your dapp smart contracts and migrate on the Gather networks configured in the previous step.

    • For testnet:

      npx hardhat run scripts/deploy.js --network gather-testnet
    • For mainnet:

      npx hardhat run scripts/deploy.js --network gather-mainnet
  3. You have now deployed the smart contracts of your dapp on the Gather Blockchain. You can now easily interact with your smart contract deployed on the Gather Network blockchain using your dapp frontend or Hardhat commands.

    Follow this link for the Hardhat documentation: Overview | Hardhat | Ethereum development environment for professionals by Nomic Labs

Last updated