-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
43 lines (36 loc) · 1.05 KB
/
app.vue
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
<template>
<div>
<h1>Nuxt3 Vue-Dapp Starter</h1>
<p>Address: {{address}}</p>
<p>Chain: {{chainId}}</p>
<button @click="open">Connect</button>
<vd-board :connectors="connectors" />
</div>
</template>
<script>
import { MetaMaskConnector, WalletConnectConnector, CoinbaseWalletConnector, SafeConnector, useBoard, useEthers } from 'vue-dapp';
export default {
setup() {
const { open } = useBoard();
const { address, chainId, signer } = useEthers();
const connectors = [
new MetaMaskConnector({
appUrl: "http://localhost:3000/",
}),
new WalletConnectConnector({
qrcode: true,
rpc: {
10: "https://1rpc.io/op",
42161: "https://arb1.arbitrum.io/rpc", //`https://arb-mainnet.g.alchemy.com/v2/${config.alchemyArbitrumKey}`,
},
}),
new CoinbaseWalletConnector({
appName: "Nuxt3 Vue Dapp Starter",
jsonRpcUrl: "https://1rpc.io/op",
}),
new SafeConnector()
]
return { address, chainId, connectors, open, signer }
},
}
</script>