-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"TypeError: Unsupported chain" calling useContractFunction #289
Comments
Hi team, can anybody help me with this please? :) |
Experiencing the same problem here. It seems like |
@goneale I just use ethers + useState directly as a workaround instead for the time being. Also willing to submit a PR if someone can point me where to look. |
Same problem here too. |
Just got this same error on Ropsten. In my case, it likely has to due with Metamask using EIP-1559 type transactions. Yesterday, it was using Legacy type transactions and working fine. |
I've been having the same issue since yesterday as well. Here's a workaround that seems to fix the issue. Basically, all we need to do is add the chainId to the result of the contract function.
|
Hey Alex, thanks a lot for your workaround ! It wasn't working at first on my end because the contract instance wasn't connect to a signer, had to make some tweaks (also removed chainId as parameter and got it directly from useEthers)
|
Also if anyone needs
|
Thanks for these @mortimr @AlexBrandes, was wondering why in last 24hours the app randomly started crashing. Hopefully useDapp can get a fix released asap. Reply with your address, I'd like to send you an Eth beer. 🍻 |
This is due to an update of Metamask to start doing type 2 transactions (EIP1559 transactions) |
Ethers pushed support but it seems useDapp is using a pinned older version of ethers https://github.com/ethers-io/ethers.js/blob/master/CHANGELOG.md#ethersv540-2021-06-26-0150 https://github.com/EthWorks/useDApp/blob/master/packages/core/package.json#L41 |
@derekbar90 I wonder if using a |
Hi, i fixed the issue with chainId being equal 0, it's up in version 0.4.5 |
This still seems to be an issue for Avalanche Fuji contract calls Currently getting this call stack:
|
Hi Team
Great framework. Can't seem to get past this one, no matter how I try. Fairly new to dApp design, but pretty sure I have everything setup right.
As soon as I call this,
I receive this via the:
You can clearly see the
chainId=5
in the screenshot, this is Goerli and I can connect to my wallet OK to get this far.I should also state, if I change my contract function to
buy1
for example,. it crashes statingUnhandled Rejection (TypeError): contractWithSigner[functionName] is not a function
so I know it's communicating to the very simple buy method I have settup in Solidity (currently returning 123 as a uint256).Thanks in advance
The text was updated successfully, but these errors were encountered: