-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathweb3-onboard.js
65 lines (61 loc) · 2.17 KB
/
web3-onboard.js
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
63
64
65
import injectedModule from "@web3-onboard/injected-wallets";
import argentModule from "@web3-onboard/argent";
import { init } from "@web3-onboard/react";
const argent = argentModule();
const injected = injectedModule({
custom: [
// include custom injected wallet modules here
],
filter: {
// mapping of wallet labels to filter here
},
});
export default init({
// An array of wallet modules that you would like to be presented to the user to select from when connecting a wallet.
wallets: [injected, argent],
// An array of Chains that your app supports
chains: [
{
// hex encoded string, eg '0x1' for Ethereum Mainnet
id: "0x118",
// string indicating chain namespace. Defaults to 'evm' but will allow other chain namespaces in the future
namespace: "evm",
// the native token symbol, eg ETH, BNB, MATIC
token: "ETH",
// used for display, eg Ethereum Mainnet
label: "zkSync Era Testnet",
// used for network requests
rpcUrl: "https://zksync2-testnet.zksync.dev",
},
],
appMetadata: {
// The name of your dApp
name: "bookm.art",
// SVG icon string, with height or width (whichever is larger) set to 100% or a valid image URL
icon: "<svg></svg>",
// Optional wide format logo (ie icon and text) to be displayed in the sidebar of connect modal. Defaults to icon if not provided
logo: "<svg></svg>",
// The description of your app
description: "bookm.art",
// The url to a getting started guide for app
gettingStartedGuide: "https://...",
// url that points to more information about app
explore: "https://...",
// if your app ony supports injected wallets and when no injected wallets detected, recommend the use to install some
recommendedInjectedWallets: [
{
// display name
name: "Metamask",
// link to download wallet
url: "https://metamask.io",
},
],
// Optional - but allows for dapps to require users to agree to TOS and privacy policy before connecting a wallet
// agreement: {
// version: "1.0.0",
// termsUrl: "https://...",
// privacyUrl: "https://...",
// },
},
theme: "dark",
});