-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwagmi.ts
More file actions
39 lines (35 loc) · 1.05 KB
/
wagmi.ts
File metadata and controls
39 lines (35 loc) · 1.05 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
"use client";
import { getDefaultConfig } from "@rainbow-me/rainbowkit";
import { cookieStorage, createStorage, http, webSocket } from "wagmi";
import { sepolia } from "wagmi/chains";
const ETH_SEPOLIA_ALCHEMY_HTTP_URL =
process.env.NEXT_PUBLIC_ETH_SEPOLIA_ALCHEMY_HTTP_URL ?? "";
const ETH_SEPOLIA_ALCHEMY_WS_URL =
process.env.NEXT_PUBLIC_ETH_SEPOLIA_ALCHEMY_WS_URL ?? "";
const WALLETCONNECT_PROJECT_ID =
process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID ?? "";
export const wagmiHttpConfig = getDefaultConfig({
appName: "Forge",
projectId: WALLETCONNECT_PROJECT_ID,
chains: [sepolia],
ssr: true,
storage: createStorage({ storage: cookieStorage }),
transports: {
[sepolia.id]: http(ETH_SEPOLIA_ALCHEMY_HTTP_URL, {
key: "Alchemy",
name: "Alchemy RPC Provider",
}),
},
});
export const wagmiWsConfig = getDefaultConfig({
appName: "Forge",
projectId: WALLETCONNECT_PROJECT_ID,
chains: [sepolia],
ssr: true,
transports: {
[sepolia.id]: webSocket(ETH_SEPOLIA_ALCHEMY_WS_URL, {
key: "Alchemy",
name: "Alchemy WebSocket Provider",
}),
},
});