-
Notifications
You must be signed in to change notification settings - Fork 86
Support Web3 1.0.0 #105
Comments
Thank you for reporting this issue we will get back to you shortly |
I am also discovering that emitted events do not appear in the |
We do not currently support web3 1.0 as you noted. Will have to take a closer look at how much work this would be. Thanks for bringing it to our attention! |
@oed you're welcome! Please let me know if there's anything I can do to contribute. |
@grahamturk looking more closely at this it looks like it should be an easy fix. However I think it should be possible to use a websocet provider already if you pass it to the contstructor of uport connect, see here. For making this library use websockets by default we just need to change this line. @zachferland what are your thoughts on this? |
@oed I actually tried that yesterday. Here's what my code looks like:
Then I grab the web3 object with: I then instantiate my Solidity contract with: This web3 object does not have an with this line getting flagged as the breaking line. I also tried a different approach, setting the provider on my end based on the Connect getWeb3 method
While the web3 object now does have the I also tested the contract methods. In this case I instantiate the contract with:
Again here, when I call any method of the contract (static or transaction-signing), I get the same error message: I wasn't able to check if the |
Ok, seems like the provider interface might have changed in web3 1.0 then maybe? There is probably no easy fix then. I'm not to familiar with the provider code myself, feel free to do a deep dive, but this is something that we want to get to soon. |
@oed after poking around all afternoon, I agree that there's no easy fix. It seems like MetaMask also has this issue. I'll keep looking for workarounds. I would also greatly appreciate any updates from your end about supporting web3 event subscriptions since I would love to keep working with uPort. Thanks for your patience! |
@grahamturk did you find a work around to get this to work. Because im touching the same problem now that im trying to get async await out of the box. Then passing in the uportProvider to new web3, but then when doing promise calls, it always ends up in the catch block, but strangely with the actual data, and not the error itself. |
@oed, do you have a plan to support web3 1.0.0 in the near future? It would be really useful to get async await out of the box. |
Hey @vmaykovsky! We're currently working on a new major release of uport-connect, and we intend to support web3 1.0.0. We're finally getting around to some of these issues and should have updates soon! |
At long last, the major release is out. Feel free to open a new issue if the problem persists ! |
I'm getting an error that UportSubprovider does not support the web3-1.0's subscribe() method. This makes it impossible for a user to monitor changes to a smart contract's state caused by other users (e.g. the highest bid being increased in an auction). Infura now supports this functionality through the WebSocketProvider as referenced in this issue report. Does uPort have any plans to support web3 1.0? I see the current dependency is web3 0.19.
Alternatively is there any other way to listen for events emitted by a smart contract?
I am using uport-connect version 0.7.1
Thank you!
The text was updated successfully, but these errors were encountered: