-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathhardhat.config.ts
78 lines (75 loc) · 2 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
import "@nomiclabs/hardhat-waffle";
import "@openzeppelin/hardhat-upgrades";
import * as dotenv from "dotenv";
import "hardhat-abi-exporter";
import "hardhat-contract-sizer";
import "hardhat-gas-reporter";
import { HardhatUserConfig } from "hardhat/config";
dotenv.config();
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.7.4",
settings: {
optimizer: {
runs: 200,
enabled: true,
},
},
},
],
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
},
abiExporter: {
path: "./data/abi",
clear: true,
flat: true,
spacing: 2,
},
networks: {
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`,
chainId: 1,
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : "remote",
},
ropsten: {
url: `https://ropsten.infura.io/v3/${process.env.INFURA_ID}`,
chainId: 3,
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : "remote",
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_ID}`,
chainId: 4,
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : "remote",
},
kovan: {
url: `https://kovan.infura.io/v3/${process.env.INFURA_ID}`,
chainId: 42,
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : "remote",
},
goerli: {
url: "https://goerli.prylabs.net",
chainId: 5,
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : "remote",
},
mumbai: {
url: "https://rpc-mumbai.maticvigil.com",
chainId: 80001,
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : "remote",
},
matic: {
url: "https://rpc-mainnet.matic.network",
chainId: 137,
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : "remote",
},
},
paths: {
sources: "./contracts/flatten",
tests: "./test",
},
};
export default config;