-
Notifications
You must be signed in to change notification settings - Fork 3
/
hardhat.config.ts
88 lines (85 loc) · 2.39 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 { 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 {
SEPOLIA_RPC_ENDPOINT_URL,
SEPOLIA_PRIVATE_KEY,
ETHERSCAN_API_KEY,
OPTIMISM_MAINNET_RPC_ENDPOINT_URL,
OPTIMISM_MAINNET_PRIVATE_KEY,
OP_ETHERSCAN_API_KEY,
OP_SEPOLIA_RPC_ENDPOINT_URL,
OP_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]
: []
},
"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]
: []
}
},
solidity: {
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
etherscan: {
apiKey: {
sepolia: ETHERSCAN_API_KEY || "",
optimisticEthereum: OP_ETHERSCAN_API_KEY || "",
"op-sepolia": OP_ETHERSCAN_API_KEY || ""
},
customChains: [
{
network: "op-sepolia",
chainId: 11155420,
urls: {
apiURL: "https://api-sepolia-optimistic.etherscan.io/api",
browserURL: "https://sepolia-optimism.etherscan.io"
}
}
]
}
}
export default config