-
Notifications
You must be signed in to change notification settings - Fork 16
/
hardhat.config.ts
71 lines (67 loc) · 1.7 KB
/
hardhat.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import "hardhat-deploy";
import "hardhat-deploy-ethers";
import "@typechain/hardhat";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-ethers";
import "solidity-coverage";
import "hardhat-gas-reporter";
import "@nomiclabs/hardhat-solhint";
import "@openzeppelin/hardhat-upgrades";
import "@nomiclabs/hardhat-etherscan";
import { task } from "hardhat/config";
import { generateMerkleTree } from "./scripts/generate";
import { rawData } from "./scripts/rawData";
import { promises as fs } from "fs";
import "hardhat-abi-exporter";
task("generate_merkle_tree", "Generate MerkleTree", async (taskArguments, hre) => {
const templateReal = generateMerkleTree(rawData);
await fs.writeFile("./dist/merkle_tree.js", templateReal);
console.log("test/merkle_tree.js generated");
});
import {
getHardhatNetworkConfig,
HardhatSolidityConfig,
HardhatGasReporterConfig,
EtherscanConfig,
} from "./SmartContractProjectConfig/config";
const networks = getHardhatNetworkConfig();
const solidity = HardhatSolidityConfig;
const gasReporter = HardhatGasReporterConfig;
const etherscan = EtherscanConfig;
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
networks,
mocha: {
timeout: 1000000,
},
solidity,
namedAccounts: {
deployer: {
default: 0,
},
},
etherscan,
gasReporter,
abiExporter: {
path: "./abi",
runOnCompile: true,
clear: true,
flat: true,
only: [
"MaskEnumerableNFT",
"MaskHolderQlf",
"MaskNonEnumerableNFT",
"MerkleProofQlf",
"MysteryBox",
"SigVerifyQlf",
"WhitelistQlf",
],
},
typechain: {
outDir: "types",
target: "ethers-v5",
alwaysGenerateOverloads: false,
},
};