Copyright | Alexander Krupenkin 2016-2018 |
---|---|
License | BSD3 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | unportable |
Safe Haskell | None |
Language | Haskell2010 |
Ethereum contract event support.
- data EventAction
- event :: DecodeEvent i ni e => Filter e -> (e -> ReaderT Change Web3 EventAction) -> Web3 (Async ())
- event' :: DecodeEvent i ni e => Filter e -> (e -> ReaderT Change Web3 EventAction) -> Web3 ()
- eventMany' :: DecodeEvent i ni e => Filter e -> Integer -> (e -> ReaderT Change Web3 EventAction) -> Web3 ()
Documentation
data EventAction Source #
Event callback control response
ContinueEvent | Continue to listen events |
TerminateEvent | Terminate event listener |
event :: DecodeEvent i ni e => Filter e -> (e -> ReaderT Change Web3 EventAction) -> Web3 (Async ()) Source #
Run 'event\'' one block at a time.
event' :: DecodeEvent i ni e => Filter e -> (e -> ReaderT Change Web3 EventAction) -> Web3 () Source #
Same as event
, but does not immediately spawn a new thread.
eventMany' :: DecodeEvent i ni e => Filter e -> Integer -> (e -> ReaderT Change Web3 EventAction) -> Web3 () Source #
'eventMany\'' take s a filter, a window size, and a handler.
It runs the handler over the results of eventLogs
results using
reduceEventStream
. If no TerminateEvent
action is thrown and
the toBlock is not yet reached, it then transitions to polling.