-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
61 lines (57 loc) · 1.35 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
import { HardhatUserConfig } from "hardhat/types";
import "@nomicfoundation/hardhat-toolbox";
import "@nomiclabs/hardhat-solhint";
import "hardhat-deploy";
import "hardhat-contract-sizer";
import "hardhat-spdx-license-identifier";
import dotenv from "dotenv";
dotenv.config();
const accounts = process.env.MNEMONIC ? { mnemonic: process.env.MNEMONIC } : undefined;
const config: HardhatUserConfig = {
namedAccounts: {
deployer: 0,
},
solidity: {
version: "0.8.9",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
hardhat: {
forking: {
url: process.env.PROVIDER_URL!,
blockNumber: process.env.BLOCK_NUMBER ? Number(process.env.BLOCK_NUMBER) : undefined,
},
},
mainnet: {
url: process.env.PROVIDER_URL!,
accounts,
},
goerli: {
url: process.env.PROVIDER_URL!,
accounts,
},
},
spdxLicenseIdentifier: {
overwrite: true,
runOnCompile: true,
},
gasReporter: {
enabled: process.env.REPORT_GAS == "true",
currency: "USD",
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
contractSizer: {
alphaSort: true,
runOnCompile: process.env.RUN_CONTRACT_SIZER === "true",
disambiguatePaths: false,
},
};
export default config;