-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
109 lines (106 loc) · 3.08 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import "@nomicfoundation/hardhat-chai-matchers";
import "@nomicfoundation/hardhat-verify";
import "@nomiclabs/hardhat-solhint";
import "@openzeppelin/hardhat-upgrades";
import "@typechain/hardhat";
import "@nomicfoundation/hardhat-toolbox";
import "solidity-coverage";
import * as dotenv from "dotenv";
import { HardhatUserConfig } from "hardhat/types";
import "hardhat-docgen";
import "hardhat-gas-reporter";
import "hardhat-contract-sizer";
import "hardhat-tracer";
import "hardhat-log-remover";
dotenv.config();
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
accounts: { count: 100 },
},
sepolia: {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [`${process.env.PRIVATE_KEY}`],
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [`${process.env.PRIVATE_KEY}`],
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [`${process.env.PRIVATE_KEY}`],
},
mumbai: {
url: `https://matic-mumbai.chainstacklabs.com/`,
accounts: [`${process.env.PRIVATE_KEY}`],
},
bsctestnet: {
url: `https://data-seed-prebsc-1-s1.binance.org:8545/`,
accounts: [`${process.env.PRIVATE_KEY}`],
},
},
etherscan: {
apiKey: {
goerli: `${process.env.ETHERSCAN_KEY}`,
sepolia: `${process.env.ETHERSCAN_KEY}`,
bscTestnet: `${process.env.BSCSCAN_KEY}`,
polygonMumbai: `${process.env.POLYGONSCAN_KEY}`,
mainnet: `${process.env.ETHERSCAN_KEY}`,
bsctestnet: `${process.env.BSCSCAN_KEY}`,
polygonMainnet: `${process.env.POLYGONSCAN_KEY}`,
},
},
solidity: {
compilers: [
{
version: "0.8.18",
settings: {
optimizer: {
enabled: true,
runs: 200,
details: {
yul: true,
},
},
viaIR: false,
},
},
],
},
paths: {
sources: "./contracts",
tests: "./tests",
cache: "./cache",
artifacts: "./artifacts",
},
mocha: {
timeout: 200000,
reporter: "mocha-multi-reporters",
reporterOptions: {
configFile: "./mocha-report.json",
},
},
docgen: {
path: "./docs",
clear: true,
runOnCompile: false,
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
},
gasReporter: {
currency: "ETH",
gasPrice: 10,
enabled: process.env.REPORT_GAS ? true : false,
excludeContracts: [],
src: "./contracts",
},
typechain: {
outDir: "typechain-types",
target: "ethers-v6",
},
};
module.exports = config;