TRUFFLE CONFIGURATION AND DEPLOYMENT

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

Follow these steps in sequential order:

  1. In your Truffle dapp project open the file named truffle-config.js and add the details of a Gather Network (testnet and mainnet) in the networks object:

    const mnemonic = "Enter_your_account_mnemonic_here";
    gather-testnet: {
          provider: () => new HDWalletProvider(mnemonic, `https://testnet.gather.network`),
          port: 80,
          network_id: 356256156,
      },
          
    gather-mainnet: {
          provider: () => new HDWalletProvider(mnemonic, `https://mainnet.gather.network`),
          port: 80,
          network_id: 192837465,
      }
  2. Compile your dapp smart contract and migrate on the Gather network configured in the previous step.

    • For testnet:

      truffle migrate --compile-all --reset --network gather-testnet
    • For mainnet:

      truffle migrate --compile-all --reset --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 Truffle commands:

    Follow this link for the truffle documentation: Truffle | Overview | Documentation | Truffle Suite

Last updated