web3c.js icon indicating copy to clipboard operation
web3c.js copied to clipboard

OasisProvider does not support subscriptions

Open andrewosh opened this issue 6 years ago • 3 comments

The following steps produce the bug in the title:

  1. let web3c = new Web3c('wss://web3.oasiscloud.io/ws')
  2. let contract = web3c.oasis.Contract(...)
  3. contract.events.GameStart(...) or contract.once('GameState', ...)

Web3 version: 1.0.0-beta37 Web3c version: master (Using master until https://github.com/oasislabs/web3c.js/pull/145 is released)

(updated for clarity)

andrewosh avatar Mar 04 '19 23:03 andrewosh

cc @armaniferrante - https://github.com/oasislabs/web3c.js/pull/138 should have introduced support for subscriptions

willscott avatar Mar 04 '19 23:03 willscott

looks like we have web3c.oasis.subscribe, but maybe the missing link is on web3c.oasis.contract

willscott avatar Mar 04 '19 23:03 willscott

We didn’t modify the Contract object there, just wrapped ‘web3c.oasis.subscribe’. This might require additional work.

armaniferrante avatar Mar 04 '19 23:03 armaniferrante