/
wagmi.ts
54 lines (46 loc) · 1.3 KB
/
wagmi.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
import { getDefaultWallets } from '@rainbow-me/rainbowkit'
import { configureChains, createConfig } from 'wagmi'
import { holesky, sepolia } from 'wagmi/chains'
import { publicProvider } from 'wagmi/providers/public'
import { Chain } from 'wagmi'
import { defineChain } from 'viem'
const walletConnectProjectId = 'c96e690bb92b6311e8e9b2a6a22df575'
const redstoneHolesky = defineChain({
id: 17_001,
name: 'Redstone Holesky',
network: 'redstone-holesky',
nativeCurrency: {
decimals: 18,
name: 'Ether',
symbol: 'ETH',
},
rpcUrls: {
default: {
http: ['https://rpc.holesky.redstone.xyz'],
webSocket: ['wss://rpc.holesky.redstone.xyz/ws'],
},
public: {
http: ['https://rpc.holesky.redstone.xyz'],
webSocket: ['wss://rpc.holesky.redstone.xyz/ws'],
},
},
blockExplorers: {
default: { name: 'Explorer', url: 'https://explorer.holesky.redstone.xyz' },
},
})
const { chains, publicClient, webSocketPublicClient } = configureChains(
[ holesky, sepolia, redstoneHolesky ],
[ publicProvider(), ],
)
const { connectors } = getDefaultWallets({
appName: 'My wagmi + RainbowKit App',
chains,
projectId: walletConnectProjectId,
})
export const config = createConfig({
autoConnect: true,
connectors,
publicClient,
webSocketPublicClient,
})
export { chains }