-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
124 lines (119 loc) · 3.06 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
121
122
123
124
import * as dotenv from "dotenv";
import * as tenderly from "@tenderly/hardhat-tenderly";
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomiclabs/hardhat-ethers";
import "@openzeppelin/hardhat-upgrades";
dotenv.config();
tenderly.setup({ automaticVerifications: false });
let accounts: any[] = [];
if (process.env.WALLET_PRIVATE_KEY !== undefined) {
accounts = [process.env.WALLET_PRIVATE_KEY];
} else {
throw new Error(`WALLET_PRIVATE_KEY not set`);
}
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 100,
},
viaIR: true,
},
},
],
},
paths: {
artifacts: "./artifacts",
sources: "./src",
},
networks: {
goerli: {
url: process.env.GOERLI_URL || "",
accounts: accounts,
timeout: 100000000,
chainId: 5,
//gasPrice: 5000000000,
},
sepolia: {
url: process.env.SEPOLIA_URL || "",
accounts: accounts,
timeout: 100000000,
chainId: 11155111,
// gasPrice: 5000000000,
},
gnosis: {
url: process.env.GNOSIS_URL || "",
accounts: accounts,
timeout: 100000000,
chainId: 100,
//gasPrice: 5000000000,
},
polygon: {
url: process.env.POLYGON_URL || "",
accounts: accounts,
timeout: 100000000,
chainId: 137,
// gasPrice: 2132662188670,
},
mumbai: {
url: process.env.MUMBAI_URL || "",
accounts: accounts,
timeout: 100000000,
chainId: 80001,
},
snowtrace: {
url: process.env.AVAX_URL || "",
accounts: accounts,
timeout: 100000000,
chainId: 43114,
},
optimism: {
url: process.env.OPTIMISM_URL || "",
accounts: accounts,
timeout: 100000000,
chainId: 10,
},
},
etherscan: {
customChains: [
{
network: "gnosis",
chainId: 100,
urls: {
apiURL: "https://api.gnosisscan.io/api",
browserURL: "https://gnosisscan.io/",
},
},
{
network: "snowtrace",
chainId: 43114,
urls: {
apiURL: "https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan",
browserURL: "https://avalanche.routescan.io",
},
},
],
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: {
goerli: process.env.ETHERSCAN_API_KEY || "",
sepolia: process.env.ETHERSCAN_API_KEY || "",
gnosis: process.env.GNOSISSCAN_API_KEY || "",
polygon: process.env.ETHERSCAN_POLYGON_API_KEY || "",
polygonMumbai: process.env.ETHERSCAN_POLYGON_API_KEY || "",
optimisticEthereum: process.env.ETHERSCAN_OPTIMISM_API_KEY || "",
snowtrace: "snowtrace", // apiKey is not required, just set a placeholder
},
},
tenderly: {
project: process.env.TENDERLY_PROJECT || "",
username: process.env.TENDERLY_USERNAME || "",
privateVerification: false,
},
};
export default config;