-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
61 lines (58 loc) · 1.67 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
import type { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox-viem";
import "@openzeppelin/hardhat-upgrades";
import { config as loadEnv } from "dotenv";
loadEnv();
const PRIVATE_KEY = process.env.PRIVATE_KEY;
const INFURA_ID = process.env.INFURA_ID;
const INFURA_MAINNET_URL = process.env.INFURA_MAINNET_URL;
const INFURA_SEPOLIA_URL = process.env.INFURA_SEPOLIA_URL;
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY;
const COINMARKETCAP_API_KEY = process.env.COINMARKETCAP_API_KEY;
const config: HardhatUserConfig = {
networks: {
local: {
url: "http://localhost:8545",
},
hardhat: {
allowUnlimitedContractSize: true,
},
mainnet: {
url: `${INFURA_MAINNET_URL}${INFURA_ID}`,
accounts: [PRIVATE_KEY as string],
chainId: 1,
},
sepolia: {
url: `${INFURA_SEPOLIA_URL}${INFURA_ID}`,
accounts: [PRIVATE_KEY as string],
chainId: 11155111,
},
},
etherscan: {
apiKey: {
mainnet: ETHERSCAN_API_KEY || "",
sepolia: ETHERSCAN_API_KEY || "",
},
},
solidity: {
compilers: [
{
version: "0.8.27",
settings: {
optimizer: {
enabled: true,
runs: 1000000,
},
evmVersion: "cancun",
},
},
],
},
gasReporter: {
enabled: true,
currency: "USD",
gasPrice: 21,
coinmarketcap: COINMARKETCAP_API_KEY,
},
};
export default config;