-
Notifications
You must be signed in to change notification settings - Fork 3
/
hardhat.config.ts
123 lines (120 loc) · 3.56 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
import { HardhatUserConfig } from "hardhat/config"
import "@nomicfoundation/hardhat-toolbox"
import "@nomicfoundation/hardhat-verify"
import "hardhat-deploy"
import * as dotenv from "dotenv"
import "./tasks/mint"
import "./tasks/send"
dotenv.config()
const {
OPTIMISM_MAINNET_RPC_ENDPOINT_URL,
OPTIMISM_MAINNET_PRIVATE_KEY,
OP_ETHERSCAN_API_KEY,
BASE_MAINNET_RPC_ENDPOINT_URL,
BASE_MAINNET_PRIVATE_KEY,
BASE_ETHERSCAN_API_KEY,
SEPOLIA_RPC_ENDPOINT_URL,
SEPOLIA_PRIVATE_KEY,
ETHERSCAN_API_KEY,
OP_SEPOLIA_RPC_ENDPOINT_URL,
OP_SEPOLIA_PRIVATE_KEY,
BASE_SEPOLIA_RPC_ENDPOINT_URL,
BASE_SEPOLIA_PRIVATE_KEY
} = process.env
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
namedAccounts: {
deployer: 0
},
networks: {
hardhat: {
chainId: 1337,
allowUnlimitedContractSize: true
},
sepolia: {
chainId: 11155111,
url:
SEPOLIA_RPC_ENDPOINT_URL ||
"https://ethereum-sepolia.publicnode.com",
accounts:
SEPOLIA_PRIVATE_KEY !== undefined ? [SEPOLIA_PRIVATE_KEY] : []
},
optimism: {
chainId: 10,
url:
OPTIMISM_MAINNET_RPC_ENDPOINT_URL ||
"https://mainnet.optimism.io",
accounts:
OPTIMISM_MAINNET_PRIVATE_KEY !== undefined
? [OPTIMISM_MAINNET_PRIVATE_KEY]
: []
},
base: {
chainId: 8453,
url: BASE_MAINNET_RPC_ENDPOINT_URL || "https://mainnet.base.org",
accounts:
BASE_MAINNET_PRIVATE_KEY !== undefined
? [BASE_MAINNET_PRIVATE_KEY]
: []
},
"op-sepolia": {
chainId: 11155420,
url:
OP_SEPOLIA_RPC_ENDPOINT_URL ||
"https://ethereum-sepolia.publicnode.com",
accounts:
OP_SEPOLIA_PRIVATE_KEY !== undefined
? [OP_SEPOLIA_PRIVATE_KEY]
: []
},
"base-sepolia": {
chainId: 84532,
url: BASE_SEPOLIA_RPC_ENDPOINT_URL || "https://sepolia.base.org",
accounts:
BASE_SEPOLIA_PRIVATE_KEY !== undefined
? [BASE_SEPOLIA_PRIVATE_KEY]
: []
}
},
solidity: {
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
sourcify: {
enabled: true
},
etherscan: {
apiKey: {
optimism: OP_ETHERSCAN_API_KEY || "",
base: BASE_ETHERSCAN_API_KEY || "",
sepolia: ETHERSCAN_API_KEY || "",
optimisticEthereum: OP_ETHERSCAN_API_KEY || "",
"op-sepolia": OP_ETHERSCAN_API_KEY || "",
"base-sepolia": BASE_ETHERSCAN_API_KEY || ""
},
customChains: [
{
network: "op-sepolia",
chainId: 11155420,
urls: {
apiURL: "https://api-sepolia-optimistic.etherscan.io/api",
browserURL: "https://sepolia-optimism.etherscan.io"
}
},
{
network: "base-sepolia",
chainId: 84532,
urls: {
apiURL: "https://api-sepolia.basescan.org/api",
browserURL: "https://basescan.org/"
}
}
]
}
}
export default config