Documentation
  • Introduction
  • Chain Specifications
    • Lycan Mainnet
    • Lycan Betanet
  • Developers Integration
    • Wallets
      • Ledger
      • MetaMask
    • Smart Contracts
      • Develop & Deploy
        • Hardhat
        • Truffle
        • Foundry
        • Remix IDE
        • Cookbook
      • Interaction
        • Wagmi
        • Ethers.js
        • Web3.js
    • Faucet
    • Layer 2 SDK
    • Toolkit
      • APIS
      • Web sockets
      • Libraries
  • Staking and Rewards
    • Alpha (Running a Val node)
    • Beta (Becoming a Delegator)
    • Getting Rewards
  • Multi Chain Bridge
  • Grants
  • LNS
Powered by GitBook
On this page
  • Hardhat Configuration for Lycan​
  • Compile your contract​
  • Deploy your contract​
  1. Developers Integration
  2. Smart Contracts
  3. Develop & Deploy

Hardhat

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

PreviousDevelop & DeployNextTruffle

Last updated 10 months ago

Check out Hardhat for and .

Hardhat Configuration for Lycan

Update the configuration file with the changes shown below for Lycan Chain, providing examples for both JavaScript and TypeScript.

require("@nomiclabs/hardhat-waffle");
const fs = require("fs");
const mnemonic = fs.readFileSync(".secret").toString().trim();
let accounts = { mnemonic: mnemonic };

module.exports = {
  defaultNetwork: "lycan",
  solidity: "0.8.4",
  networks: {
    lycan: {
      url: "https://rpc.lycanchain.com",
      accounts: accounts,
    },
  },
};
import { HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import * as fs from "fs";

const mnemonic: string = fs.readFileSync(".secret").toString().trim();
let accounts = { mnemonic: mnemonic };

const config: HardhatUserConfig = {
  defaultNetwork: "lycan",
  solidity: "0.8.4",
  networks: {
    lycan: {
      url: "https://rpc.lycanchain.com",
      accounts: accounts,
    },
  },
};

export default config;

Compile your contract

npx hardhat compile
npx hardhat run scripts/deploy.js --network lycan
npx hardhat run scripts/deploy.ts --network lycan

Deploy your contract

View your deployed contract on any of the .

installation details
an overview
​
​
​
explorers