-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
79 lines (75 loc) · 1.39 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
import "@nomicfoundation/hardhat-toolbox";
import { HardhatUserConfig } from "hardhat/config";
import "hardhat-contract-sizer";
import "hardhat-deploy";
import "hardhat-tracer";
import { ENV_CONFIG, RPC_URL } from "./config";
const config: HardhatUserConfig = {
paths: {
artifacts: "./artifacts",
cache: "./cache",
sources: "./contracts",
tests: "./test",
},
solidity: {
compilers: [
{
version: "0.8.15",
settings: {
viaIR: true,
evmVersion: "istanbul",
optimizer: {
enabled: true,
runs: 1_000_000,
},
metadata: {
bytecodeHash: "none",
},
},
}
],
},
networks: {
hardhat: {
allowUnlimitedContractSize: false,
chainId: 1,
forking: {
url: RPC_URL,
blockNumber: !!ENV_CONFIG.FORK_BLOCK_NUMBER ? +ENV_CONFIG.FORK_BLOCK_NUMBER : undefined,
},
accounts: {
mnemonic: ENV_CONFIG.MNEMONIC,
initialIndex: 0,
count: 20,
path: "m/44'/60'/0'/0",
},
},
mainnet: {
chainId: 1,
url: RPC_URL,
},
},
etherscan: {
apiKey: ENV_CONFIG.ETHERSCAN_API_KEY
},
gasReporter: {
enabled: ENV_CONFIG.ENABLE_GAS_REPORT,
coinmarketcap: ENV_CONFIG.CMC_API_KEY,
currency: "USD",
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
runOnCompile: true,
strict: true,
},
mocha: {
timeout: 60000,
},
namedAccounts: {
deployer: {
default: 0
},
},
};
export default config;