forked from Uniswap/v2-periphery
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
100 lines (97 loc) · 2.18 KB
/
hardhat.config.ts
File metadata and controls
100 lines (97 loc) · 2.18 KB
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
import dotenv from "dotenv";
import { HardhatUserConfig } from "hardhat/types";
import "@nomicfoundation/hardhat-chai-matchers";
import "@nomicfoundation/hardhat-network-helpers";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-etherscan";
import "@typechain/hardhat";
import "hardhat-dependency-compiler"
import "hardhat-deploy";
import "hardhat-gas-reporter";
import "solidity-coverage";
dotenv.config();
const infuraKey = process.env.INFURA_KEY;
const accounts = process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : [];
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.5.16",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.6.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
}
]
},
paths: {
artifacts: "build/artifacts",
cache: "build/cache",
deploy: "deploy",
sources: "contracts",
deployments: "deployments",
},
defaultNetwork: "hardhat",
networks: {
hardhat: {
blockGasLimit: 15000000, //default 30 000 000
gasPrice: 100000000000, //100 Gwei,
chainId: 1 //set mainnet ID - important for PERMIT functionality
},
localhost: {
url: "http://localhost:8545",
gasPrice: 20000000000 //20 Gwei,
},
mainnet: {
live: true,
saveDeployments: true,
url: `https://mainnet.infura.io/v3/${infuraKey}`,
accounts,
},
gnosis: {
live: true,
saveDeployments: true,
url: "https://rpc.gnosischain.com/",
accounts,
},
rinkeby: {
live: false,
saveDeployments: true,
url: `https://rinkeby.infura.io/v3/${infuraKey}`,
accounts,
},
},
typechain: {
outDir: "typechain",
target: "ethers-v5",
},
namedAccounts: {
deployer: 0,
account1: 1,
account2: 2,
},
gasReporter: {
currency: "USD",
enabled: process.env.GAS_REPORT_ENABLED === "true",
},
etherscan: {
apiKey: process.env.ETHERSCAN_KEY,
},
dependencyCompiler: {
paths: [
'./contracts/test',
]
}
};
export default config;