-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
75 lines (68 loc) · 1.97 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
/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-unused-vars */
import { TASK_TEST_RUN_MOCHA_TESTS } from "hardhat/builtin-tasks/task-names";
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 "solidity-coverage";
import { HardhatUserConfig, subtask } from "hardhat/config";
import { mochaGlobalSetup, mochaGlobalTeardown } from "./test/mongo-global";
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,
},
},
},
],
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
typechain: {
outDir: "typechain",
},
mocha: {
timeout: 5000000,
},
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.DEPLOY_ADMIN_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}`,
},
};
export default config;