-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.ts
96 lines (89 loc) · 1.93 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
/// ENVVAR
// - ENABLE_GAS_REPORT
// - CI
// - RUNS
import "dotenv/config";
import yargs from "yargs";
import { nodeUrl, accounts } from "./utils/network";
import { HardhatUserConfig } from "hardhat/config";
import "hardhat-contract-sizer";
import "hardhat-spdx-license-identifier";
import "hardhat-docgen";
import "hardhat-deploy";
import "hardhat-abi-exporter";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-truffle5";
import "@nomiclabs/hardhat-solhint";
import "@openzeppelin/hardhat-upgrades";
import "solidity-coverage";
import "@tenderly/hardhat-tenderly";
import "@typechain/hardhat";
const argv = yargs
.env("")
.boolean("ci")
.number("runs")
.boolean("fork")
.boolean("disableAutoMining");
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.7",
settings: {
optimizer: {
enabled: true,
runs: 1000000,
},
// debug: { revertStrings: 'strip' },
},
},
]
},
defaultNetwork: "hardhat",
networks: {
hardhat: {
accounts: accounts("mainnet"),
live: false,
blockGasLimit: 125e5,
initialBaseFeePerGas: 0,
hardfork: "london",
forking: {
enabled: false,
url: nodeUrl("fork"),
// This is the last block before the deployer role is removed
// blockNumber: 13473325,
},
chainId: 1337,
},
polygon: {
url: nodeUrl("polygon"),
accounts: accounts("polygon"),
gas: "auto",
},
mainnet: {
live: true,
url: nodeUrl("mainnet"),
accounts: accounts("mainnet"),
gas: "auto",
gasMultiplier: 1.3,
chainId: 1,
},
},
paths: {
sources: "./contracts",
tests: "./tests",
},
namedAccounts: {
deployer: 0,
guardian: 1,
user: 2,
slp: 3,
ha: 4,
keeper: 5,
user2: 6,
slp2: 7,
ha2: 8,
keeper2: 9,
},
};
export default config;