Hardhat
Hardhat is a development environment used for compiling, deploying, testing, and debugging smart contracts.
Check out Hardhat for installation details and an overview.
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;
npx hardhat run scripts/deploy.js --network lycan
npx hardhat run scripts/deploy.ts --network lycan
View your deployed contract on any of the explorers.
Last updated