Skip to content

How to use custom rpc while configuring Web3Modal? #144

Closed Answered by pedrouid
Gajesh2007 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Gajesh2007,

in web3modal we describe each provider to be configured with its own set of options, here is how it would look like for WalletConnect: https://github.com/Web3Modal/web3modal/blob/master/docs/providers/walletconnect.md

const providerOptions = {
  walletconnect: {
    package: WalletConnectProvider, // required
    options: {
      infuraId: "INFURA_ID" // required
    }
  }
};

The example shows how you would include the infuraId for the WalletConnectProvider, however this can be replaced with a map of custom RPC urls as follows:

const providerOptions = {
  walletconnect: {
    package: WalletConnectProvider, // required
    options: {
        rpc: {
            1: "https:/…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Gajesh2007
Comment options

Answer selected by Gajesh2007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #143 on June 30, 2021 07:26.