generated from GemStarterIo/synapsenetwork-contracts-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
81 lines (76 loc) · 1.66 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
72
73
74
75
76
77
78
79
80
81
import { config as dotenvConfig } from "dotenv";
import { resolve } from "path";
import { HardhatUserConfig } from "hardhat/config";
import "./tasks/accounts";
import "./tasks/clean";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-etherscan";
import "@typechain/hardhat";
import "solidity-coverage";
import "hardhat-watcher";
import "hardhat-abi-exporter";
import "hardhat-contract-sizer";
import "hardhat-gas-reporter";
import "hardhat-deploy";
import "hardhat-deploy-ethers";
import "@nomiclabs/hardhat-web3";
import "@nomicfoundation/hardhat-chai-matchers";
import networks from "./hardhat.network";
dotenvConfig({ path: resolve(__dirname, "./.env") });
const config: HardhatUserConfig = {
solidity: {
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 999999,
},
},
},
defaultNetwork: "hardhat",
networks,
paths: {
artifacts: "./artifacts",
cache: "./cache",
sources: "./contracts",
tests: "./test",
},
namedAccounts: {
deployer: "",
},
typechain: {
outDir: "typechain",
target: "ethers-v5",
},
watcher: {
compile: {
tasks: ["compile"],
files: ["./contracts"],
verbose: true,
},
test: {
tasks: [{ command: "test", params: { testFiles: ["{path}"] } }],
files: ["./test/**/*"],
verbose: true,
},
},
abiExporter: {
path: "./data/abi",
clear: true,
flat: true,
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
},
gasReporter: {
currency: "USD",
},
mocha: {
timeout: 30000,
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
};
export default config;