-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
45 lines (41 loc) · 967 Bytes
/
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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "hardhat-deploy";
import { loadTasks } from "./helpers/utils";
import { MNEMONIC, MNEMONIC_PATH, PRIVATE_KEY, SKIP_LOAD } from "./helpers/env";
// Prevent to load tasks before compilation and typechain
if (!SKIP_LOAD) {
loadTasks(["deploy", "misc"]); // load task folders
}
const accounts =
(PRIVATE_KEY && { accounts: [PRIVATE_KEY] }) ||
(MNEMONIC && {
accounts: {
mnemonic: MNEMONIC,
path: MNEMONIC_PATH,
initialIndex: 0,
count: 10,
},
});
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.24",
settings: {
optimizer: { enabled: true, runs: 100_000 },
},
},
],
},
networks: {
sepolia: {
url: "https://sepolia.drpc.org",
...accounts,
},
},
typechain: {
outDir: "typechain",
},
};
export default config;