Module

Network.Ethereum.Web3.Contract.Internal

Package
purescript-web3
Repository
f-o-a-m/purescript-web3

#reduceEventStream Source

reduceEventStream :: forall a f. Monad f => MonadRec f => Producer (Array (FilterChange a)) f BlockNumber -> (a -> ReaderT Change f EventAction) -> Process f BlockNumber

reduceEventStream takes a handler and an initial state and attempts to run the handler over the event stream. If the machine ends without a TerminateEvent result, we return the current state. Otherwise we return Nothing.

#pollFilter Source

pollFilter :: forall ni i a e. DecodeEvent i ni a => FilterId -> ChainCursor -> Producer (Array (FilterChange a)) (Web3 e) BlockNumber

pollFilter takes a FilterId and a max ChainCursor and polls a filter for changes until the chainHead's BlockNumber exceeds the ChainCursor, if ever. There is a minimum delay of 1 second between polls.

#logsStream Source

logsStream :: forall a ni i e. DecodeEvent i ni a => FilterStreamState a -> Producer (Array (FilterChange a)) (Web3 e) BlockNumber

#mkBlockNumber Source

mkBlockNumber :: forall e. ChainCursor -> Web3 e BlockNumber

Coerce a 'ChainCursor' to an actual 'BlockNumber'.

#UncurryFields Source

class UncurryFields fields curried result | curried -> result fields where

Useful class for using records as arguments to solidity functions

Members

Instances