-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathconfig.ts
More file actions
57 lines (52 loc) · 1.48 KB
/
Copy pathconfig.ts
File metadata and controls
57 lines (52 loc) · 1.48 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
import { getDefaultConfig } from '@rainbow-me/rainbowkit';
import {
mainnet,
polygon,
base,
} from 'wagmi/chains';
import { createConfig, http } from 'wagmi';
import { type Chain } from 'viem';
const mordor = {
id: 63,
name: 'Mordor',
nativeCurrency: { name: 'Mordor Eth', symbol: 'METC', decimals: 18 },
rpcUrls: {
default: { http: ['https://rpc.mordor.etccooperative.org'] }
},
blockExplorers: {
default: { name: 'Mordor Explorer', url: 'https://etc-mordor.blockscout.com/' }
}
} as const satisfies Chain;
const citrea_testnet = {
id: 5115,
name: 'Citrea Testnet',
nativeCurrency: { name: 'Citrea Eth', symbol: 'CBTC', decimals: 18 },
rpcUrls: {
default: { http: ['https://rpc.testnet.citrea.xyz'] }
},
blockExplorers: {
default: { name: 'Citrea Explorer', url: 'https://explorer.testnet.citrea.xyz/' }
}
} as const satisfies Chain;
const chains = [mordor, citrea_testnet, mainnet, polygon, base] as const;
const makeServerConfig = () =>
createConfig({
chains,
transports: {
[mordor.id]: http(mordor.rpcUrls.default.http[0]),
[citrea_testnet.id]: http(citrea_testnet.rpcUrls.default.http[0]),
[mainnet.id]: http(),
[polygon.id]: http(),
[base.id]: http(),
},
ssr: true,
});
export const wagmi_config =
typeof window === 'undefined'
? makeServerConfig()
: getDefaultConfig({
appName: 'HAH',
projectId: '00aea9e5bb1721b907ad8ea20f354c6a',
chains,
ssr: true,
});