Hardhat

Hardhat is a development environment used for smart contract compiling, deploying, testing and debugging.

Get started with Hardhat for general installation and overview.

Config Hardhat for Velocity​

Update the config with Velocitynetworks, check the highlighted lines for instructions:

  • Typescript

  • Javascript

hardhat.config.ts

import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";

//https://hardhat.org/hardhat-runner/docs/config#json-rpc-based-networks

//Note: keep your mnemonic and private keys securely
//Read more: https://hardhat.org/hardhat-runner/docs/config#hd-wallet-config
//1) You can configure private keys or mnemonic:
//let accounts = ["your private key here"]
let accounts = { mnemonic: "your mnemonic here", }

const config: HardhatUserConfig = {
  solidity: "0.8.17",
  //2) select the default network "velocity"
  defaultNetwork: "velocity",
  networks: {
    hardhat: {
    },
    velocity: {
      url: "https://rpc.velocitybtc.com",
      accounts: accounts,
    },
  },
  etherscan: {
    customChains: [
      {
        network: "velocity",
        chainId: **TBD**
        },
      },
    ]
  }
};

export default config;

Compile your contract​

Deploy your contract​

  • Typescript

  • Javascript

Velocity Mainnet

Additional Hardhat Documentation​

  • Additional Hardhat deployment documentation is located here.

Last updated