-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
56 lines (51 loc) · 1.18 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox-viem";
import "@nomicfoundation/hardhat-chai-matchers";
import { config as dotenvConfig } from "dotenv";
import { resolve } from "path";
dotenvConfig({ path: resolve(__dirname, "./.env") });
const {
NETWORK,
ACCOUNT_MNEMONIC,
MAINNET_RPC_URL,
SEPOLIA_RPC_URL,
MAINNET_SCAN_API_KEY
} = process.env;
const accounts = {
mnemonic: ACCOUNT_MNEMONIC!,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 11,
passphrase: "",
}
const config: HardhatUserConfig = {
solidity: {
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
defaultNetwork: NETWORK!,
networks: {
mainnet: {
chainId: 1,
url: MAINNET_RPC_URL!,
accounts,
},
sepolia: {
chainId: 11155111,
url: SEPOLIA_RPC_URL!,
accounts,
}
},
etherscan: {
apiKey: {
mainnet: MAINNET_SCAN_API_KEY!,
sepolia: MAINNET_SCAN_API_KEY!,
}
}
};
export default config;