-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
72 lines (69 loc) · 1.77 KB
/
hardhat.config.ts
File metadata and controls
72 lines (69 loc) · 1.77 KB
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
import "dotenv/config";
import hardhatVerify from "@nomicfoundation/hardhat-verify";
import hardhatToolboxViemPlugin from "@nomicfoundation/hardhat-toolbox-viem";
import { configVariable, defineConfig } from "hardhat/config";
import dotenv from "dotenv";
dotenv.config();
const privateKey = process.env.PRIVATE_KEY;
export default defineConfig({
plugins: [hardhatToolboxViemPlugin, hardhatVerify],
solidity: {
profiles: {
default: {
version: "0.8.28",
settings: {
viaIR: true,
optimizer: { enabled: true, runs: 200 },
},
},
production: {
version: "0.8.28",
settings: {
viaIR: true,
optimizer: {
enabled: true,
runs: 200,
},
},
},
},
npmFilesToBuild: ["@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"],
},
networks: {
hardhatMainnet: {
type: "edr-simulated",
chainType: "l1",
},
hardhatOp: {
type: "edr-simulated",
chainType: "op",
},
sepolia: {
type: "http",
chainType: "l1",
url: process.env.SEPOLIA_RPC_URL || configVariable("SEPOLIA_RPC_URL"),
accounts: privateKey ? [privateKey] : [configVariable("PRIVATE_KEY")],
},
baseMainnet: {
type: "http",
chainType: "op",
url:
process.env.BASE_MAINNET_RPC_URL ||
configVariable("BASE_MAINNET_RPC_URL"),
accounts: privateKey ? [privateKey] : [configVariable("PRIVATE_KEY")],
// @ts-ignore
verify: {
etherscan: {
apiUrl: "https://api.basescan.org",
apiKey: process.env.BASESCAN_API_KEY,
},
},
},
},
"verify": {
etherscan: {
"apiKey": process.env.BASESCAN_API_KEY || "",
"enabled": true
}
}
});