-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
120 lines (115 loc) · 2.94 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
import "./utils/dotenvConfig";
/* hardhat plugins */
import "@nomicfoundation/hardhat-chai-matchers";
import "@nomicfoundation/hardhat-ethers";
import "@nomicfoundation/hardhat-viem";
import "@nomicfoundation/hardhat-verify";
import "@typechain/hardhat";
import "hardhat-deploy";
import "hardhat-deploy-ethers";
import "hardhat-gas-reporter";
import "hardhat-contract-sizer";
import "@tenderly/hardhat-tenderly";
import "solidity-coverage";
import "@chainlink/hardhat-chainlink";
import "hardhat-docgen";
import conceroNetworks from "./constants/conceroNetworks";
import { HardhatUserConfig } from "hardhat/config";
import "./tasks";
import { getEnvVar } from "./utils";
// const deployerPrivateKey = process.env.DEPLOYER_PRIVATE_KEY ?? process.exit(1);
// const etherscanApiKey = process.env.ETHERSCAN_API_KEY || "DNXJA8RX2Q3VZ4URQIWP7Z68CJXQZSC6AW";
const enableGasReport = process.env.REPORT_GAS !== "false";
const config: HardhatUserConfig = {
tenderly: {
username: "olegkron",
project: "own",
},
docgen: {
pages: "files",
pageExtension: ".mdx",
},
paths: {
artifacts: "artifacts",
cache: "cache/hardhat",
sources: "contracts",
tests: "test/hardhat",
},
solidity: {
version: "0.8.20",
settings: {
// evmVersion: "paris",
optimizer: {
enabled: true,
runs: 200,
},
},
},
defaultNetwork: "localhost",
namedAccounts: {
deployer: {
default: 0,
},
proxyDeployer: {
default: 1,
},
},
networks: conceroNetworks,
etherscan: {
apiKey: {
arbitrum: getEnvVar("ARBISCAN_API_KEY"),
mainnet: getEnvVar("ETHERSCAN_API_KEY"),
polygon: getEnvVar("POLYGONSCAN_API_KEY"),
optimism: getEnvVar("OPTIMISMSCAN_API_KEY"),
celo: getEnvVar("CELOSCAN_API_KEY"),
avalanche: "snowtrace",
avalancheFuji: "snowtrace",
},
customChains: [
{
network: "celo",
chainId: 42220,
urls: {
apiURL: "https://api.celoscan.io/api",
browserURL: "https://celoscan.io/",
},
},
{
network: "optimism",
chainId: 10,
urls: {
apiURL: "https://api-optimistic.etherscan.io/api",
browserURL: "https://optimistic.etherscan.io/",
},
},
{
network: "arbitrum",
chainId: conceroNetworks.arbitrum.chainId,
urls: {
apiURL: "https://api.arbiscan.io/api",
browserURL: "https://arbiscan.io/",
},
},
{
network: "avalancheFuji",
chainId: conceroNetworks.avalancheFuji.chainId,
urls: {
apiURL: "https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan",
browserURL: "https://snowtrace.io",
},
},
],
},
// verify: {
// etherscan: {
// apiKey: `${etherscanApiKey}`,
// },
// },
sourcify: {
enabled: false,
},
gasReporter: {
enabled: enableGasReport,
},
};
export default config;