Open danfinlay opened 7 years ago
oooooo. We can do this. But I would make in it's own module, and have hooks for it in different modules.
Yeah maybe it could be like ethjs-event-contract
, and its initialization takes an ethjs-contract
and an eth-block-tracker
, and allows subscribing to updates on any property constant
function of that contract, as well as maybe access to a synchronous property cache, of last-retrieved values?
Yes, that could work and would reduce bulk/module complexity on the main contract object.
Feature Proposal
Description
What if ethjs queries returned
promEvents
, somewhat likeWeb3@1.0
plans to have.In addition to calling
.then()
on a result, you could subscribe to updates. Imagine:Should be easier than ever with eth-block-tracker.