Skip to content

Commit

Permalink
chore: Added Hardhat config
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJurassicPunk committed Mar 20, 2022
1 parent 33d7f8e commit 56a3671
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import type { HardhatUserConfig } from "hardhat/types";
import { task } from "hardhat/config";

import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-waffle";
import "@typechain/hardhat";
import "hardhat-abi-exporter";
import "hardhat-gas-reporter";
import "solidity-coverage";
import "dotenv/config";

task("accounts", "Prints the list of accounts", async (_args, hre) => {
const accounts = await hre.ethers.getSigners();
accounts.forEach(async (account) => console.info(account.address));
});

const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
allowUnlimitedContractSize: false,
mining: {
auto: true,
interval: 10000,
},
gasPrice: "auto",
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_KEY,
},
solidity: {
compilers: [
{
version: "0.8.7",
settings: { optimizer: { enabled: true, runs: 888888 } },
},
{
version: "0.4.18",
settings: { optimizer: { enabled: true, runs: 999 } },
},
],
},
paths: {
sources: "./contracts/",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
abiExporter: {
path: "./abis",
runOnCompile: true,
clear: true,
flat: true,
except: ["AggregatorTest.sol", "ICheatCodes.sol", "Mock*"],
},
};

export default config;

0 comments on commit 56a3671

Please sign in to comment.