Closed onbjerg closed 6 years ago
I have implemented basic support for websockets as well as a few pubsub types (logs and newPendingTransactions) in my fork (https://github.com/perissology/ganache-core)
There are not any websocket tests currently, and websocket have not been thoroughly tested yet. If someone would like to help with that, go ahead. If not, I hope to have time to finish the websocket integration withing the next month or so.
After I have a chance to write tests, I'll make a PR here.
yes, $geth --datadir data --networkid 31415926 --ws --wsport 8546 --wsorigins "" --rpc --rpcport 8545 --rpccorsdomain "" --nodiscover console it works!!!
I'm not sure what you mean, that's geth, not testrpc.
I switched to geth,and it's work,It maybe provide some help,cheers.
@miss61008596 Hey guy, you know that you are talking about geth?
@miss61008596 I don't want to use geth for tests. testrpc is more lightweight and setup is easier.
I hate to close this ticket, but I'm cleaning up issues today as part of our team process, and we tend to track issues for the ganache suite of repos over on trufflesuite/ganache-cli. In this case, this ticket duplicates trufflesuite/ganache-cli#257. As such, lets move this conversation over there.
ok, so no ws support at all.
@froid1911 please reread my last comment more carefully.
Since Web3 1.0.0 the HTTP provider no longer supports subscriptions (e.g listening for events).
Instead it is expected that developers use the new WebSocket provider or the IPC provider. Neither of these are supported by Ganache, and thus they are not supported in testrpc either.
Expected Behavior
Current Behavior
Context
It is impossible to use testrpc with Web3 1.0.0. Instead developers are forced to use Parity or geth.