This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
hardhat.config.ts
105 lines (102 loc) · 2.8 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
import type { HardhatUserConfig } from "hardhat/types";
import "@typechain/hardhat";
import "hardhat-gas-reporter";
import "@nomiclabs/hardhat-ethers";
import "hardhat-contract-sizer";
import "@nomicfoundation/hardhat-foundry";
import * as dotenv from "dotenv";
dotenv.config();
const MOCHA_TESTS_PATH = process.env.TESTS_PATH || "./test";
const MOCHA_SHOULD_BAIL = process.env.BAIL === "true";
const config: HardhatUserConfig = {
typechain: {
outDir: "typechain", // overrides upstream 'fix' for another issue which changed this to 'typechain-types'
},
networks: {
hardhat: {
blockGasLimit: 100000000,
allowUnlimitedContractSize: true,
},
mumbai: {
url: "https://rpc-mumbai.maticvigil.com",
accounts: process.env["DEPLOYMENT_KEY_MUMBAI"]
? [process.env["DEPLOYMENT_KEY_MUMBAI"]]
: [],
},
},
solidity: {
compilers: [
{
version: "0.8.18",
settings: {
optimizer: {
enabled: true,
runs: 1000000,
details: {
peephole: true,
inliner: true,
jumpdestRemover: true,
orderLiterals: true,
deduplicate: true,
cse: true,
constantOptimizer: true,
},
},
evmVersion: "london",
// viaIR: true,
metadata: {
// DO NOT enable CBOR until it is no longer possible to produce valid
// jumpdest accidentally in the IPFS hash that could lead to
// mutations in the interpreter.
appendCBOR: false,
useLiteralContent: true,
},
},
},
{
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 1000000,
details: {
peephole: true,
inliner: true,
jumpdestRemover: true,
orderLiterals: true,
deduplicate: true,
cse: true,
constantOptimizer: true,
},
},
evmVersion: "london",
// viaIR: true,
metadata: {
// DO NOT enable CBOR until it is no longer possible to produce valid
// jumpdest accidentally in the IPFS hash that could lead to
// mutations in the interpreter.
appendCBOR: false,
useLiteralContent: true,
},
},
},
],
},
mocha: {
// explicit test configuration, just in case
asyncOnly: true,
bail: MOCHA_SHOULD_BAIL,
parallel: false,
timeout: 0,
},
paths: {
tests: MOCHA_TESTS_PATH,
},
verificationApi: {
mumbai: {
apiKey: process.env["POLYGONSCAN_KEY"],
apiUrl: "https://api-testnet.polygonscan.com/api",
},
},
};
export default config;