zeta-chain / toolkit

A library of ZetaChain helper utilities, contracts, and Hardhat tasks for smart-contract development
MIT License
43 stars 22 forks source link

Import Hardhat config from toolkit #106

Closed fadeev closed 7 months ago

fadeev commented 7 months ago

Proposed default HH config:

import "@nomicfoundation/hardhat-toolbox";
import "@zetachain/toolkit/tasks";
import * as dotenv from "dotenv";

import { getHardhatConfig } from "@zetachain/toolkit/client";
import { HardhatUserConfig } from "hardhat/config";

dotenv.config();

export const config: HardhatUserConfig = {
  ...getHardhatConfig({ accounts: [process.env.PRIVATE_KEY] }),
};

I thought about initializing a client as part of HH config, but then it becomes cumbersome to pass the client to HH tasks.

fadeev commented 7 months ago

@lukema95 can you, please, take a look at this PR? Thanks!

lukema95 commented 7 months ago

@lukema95 can you, please, take a look at this PR? Thanks!

Everything looks good to me, I only noticed a minor problem with two lines of code redundancy.