Closed Oni-giri closed 2 years ago
Agree with you, having the same problem developing a dapp on Cronos testnet
@Oni-giri Yes I've found you can fake it to a degree using your own local version of ChainId
that you extend, but it will ultimately fall over if the chain isn't in the core code. I suggest opening a PR like this one: https://github.com/EthWorks/useDApp/pull/336/files
@Oni-giri Yes I've found you can fake it to a degree using your own local version of
ChainId
that you extend, but it will ultimately fall over if the chain isn't in the core code. I suggest opening a PR like this one: https://github.com/EthWorks/useDApp/pull/336/files
Since the owner isn't replying, I forked the repo and uploaded it on NPM, so that I don't have to think about it any more.
hey @Oni-giri ,
did you get this to fix? I also forked and added arbitrum manually, but I'm getting message: "Internal JSON-RPC error."
@yuyao17
You can either use https://www.npmjs.com/package/ethers-allstars-multicall, which is my fork of the package, or add those addresses, if you want to build it yourself:
const multicallAddresses = {
1: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441',
3: '0xF24b01476a55d635118ca848fbc7Dab69d403be3',
4: '0x42ad527de7d4e9d9d011ac45b31d8551f8fe9821',
5: '0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e',
42: '0x2cc8688c5f75e365aaeeb4ea8d6a480405a48d2a',
56: '0x1Ee38d535d541c55C9dae27B12edf090C608E6Fb',
100: '0xb5b692a88bdfc81ca69dcb1d924f59f0413a602a',
137: '0xc4f1501f337079077842343Ce02665D8960150B0',
1337: '0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e',
80001: '0x5a0439824F4c0275faa88F2a7C5037F9833E29f1',
42161: '0x813715eF627B01f4931d8C6F8D2459F26E19137E', // Arbitrum Mainnet
97: '0x6e5BB1a5Ad6F68A8D7D6A5e47750eC15773d6042', // BSC Testnet
42220: '0xC1138494271E9312BFae15023d70Ce68085535da', // Celo Mainnet
11297108109: '0x99a73dfE34578348fb81BD078201C0BA84E9c840', // Palm MN
1666600000: '0xFE4980f62D708c2A84D3929859Ea226340759320', // Harmony MN
250: '0xdc85396592f0F466224390771C861EE3957a3ff4', // Fantom MN
361: '0xe2ec58a54f3ab2714eddbae87533793011f1e14e', // Theta MN
1285: '0xa9177F8d98DAaB74C24715Ba0A81b73654710523', // Moonriver MN
30: '0x6C62Bf5440de2cB157205B15C424BcEb5C3368F5' // RSK MN
@Oni-giri ty. where do i put this info on this library though? or are you talking about something else?
@Oni-giri ty. where do i put this info on this library though? or are you talking about something else?
Here ser.
@Oni-giri ty. where do i put this info on this library though? or are you talking about something else?
Here ser.
I'm also trying to use a unsupported chain. whenever useContractFunction the react site crashes with an error of unsupported chain. is there any way around this?
Does this support Fantom testnet? if not, can I add to list of chainId and supprted chains?
Does this support Fantom testnet? if not, can I add to list of chainId and supprted chains?
No it does not. You can add it.
Closing for now, continued in #394
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:
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.