forked from timeless-fi/options-token
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
78 lines (68 loc) · 1.85 KB
/
hardhat.config.ts
File metadata and controls
78 lines (68 loc) · 1.85 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import '@openzeppelin/hardhat-upgrades';
import "@nomicfoundation/hardhat-foundry";
import glob from "glob";
import {TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS} from "hardhat/builtin-tasks/task-names";
import path from "path";
import { subtask } from "hardhat/config";
import { config as dotenvConfig } from "dotenv";
// import "@nomiclabs/hardhat-ethers";
import "@nomicfoundation/hardhat-verify";
import "hardhat-contract-sizer";
dotenvConfig();
const PRIVATE_KEY = process.env.PRIVATE_KEY || "";
const config: HardhatUserConfig = {
solidity: {
version: "0.8.19",
settings: {
optimizer: { enabled: true, runs: 200 }
}
},
sourcify: {
enabled: true
},
paths: {
sources: "./src",
tests: "./test_hardhat",
},
networks: {
op: {
url: "https://mainnet.optimism.io",
chainId: 10,
accounts: [`0x${PRIVATE_KEY}`],
},
bsc: {
url: "https://bsc-dataseed.binance.org/",
chainId: 56,
accounts: [`0x${PRIVATE_KEY}`],
},
mode: {
url: "https://mainnet.mode.network/",
chainId: 34443,
accounts: [`0x${PRIVATE_KEY}`],
},
},
etherscan: {
apiKey: {
bsc: process.env.ETHERSCAN_KEY || "",
},
// customChains: [
// {
// network: "mode",
// chainId: 34443,
// urls: {
// apiURL: "https://explorer.mode.network",
// browserURL: "https://explorer.mode.network"
// }
// }
// ]
},
};
subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(async (_, hre, runSuper) => {
const paths = await runSuper();
const otherDirectoryGlob = path.join(hre.config.paths.root, "test", "**", "*.sol");
const otherPaths = glob.sync(otherDirectoryGlob);
return [...paths, ...otherPaths];
});
export default config;