-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
98 lines (96 loc) · 2.49 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
import "dotenv/config"
import { HardhatUserConfig } from "hardhat/types"
import "@nomiclabs/hardhat-waffle"
import "@nomiclabs/hardhat-ethers"
import "hardhat-deploy"
import "@typechain/hardhat"
import "hardhat-abi-exporter"
import "@nomiclabs/hardhat-etherscan"
import "@openzeppelin/hardhat-upgrades"
import "solidity-coverage"
import "hardhat-gas-reporter"
import "./tasks"
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
solidity: {
compilers: [
{
version: "0.8.12",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
paths: {
tests: "./tests",
artifacts: "./build/artifacts",
cache: "./build/cache",
deployments: "./build/deployments",
},
typechain: {
outDir: "./build/typechain",
},
gasReporter: {
currency: "USD",
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
token: process.env.TOKEN,
gasPriceApi: process.env.GAS_PRICE_API,
enabled: process.env.REPORT_GAS === "true",
maxMethodDiff: 10,
},
networks: {
hardhat: {
accounts: {
mnemonic: process.env.MNEMONIC,
},
},
localhost: {
url: "http://127.0.0.1:8545",
accounts: {
mnemonic: process.env.MNEMONIC,
},
},
ropsten: {
url: `https://ropsten.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: {
mnemonic: process.env.MNEMONIC,
},
},
avalanche: {
url: "https://api.avax.network/ext/bc/C/rpc",
gasPrice: 85000000000,
gasMultiplier: 2,
accounts: {
mnemonic: process.env.MNEMONIC,
},
},
fuji: {
url: "https://api.avax-test.network/ext/bc/C/rpc",
gasMultiplier: 2,
accounts: {
mnemonic: process.env.MNEMONIC,
},
},
},
namedAccounts: {
deployer: 0,
admin: 1,
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY || "API_KEY_WEB",
},
abiExporter: {
path: "./build/abis",
runOnCompile: true,
clear: true,
flat: true,
only: [],
spacing: 2,
pretty: false,
},
}
export default config