question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What's the standard way of adding chains?

See original GitHub issue

UseDapp provides a limited set of supported chains. However I can’t seem to be able to configure it to work with alternative chains: is it a design choice or do I miss the “right” way of doing it?

Currently, the only way I see is to fork the repo and add manually the chain data in the constants folder.

Here is my (unfortunate) setup for arbitrum:

const config = {
  readOnlyChainId: 42220,
  supportedChains: [42220],
  multicallAddresses: {
    42220: '0xCe129333458f037867C81DFbD70E4D57A3b1c5eb',
}, 
  readOnlyUrls: {
    42161: 'https://arb-mainnet.g.alchemy.com/v2/API-KEY',
  },
}

While the DApp can connect to Metamask, it is unable to load the provider it appears as “undefined”.

If there’s no good way to do it, I guess adding support to manage it in the config should solve a good amount of issues, past, present and future.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Oni-giricommented, Oct 30, 2021

@Oni-giri ty. where do i put this info on this library though? or are you talking about something else?

https://github.com/EthWorks/useDApp/blob/daa3b7ed17ac08ad57203e2d9faa2bbaa4284e24/packages/core/src/constants/chainId.ts

Here ser.

0reactions
tt-marekcommented, Nov 20, 2021

Closing for now, continued in #394

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Set Up Chains - Barbell Logic
Learn how to set up chains in the gym with Coop from Garage Gym Reviews. Lifting with chains can help you work through...
Read more >
How to Incorporate Bands and Chains Into Your Weight Training
Adding bands and chains to conventional barbell movements like squats, deadlifts, and bench press works via accommodating resistance. In a ...
Read more >
Chain Gang: How And Why To Train With Chains
As a general guideline, you want to use chains that are roughly 10% of the barbell weight (bar + plates + collars). So...
Read more >
How To Use Chains For Low Bar Squats
To set up your chains first link the lighter chain over the ends of your bar after putting plates on. Next, you need...
Read more >
Chains for Hypertrophy - EliteFTS
Adding chains to the bar "accommodates" the strength curve by adding resistance to the bar throughout the range of motion.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found