-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
109 lines (105 loc) · 2.4 KB
/
hardhat.config.ts
File metadata and controls
109 lines (105 loc) · 2.4 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
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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-verify";
import "hardhat-deploy";
import "hardhat-gas-reporter";
import "solidity-coverage";
import * as dotenv from "dotenv";
dotenv.config();
const PRIVATE_KEY = process.env.PRIVATE_KEY || "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
const BASE_SEPOLIA_RPC = process.env.BASE_SEPOLIA_RPC || "https://sepolia.base.org";
const BASESCAN_API_KEY = process.env.BASESCAN_API_KEY || "";
const COINMARKETCAP_API_KEY = process.env.COINMARKETCAP_API_KEY || "";
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.24",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
}
],
},
networks: {
hardhat: {
chainId: 31337,
forking: {
url: BASE_SEPOLIA_RPC,
enabled: false, // Enable when needed for forking lessons
},
},
baseSepolia: {
url: BASE_SEPOLIA_RPC,
chainId: 84532,
accounts: [PRIVATE_KEY],
gasPrice: "auto",
},
sepolia: {
url: process.env.SEPOLIA_RPC || "https://rpc.sepolia.org",
chainId: 11155111,
accounts: [PRIVATE_KEY],
},
localhost: {
url: "http://127.0.0.1:8545",
chainId: 31337,
},
},
etherscan: {
apiKey: {
baseSepolia: BASESCAN_API_KEY,
sepolia: process.env.ETHERSCAN_API_KEY || "",
},
customChains: [
{
network: "baseSepolia",
chainId: 84532,
urls: {
apiURL: "https://api-sepolia.basescan.org/api",
browserURL: "https://sepolia.basescan.org",
},
},
],
},
gasReporter: {
enabled: process.env.REPORT_GAS === "true",
currency: "USD",
coinmarketcap: COINMARKETCAP_API_KEY,
token: "ETH",
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
deploy: "./scripts/deploy",
deployments: "./deployments",
},
namedAccounts: {
deployer: {
default: 0,
},
user1: {
default: 1,
},
user2: {
default: 2,
},
},
mocha: {
timeout: 40000,
},
};
export default config;