-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhardhat.config.ts
80 lines (77 loc) · 2.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
import "@typechain/hardhat";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-etherscan";
import "hardhat-deploy";
import "solidity-coverage";
import "hardhat-gas-reporter";
import "./tasks/launch_FairSale";
import "./tasks/launch_FixedPriceSale";
import dotenv from "dotenv";
import { HardhatUserConfig } from "hardhat/types";
dotenv.config();
export const config: HardhatUserConfig = {
// namedAccounts are used if no config is found for given network in deploy/deployment.config.ts
namedAccounts: {
deployer: {
default: 0,
},
},
networks: {
mainnet: {
live: true,
saveDeployments: true,
url: `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`,
},
rinkeby: {
live: false,
saveDeployments: true,
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_KEY}`,
accounts: [`${process.env.PRIVATE_KEY}`],
},
xdai: {
live: true,
saveDeployments: true,
url: "https://xdai.poanetwork.dev",
accounts: [`${process.env.PRIVATE_KEY}`],
},
hardhat: {
hardfork: process.env.CODE_COVERAGE ? "berlin" : "london",
},
},
mocha: {
timeout: "600s",
},
paths: {
artifacts: "build/artifacts",
cache: "build/cache",
deploy: "deploy",
sources: "contracts",
deployments: "deployments",
},
solidity: {
compilers: [
{
version: "0.6.12",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
gasReporter: {
currency: "USD",
enabled: process.env.GAS_REPORT_ENABLED === "true",
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
typechain: {
outDir: "typechain",
target: "ethers-v5",
},
};
export default config;