-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
88 lines (83 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
import * as dotenv from "dotenv";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-ethers";
import "@typechain/hardhat";
import "hardhat-contract-sizer";
import "hardhat-gas-reporter";
import "@nomiclabs/hardhat-etherscan";
import "hardhat-deploy";
import "solidity-coverage";
import "@openzeppelin/hardhat-upgrades";
import "@openzeppelin/hardhat-defender";
import { HardhatUserConfig } from "hardhat/types";
dotenv.config();
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const config: HardhatUserConfig = {
solidity: {
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 2000,
},
},
},
networks: {
hardhat: {
chainId: 1234, // Intentionally set to an "unknown" so openzeppelin upgrades doesn't think forked local is mainnet
allowUnlimitedContractSize: true,
accounts: {
mnemonic: process.env.MNEMONIC,
},
forking: {
url: process.env.MAINNET_URL || "",
blockNumber: parseInt(process.env.BLOCK_NUMBER ?? "0"),
enabled: true, // Set to false to disable forked mainnet mode
},
},
mainnet: {
url: process.env.MAINNET_URL || "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
},
paths: {
deploy: "./scripts/deploy",
deployments: "./deployments",
sources: "./contracts",
},
namedAccounts: {
admin: {
default: 0,
},
alice: {
default: 1,
},
bob: {
default: 2,
},
bill: {
default: 3,
},
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
},
gasReporter: {
enabled: true,
currency: "USD",
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
customChains: [],
},
mocha: {
timeout: 13000000,
},
};
export default config;