-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhardhat.config.ts
165 lines (151 loc) · 3.97 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-chai-matchers";
import "hardhat-switch-network";
import "hardhat-docgen";
import "@nomicfoundation/hardhat-verify";
import dotenv from "dotenv";
// import { setBlockGasLimit } from "@nomicfoundation/hardhat-toolbox/network-helpers";
// import { ethers } from "ethers";
dotenv.config();
const mnemonic = process.env.WTTP_MNEMONIC || "test test test test test test test test test test test junk";
// console.log(mnemonic.split(' ')[0]);
const accountsPath = "m/44'/60'/0'/0";
const accountsCount = 3;
// const defaultAccount = {
// mnemonic: mnemonic,
// path: accountsPath,
// count: accountsCount
// }
const defaultAccount = [
process.env.PRIVATE_KEY || "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cdb9d98f34", // Add a default testing private key
process.env.DPs_DEPLOYER || "",
process.env.DPR_DEPLOYER || "",
process.env.WTTP_DEPLOYER || "",
].filter(key => key !== ""); // Remove empty strings
// const defaultAccount = {
// accounts: privateKeys
// }
const polygon = {
url: "https://polygon-bor-rpc.publicnode.com",
chainId: 137,
blockGasLimit: 200000000,
accounts: defaultAccount
}
const ethereum = {
url: "https://ethereum-rpc.publicnode.com",
chainId: 1,
blockGasLimit: 200000000,
accounts: defaultAccount
}
const sepolia = {
url: "https://ethereum-sepolia-rpc.publicnode.com",
chainId: 11155111,
setBlockGasLimit: 30000000,
accounts: defaultAccount
}
const base = {
url: "https://base-rpc.publicnode.com",
chainId: 8453,
blockGasLimit: 200000000,
accounts: defaultAccount
}
const fantom = {
url: "https://fantom-rpc.publicnode.com",
chainId: 250,
blockGasLimit: 200000000,
accounts: defaultAccount
}
const arbitrum = {
url: "https://arbitrum-one-rpc.publicnode.com",
chainId: 42161,
blockGasLimit: 200000000,
accounts: defaultAccount
}
const avalanche = {
url: "https://avalanche-c-chain-rpc.publicnode.com",
chainId: 43114,
blockGasLimit: 200000000,
accounts: defaultAccount
}
const optimism = {
url: "https://optimism-rpc.publicnode.com",
chainId: 10,
blockGasLimit: 200000000,
accounts: defaultAccount
}
const aves = {
url: "https://rpc.avescoin.io",
chainId: 33333,
blockGasLimit: 200000000,
accounts: defaultAccount
}
const config: HardhatUserConfig = {
solidity: "0.8.27",
networks: {
hardhat: {
chainId: 1337,
blockGasLimit: 200000000,
accounts: defaultAccount.map(key => ({
privateKey: key,
balance: "10000000000000000000000" // 10000 ETH in wei
}))
},
polygon: polygon,
ethereum: ethereum,
sepolia: sepolia,
base: base,
fantom: fantom,
arbitrum: arbitrum,
avalanche: avalanche,
optimism: optimism,
aves: aves,
},
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY || "",
optimisticEthereum: process.env.OPSCAN_API_KEY || "",
arbitrumOne: process.env.ARBISCAN_API_KEY || "",
polygon: process.env.POLYGONSCAN_API_KEY || "",
base: process.env.BASESCAN_API_KEY || "",
fantom: process.env.FANTOMSCAN_API_KEY || "",
snowtrace: "snowtrace",
aves: "blockscout",
},
customChains: [
{
network: "fantom",
chainId: 250,
urls: {
apiURL: "https://api.ftmscan.com/api",
browserURL: "https://ftmscan.com"
}
},
{
network: "snowtrace",
chainId: 43114,
urls: {
apiURL: "https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan",
browserURL: "https://avalanche.routescan.io"
}
},
{
network: "aves",
chainId: 33333,
urls: {
apiURL: "https://avescoin.io/api",
browserURL: "https://avescoin.io"
}
}
]
},
sourcify: {
enabled: false
},
docgen: {
path: './docs/solidity',
clear: true,
runOnCompile: false
}
};
export default config;