-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
64 lines (57 loc) · 1.51 KB
/
App.tsx
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
// src/App.tsx
import React from 'react';
import './App.css';
import Leaderboard from './components/Leaderboard/Leaderboard';
import { WagmiConfig, createConfig, configureChains, mainnet } from 'wagmi'
import { useAccount, useConnect, useDisconnect, useBalance } from 'wagmi'
import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet'
import { InjectedConnector } from 'wagmi/connectors/injected'
import { MetaMaskConnector } from 'wagmi/connectors/metaMask'
import { WalletConnectConnector } from 'wagmi/connectors/walletConnect'
import { jsonRpcProvider } from 'wagmi/providers/jsonRpc';
const { chains, publicClient } = configureChains(
[mainnet],
[
jsonRpcProvider({
rpc: () => ({
http: "QUICKNODE_HTTP_PROVIDER_URL" // 👈 Replace this with your HTTP URL from the previous step
}),
})
]
);
const config = createConfig({
autoConnect: true,
publicClient,
connectors: [
// new MetaMaskConnector({ chains }),
new CoinbaseWalletConnector({
chains,
options: {
appName: 'wagmi',
},
}),
// new WalletConnectConnector({
// chains,
// options: {
// projectId: '...',
// },
// }),
// new InjectedConnector({
// chains,
// options: {
// name: 'Injected',
// shimDisconnect: true,
// },
// })
]
})
function App() {
return (
<WagmiConfig config={config}>
<div className="App">
<Leaderboard />
</div>
</WagmiConfig>
);
}
export default App;