-
Notifications
You must be signed in to change notification settings - Fork 5
/
hardhat.config.ts
55 lines (50 loc) · 1.37 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
import "@nomicfoundation/hardhat-toolbox"
import "@nomicfoundation/hardhat-chai-matchers"
import "@nomiclabs/hardhat-ethers"
import "@nomiclabs/hardhat-solhint"
import "solidity-docgen"
import "hardhat-contract-sizer"
import * as dotenv from "dotenv"
import { HardhatUserConfig } from "hardhat/config"
dotenv.config()
const { GOERLI_API, MAINNET_API, PRIVATE_KEY, ETHERSCAN_KEY } = process.env
const config: HardhatUserConfig = {
solidity: {
version: "0.8.15",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
contractSizer: {
alphaSort: false,
disambiguatePaths: true,
runOnCompile: true,
strict: false,
only: [],
},
networks: {
hardhat: {
initialBaseFeePerGas: 0,
},
goerli: {
url: GOERLI_API,
accounts: PRIVATE_KEY !== undefined ? [PRIVATE_KEY] : [],
},
ethereum: {
chainId: 1,
url: MAINNET_API,
accounts: PRIVATE_KEY !== undefined ? [PRIVATE_KEY] : [],
},
polygon: {
url: "https://rpc-mumbai.maticvigil.com" /*"https://polygon-rpc.com"*/,
accounts: PRIVATE_KEY !== undefined ? [PRIVATE_KEY] : [],
},
},
etherscan: {
apiKey: ETHERSCAN_KEY,
},
}
export default config