-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
114 lines (109 loc) · 3.14 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@openzeppelin/hardhat-upgrades";
import { config as dotenvConfig } from "dotenv";
import { resolve } from "path";
import "hardhat-deploy";
import "@nomicfoundation/hardhat-toolbox";
dotenvConfig({ path: resolve(__dirname, "./.env") });
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: `0.8.20`,
settings: {
optimizer: {
enabled: true,
runs: 15000,
},
evmVersion: `paris`,
},
},
],
},
namedAccounts: {
deployer: 0,
},
networks: {
ganache: {
url: "http://localhost:8545",
accounts: [
"23a48125f38ee2028641a47bd695a43d41cecada7e6d39c9af5174cab3e3a464",
],
saveDeployments: true,
},
mumbai: {
url: "https://rpc.ankr.com/polygon_mumbai",
accounts: [process.env.PRIVATE_KEY as string],
saveDeployments: true,
},
polygon: {
url: "https://polygon-rpc.com",
accounts: [process.env.PRIVATE_KEY as string],
saveDeployments: true,
chainId: 137,
},
puppy: {
url: "https://puppynet.shibrpc.com",
accounts: [process.env.PRIVATE_KEY as string],
saveDeployments: true,
},
bnbTestnet: {
//fetch url from .env file
saveDeployments: true,
url: process.env.BNB_TESTNET_RPC_URL as string,
accounts: [process.env.PRIVATE_KEY as string],
},
bnb: {
//fetch url from .env file
saveDeployments: true,
url: process.env.BNB_RPC_URL as string,
accounts: [process.env.PRIVATE_KEY as string],
},
shardeum: {
url: "https://dapps.shardeum.org",
accounts: [process.env.PRIVATE_KEY as string],
},
skale: {
url: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix",
accounts: [process.env.PRIVATE_KEY as string],
},
opBnbTestnet: {
url: "https://opbnb-testnet.nodereal.io/v1/64a9df0874fb4a93b9d0a3849de012d3",
accounts: [process.env.PRIVATE_KEY as string],
gasPrice: 2000000000,
},
opBnb: {
url: "https://opbnb-mainnet.nodereal.io/v1/64a9df0874fb4a93b9d0a3849de012d3",
accounts: [process.env.PRIVATE_KEY as string],
gasPrice: 2000000000,
},
arbitrum: {
url: "https://arb1.arbitrum.io/rpc",
accounts: [process.env.PRIVATE_KEY as string],
},
ethereum: {
url: "https://ethereum.publicnode.com",
accounts: [process.env.PRIVATE_KEY as string],
},
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: process.env.ETHERSCAN_API_KEY as string,
// apiKey: {
// opBnb: process.env.NODREAL_API_KEY as string, //replace your nodereal API key
// },
customChains: [
{
network: "opBnb",
chainId: 204, // Replace with the correct chainId for the "opbnb" network
urls: {
apiURL: `https://open-platform.nodereal.io/${process.env.NODREAL_API_KEY}/op-bnb-testnet/contract/`,
browserURL: "https://opbnbscan.com/",
},
},
],
},
};
export default config;