-
Notifications
You must be signed in to change notification settings - Fork 3
/
hardhat.config.ts
107 lines (102 loc) · 2.66 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
97
98
99
100
101
102
103
104
105
106
107
import "@typechain/hardhat"
import "@nomiclabs/hardhat-waffle"
import "@nomiclabs/hardhat-etherscan"
import "@nomiclabs/hardhat-ethers"
import "hardhat-gas-reporter"
import "dotenv/config"
import "solidity-coverage"
import "hardhat-deploy"
import "hardhat-contract-sizer"
import { HardhatUserConfig } from "hardhat/config"
const MAINNET_RPC_URL = process.env.MAINNET_RPC_URL || "https://mainnet.alchemyapi.io/v3/your-api-key"
const HOLESKY_RPC_URL = process.env.HOLESKY_RPC_URL || "https://holesky.alchemyapi.io/v3/your-api-key"
const PRIVATE_KEY = process.env.PRIVATE_KEY || "0000000000000000000000000000000000000000000000000000000000000000"
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || ""
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
chainId: 1,
blockGasLimit: 30000000,
gasPrice: 0,
initialBaseFeePerGas: 0,
allowUnlimitedContractSize: true,
accounts: {
mnemonic: 'explain tackle mirror kit van hammer degree position ginger unfair soup bonus',
count: 20,
accountsBalance: '100000000000000000000000',
},
forking: {
url: MAINNET_RPC_URL,
blockNumber: 20067153
}
},
holesky: {
url: HOLESKY_RPC_URL,
accounts: [PRIVATE_KEY],
chainId: 17000,
},
mainnet: {
url: MAINNET_RPC_URL,
accounts: [PRIVATE_KEY],
chainId: 1,
},
},
solidity: {
version: "0.8.24",
settings: {
viaIR: true,
optimizer: {
enabled: true,
details: {
yulDetails: {
optimizerSteps: "u",
},
},
},
},
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
customChains: [
{
network: "holesky",
chainId: 17000,
urls: {
apiURL: "https://api-holesky.etherscan.io/api",
browserURL: "https://holesky.etherscan.io"
}
}
]
},
gasReporter: {
enabled: true,
currency: "USD",
outputFile: "gas-report.txt",
noColors: true,
},
namedAccounts: {
deployer: {
default: 0
},
owner: { // manages all aspects of contracts, can recover accidentally sent assets, P2P secure address (cold storage, multisig, etc.)
default: 1
},
operator: { // instance creator
default: 2
},
serviceAddress: { // will receive EL rewards, P2P secure address (cold storage, multisig, etc.)
default: 3
},
clientAddress: { // // will receive client's EL rewards
default: 4
},
clientDepositor: { // client address making initial ETH deposit
default: 5
},
nobody: {
default: 6
},
},
}
export default config