Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
re2005 committed Aug 21, 2022
1 parent d778626 commit dab4cf1
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,41 @@ app.use(VueDapp);
app.mount("#app");
```

Step 2. Add `<vd-board />` to your `App.vue` and add a button to open the board:
- Step 2. By default, VueDapp includes `Mainnet` and `Goerli` networks, but you can extend it to include other networks:

```javascript
app.use(VueDapp, {
networks: {
80001: {
chainId: '0x' + 80001,
blockExplorerUrls: ['https://mumbai.polygonscan.com/'],
chainName: 'Mumbai',
rpcUrls: ['https://rpc-mumbai.maticvigil.com/'],
nativeCurrency: {
name: 'Mumbai',
decimals: 18,
symbol: 'MATIC',
},
},
1336: {
...
}
},
});

```
For more examples please check:
https://github.com/wagmi-dev/wagmi/blob/main/packages/core/src/constants/chains.ts


Step 3. Add `<vd-board />` to your `App.vue` and add a button to open the board:

```vue
<button @click="open">Connect Wallet</button>
<vd-board :connectors="connectors" dark />
```

Step 3. Construct your connectors and use composable functions in your scripts:
Step 4. Construct your connectors and use composable functions in your scripts:

```js
import {
Expand Down Expand Up @@ -91,4 +118,4 @@ Gitcoin Grants: https://gitcoin.co/grants/3987/vue-dapp

## MIT license

Copyright (c) 2021-present, Johnson Chen ([@johnson_tzw](https://twitter.com/johnson_tzw))
Copyright (c) 2021-present, Johnson Chen ([@johnson_tzw](https://twitter.com/johnson_tzw))

0 comments on commit dab4cf1

Please sign in to comment.