-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhardhat.config.fork.sepolia.ts
More file actions
42 lines (37 loc) · 1.17 KB
/
hardhat.config.fork.sepolia.ts
File metadata and controls
42 lines (37 loc) · 1.17 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import type { HttpNetworkAccountsUserConfig } from "hardhat/types";
import dotenv from 'dotenv';
// Load environment variables.
dotenv.config();
const { SEPOLIA_RPC, MAINNET_RPC, ETHERSCAN_API_KEY, PK, MNEMONIC } = process.env;
const DEFAULT_MNEMONIC = "test test test test test test test test test test test junk" // same as hardhat's default mnemonic
const accounts: HttpNetworkAccountsUserConfig = PK
? [PK]
: { mnemonic: MNEMONIC || DEFAULT_MNEMONIC };
// @ts-ignore
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
hardfork: "merge", // https://ethereum.org/en/history/#paris
forking: {
url: SEPOLIA_RPC!,
blockNumber: 7606599,
},
chainId: 11155111, // chainId must be the same as the forking network
accounts: accounts as any,
},
},
solidity: {
version: "0.8.27",
settings: {
optimizer: {
enabled: true,
runs: 200
},
evmVersion: `paris`, // https://github.com/NomicFoundation/hardhat/issues/4232
}
},
};
export default config;