-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhardhat.config.js
More file actions
65 lines (59 loc) · 2 KB
/
hardhat.config.js
File metadata and controls
65 lines (59 loc) · 2 KB
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
require("@nomicfoundation/hardhat-toolbox");
require("@openzeppelin/hardhat-upgrades");
require("@nomicfoundation/hardhat-ethers");
// require("@nomiclabs/hardhat-etherscan");
require('dotenv').config();
// require("./tasks/create-keystore");
require("./tasks/hack-nft");
require("./tasks/hack-erc20");
const fs = require("fs");
const { DECENTRALIZED_FIREWALL_USERNAME, DECENTRALIZED_FIREWALL_PASSWORD, SEPOLIA_RPC_URL, PRIVATE_KEY } = process.env;
if (!fs.existsSync("./.env")) {
throw new Error(".env file is missing.");
}
// Check if PRIVATE_KEY is set and valid
if (!process.env.SEPOLIA_RPC_URL) {
throw new Error("SEPOLIA_RPC_URL Sepolia RPC URL variable not set. Either set it or remove the sepolia network configuration.");
}
// Check if PRIVATE_KEY is set and valid
if (!process.env.PRIVATE_KEY) {
throw new Error("PRIVATE_KEY environment variable not set. either set it or remove it from in the networks configuration.");
}
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.24",
networks: {
decentralized_firewall_testnet: {
url: `https://${DECENTRALIZED_FIREWALL_USERNAME}:${DECENTRALIZED_FIREWALL_PASSWORD}@ipschain.ipsprotocol.xyz`,
accounts: [`0x${PRIVATE_KEY}`]
},
local: {
url: `http://127.0.0.1:8545`,
accounts: [`0x${PRIVATE_KEY}`],
timeout: 1800000 // 30 minutes, if applicable for your specific debugging tools or scripts
},
sepolia: {
url: `${SEPOLIA_RPC_URL}`,
accounts: [`0x${PRIVATE_KEY}`],
timeout: 1800000 // 30 minutes, if applicable for your specific debugging tools or scripts
},
node: {
url: `http://127.0.0.1:8545`,
}
},
etherscan: {
apiKey: {
decentralized_firewall_testnet: "let_him_cook"
},
customChains: [
{
network: "decentralized_firewall_testnet",
chainId: 8337,
urls: {
apiURL: "https://explorer.ipsprotocol.xyz/api",
browserURL: "https://explorer.ipsprotocol.xyz"
}
}
]
}
};