-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
123 lines (116 loc) · 3.42 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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-unused-vars */
require("dotenv").config();
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-ethers";
import "@nomicfoundation/hardhat-verify";
import "@nomicfoundation/hardhat-toolbox/network-helpers";
import "@nomicfoundation/hardhat-chai-matchers";
import "@openzeppelin/hardhat-upgrades";
import "solidity-coverage";
import "solidity-docgen";
import "hardhat-gas-reporter";
import { HardhatUserConfig, subtask } from "hardhat/config";
import { mochaGlobalSetup, mochaGlobalTeardown } from "./test/mongo-global";
import { TASK_TEST_RUN_MOCHA_TESTS } from "hardhat/builtin-tasks/task-names";
subtask(TASK_TEST_RUN_MOCHA_TESTS)
.setAction(async (args, hre, runSuper) => {
await mochaGlobalSetup();
const testFailures = await runSuper(args);
await mochaGlobalTeardown();
return testFailures;
});
const config : HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.26",
settings: {
optimizer: {
enabled: true,
runs: 20000,
},
},
},
{
version: "0.8.26",
settings: {
optimizer: {
enabled: true,
runs: 20000,
},
},
},
],
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
typechain: {
outDir: "typechain",
},
mocha: {
timeout: 5000000,
},
gasReporter: {
enabled: false,
},
networks: {
// mainnet: {
// // url: `${process.env.MAINNET_RPC_URL}`,
// // gasPrice: 80000000000,
// },
// sepolia: {
// url: `${process.env.SEPOLIA_RPC_URL}`,
// timeout: 10000000,
// accounts: [ // Comment out for CI, uncomment this when using Sepolia
// `${process.env.TESTNET_PRIVATE_KEY_A}`,
// `${process.env.TESTNET_PRIVATE_KEY_B}`,
// `${process.env.TESTNET_PRIVATE_KEY_C}`,
// `${process.env.TESTNET_PRIVATE_KEY_D}`,
// `${process.env.TESTNET_PRIVATE_KEY_E}`,
// `${process.env.TESTNET_PRIVATE_KEY_F}`,
// ],
// // Must have to avoid instead failing as `invalid length for result data` error
// throwOnCallFailures: false, // not sure if this even works
// },
// meowtestnet: {
// url: `${process.env.MEOWTESTNET_RPC_URL}`,
// chainId: 883424730,
// accounts: [ // Comment out for CI, uncomment this when using Sepolia
// `${process.env.DEPLOYER_PRIVATE_KEY}`,
// `${process.env.ZERO_VAULT_PRIVATE_KEY}`,
// `${process.env.TESTNET_PRIVATE_KEY_A}`,
// `${process.env.TESTNET_PRIVATE_KEY_B}`,
// `${process.env.TESTNET_PRIVATE_KEY_C}`,
// `${process.env.TESTNET_PRIVATE_KEY_D}`,
// `${process.env.TESTNET_PRIVATE_KEY_E}`,
// `${process.env.TESTNET_PRIVATE_KEY_F}`,
// ],
// },
},
// etherscan: {
// apiKey: `${process.env.ETHERSCAN_API_KEY}`,
// customChains: [
// {
// network: "meowtestnet",
// chainId: 883424730,
// urls: {
// apiURL: "https://meowchain-testnet-blockscout.eu-north-2.gateway.fm/api/",
// browserURL: "https://meowchain-testnet-blockscout.eu-north-2.gateway.fm/",
// },
// },
// ],
// },
docgen: {
pages: "files",
templates: "docs/docgen-templates",
outputDir: "docs/contracts",
exclude: [
"mock/",
],
},
};
export default config;