Module

Network.Ethereum.Web3.Contract.Internal

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

#reduceEventStream Source

reduceEventStream :: forall f a. 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 e a i ni. 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 e i ni a. 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