-
Notifications
You must be signed in to change notification settings - Fork 4
/
hardhat.config.ts
91 lines (87 loc) · 2.44 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
import "@nomiclabs/hardhat-ethers"
import "@nomicfoundation/hardhat-chai-matchers"
import "@tenderly/hardhat-tenderly"
import "@typechain/hardhat"
import "hardhat-gas-reporter"
import "solidity-coverage"
import "hardhat-abi-exporter"
import "@nomiclabs/hardhat-etherscan"
import "ts-node/register"
import "tsconfig-paths/register"
import "solidity-docgen"
import { config as dotenvConfig } from "dotenv"
import { resolve } from "path"
dotenvConfig({ path: resolve(__dirname, "./.env") })
export const hardhatConfig = {
networks: {
hardhat: {
allowUnlimitedContractSize: false,
initialBaseFeePerGas: 0,
},
local: { url: "http://localhost:8545" },
// export the NODE_URL environment variable to use remote nodes like Alchemy or Infura. ge
// export NODE_URL=https://eth-mainnet.alchemyapi.io/v2/yourApiKey
anvil: { url: "http://localhost:8545" },
ropsten: {
url: process.env.NODE_URL || "",
},
goerli: {
url: process.env.NODE_URL || "",
},
polygon_testnet: {
url: process.env.NODE_URL || "https://rpc-mumbai.maticvigil.com",
},
polygon_mainnet: {
url: process.env.NODE_URL || "https://rpc-mainnet.matic.quiknode.pro",
},
mainnet: {
url: process.env.NODE_URL || "https://main-light.eth.linkpool.io",
},
rinkeby: {
url: process.env.NODE_URL || `https://eth-rinkeby.alchemyapi.io/v2/alchemyApiKey`,
},
},
solidity: {
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
outputSelection: {
"*": {
Nexus: ["storageLayout"],
},
},
},
},
paths: { artifacts: "./artifacts" },
abiExporter: {
path: "./abis",
clear: true,
flat: true,
},
gasReporter: {
currency: "USD",
gasPrice: 30,
},
mocha: {
timeout: 240000, // 4 min timeout
},
typechain: {
outDir: "types/generated",
target: "ethers-v5",
},
tenderly: {
username: "alsco77",
project: "mStable",
},
etherscan: {
apiKey: process.env.ETHERSCAN_KEY,
},
docgen: {
outputDir: "./docs/natspec",
templates: "./docs/templates",
},
}
export default hardhatConfig