-
Notifications
You must be signed in to change notification settings - Fork 83
/
hardhat.config.ts
90 lines (85 loc) · 2.36 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
import "@nomiclabs/hardhat-ethers"
import "@nomiclabs/hardhat-waffle"
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"
// chainId?: number
// from?: string;
// gas: "auto" | number;
// gasPrice: "auto" | number;
// gasMultiplier: number;
// url: string;
// timeout: number;
// httpHeaders: { [name: string]: string };
// accounts: HttpNetworkAccountsConfig;
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const compilerConfig = (version: string) => ({
version,
settings: {
optimizer: {
enabled: true,
runs: 200,
},
outputSelection: {
"*": {
SavingsContract: ["storageLayout"],
},
},
},
})
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
ropsten: {
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",
},
},
solidity: {
compilers: [{ ...compilerConfig("0.8.6") }, { ...compilerConfig("0.8.2") }, { ...compilerConfig("0.5.16") }],
},
paths: { artifacts: "./build" },
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,
},
}
export default hardhatConfig