-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
executable file
·127 lines (123 loc) · 3.51 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
import '@typechain/hardhat';
import '@nomicfoundation/hardhat-ethers';
import "@nomicfoundation/hardhat-verify";
import '@openzeppelin/hardhat-upgrades';
import 'solidity-coverage';
import "hardhat-gas-reporter";
import "@nomicfoundation/hardhat-chai-matchers";
import dotenv from 'dotenv';
dotenv.config();
export default {
networks: {
hardhat: {
accounts: {
count: 50
},
allowBlocksWithSameTimestamp: true,
},
eth: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: process.env.ETH_DEPLOYER_KEY !== undefined ? [process.env.ETH_DEPLOYER_KEY] : undefined,
},
arb1: {
url: "https://arb1.arbitrum.io/rpc",
accounts: process.env.ARBITRUM_DEPLOYER_KEY !== undefined ? [process.env.ARBITRUM_DEPLOYER_KEY] : undefined,
},
arbnova: {
url: "https://nova.arbitrum.io/rpc",
accounts: process.env.ARBITRUM_NOVA_DEPLOYER_KEY !== undefined ? [process.env.ARBITRUM_NOVA_DEPLOYER_KEY] : undefined,
},
goerli: {
url: "https://rpc.goerli.dev",
accounts: process.env.GOERLI_DEPLOYER_KEY !== undefined ? [process.env.GOERLI_DEPLOYER_KEY] : undefined,
},
arbg: {
url: "https://goerli-rollup.arbitrum.io/rpc",
accounts: process.env.ARBITRUM_GOERLI_DEPLOYER_KEY !== undefined ? [process.env.ARBITRUM_GOERLI_DEPLOYER_KEY] : undefined,
},
arbs: {
url: "https://sepolia-rollup.arbitrum.io/rpc",
accounts: process.env.ARBITRUM_SEPOLIA_DEPLOYER_KEY !== undefined ? [process.env.ARBITRUM_SEPOLIA_DEPLOYER_KEY] : undefined,
},
linea: {
url: "https://rpc.linea.build",
},
polygon: {
url: "https://polygon-rpc.com/",
},
},
solidity: {
version: "0.8.27",
settings: {
// viaIR: true,
optimizer: {
enabled: true,
runs: 10000,
},
// tried to use SMTChecker, gets killed, investigate later
// modelChecker: {
// engine: "all",
// targets: [
// "assert",
// "overflow",
// "underflow",
// "divByZero",
// "constantCondition",
// "popEmptyArray",
// "outOfBounds",
// "balance",
// ],
// },
},
},
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY,
arb1: process.env.ARBISCAN_API_KEY,
arbg: process.env.ARBISCAN_API_KEY,
arbs: process.env.ARBISCAN_API_KEY,
arbnova: process.env.ARBISCAN_API_KEY,
linea: process.env.LINEASCAN_API_KEY,
polygon: process.env.POLYGONSCAN_API_KEY,
},
customChains: [{
network: "arbg",
chainId: 421613,
urls: {
apiURL: "https://api-goerli.arbiscan.io/api",
browserURL: "https://goerli.arbiscan.io",
},
}, {
network: "arbs",
chainId: 421614,
urls: {
apiURL: "https://api-sepolia.arbiscan.io/api",
browserURL: "https://sepolia.arbiscan.io",
},
}, {
network: "arbnova",
chainId: 42170,
urls: {
apiURL: "https://api-nova.arbiscan.io/api",
browserURL: "https://nova.arbiscan.io",
},
}, {
network: "arb1",
chainId: 42161,
urls: {
apiURL: "https://api.arbiscan.io/api",
browserURL: "https://arbiscan.io",
},
}, {
network: "linea",
chainId: 59144,
urls: {
apiURL: "https://api.lineascan.build/api",
browserURL: "https://lineascan.build",
},
}],
},
gasReporter: {
enabled: process.env?.GAS_REPORTER?.toLowerCase() == "true"
}
};