-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.ts
115 lines (105 loc) · 2.63 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
require("dotenv").config();
import dotenv from "dotenv";
dotenv.config();
import "@nomicfoundation/hardhat-verify";
import "@nomiclabs/hardhat-truffle5";
import "@nomiclabs/hardhat-waffle";
import "hardhat-gas-reporter";
import "solidity-coverage";
import "@typechain/hardhat";
import "@nomiclabs/hardhat-ethers";
// TESTNET
const AMOY_RPC_URL =
process.env.AMOY_RPC_URL || "https://polygon-mumbai.g.alchemy.com/v2/api-key";
const SEPOLIA_RPC_URL = process.env.SEPOLIA_RPC_URL || "https://ETH-RPC-URL";
const BASE_TESTNET_RPC_URL =
process.env.BASE_TESTNET_RPC_URL || "wss://base-sepolia-rpc.publicnode.com";
//// MAINNET
const POLYGON_RPC_URL =
process.env.POLYGON_RPC_URL ||
"https://polygon-mainnet.g.alchemy.com/v2/api-key";
const BASE_RPC_URL = process.env.BASE_RPC_URL || "https://mainnet.base.org";
const MNEMONIC =
process.env.MNEMONIC ||
"ajkskjfjksjkf ssfaasff asklkfl klfkas dfklhao asfj sfk klsfjs fkjs";
const PRIVATE_KEY = process.env.PRIVATE_KEY;
const POLYGONSCAN_API_KEY =
process.env.POLYGONSCAN_API_KEY || "lklsdkskldjklgdklkld";
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || "Etherscan API key";
const BASESCAN_API_KEY = process.env.BASESCAN_API_KEY || "Basescan API Key";
module.exports = {
solidity: {
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
defaultNetwork: "hardhat",
networks: {
hardhat: {
initialBaseFeePerGas: 0,
},
// TESTNET NETWORKS
amoy: {
networkId: 80002,
url: AMOY_RPC_URL,
// accounts: [PRIVATE_KEY],
accounts: {
mnemonic: MNEMONIC,
},
},
sepolia: {
networkId: 11155111,
url: SEPOLIA_RPC_URL,
// accounts: [PRIVATE_KEY],
accounts: {
mnemonic: MNEMONIC,
},
},
baseTestnet: {
networkId: 84532,
url: BASE_TESTNET_RPC_URL,
// accounts : [PRIVATE_KEY],
accounts: {
mnemonic: MNEMONIC,
},
},
polygon: {
networkId: 137,
url: POLYGON_RPC_URL,
// accounts: [PRIVATE_KEY],
accounts: {
mnemonic: MNEMONIC,
},
},
base: {
networkId: 8453,
url: BASE_RPC_URL,
// accounts: [PRIVATE_KEY],
accounts: {
mnemonic: MNEMONIC,
},
},
},
etherscan: {
apiKey: {
polygon: POLYGONSCAN_API_KEY,
polygonAmoy: POLYGONSCAN_API_KEY,
sepolia: ETHERSCAN_API_KEY,
baseSepolia: BASESCAN_API_KEY,
base: BASESCAN_API_KEY,
},
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
mocha: {
timeout: 20000,
},
};