| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Morley.Client.Action.Batched
Description
Primitives for running batched operations with a neat interface.
Synopsis
- newtype OperationsBatch a = OperationsBatch {
- unOperationsBatch :: BatchingM (OperationInfo ClientInput) (OperationInfo Result) BatchedOperationError a
- originateContractM :: OriginationData -> OperationsBatch Address
- runTransactionM :: TransactionData -> OperationsBatch ()
- revealKeyM :: RevealData -> OperationsBatch ()
- runOperationsBatch :: (HasTezosRpc m, HasTezosClient m, WithClientLog env m) => AddressOrAlias -> OperationsBatch a -> m (Maybe OperationHash, a)
Documentation
newtype OperationsBatch a Source #
Where the batched operations occur.
Example:
runOperationsBatch mySender $ do addr <- originateContractM ... runTransactionM ... return addr
Note that this is not a Monad, rather an Applicative - use
-XApplicativeDo extension for nicer experience.
Constructors
| OperationsBatch | |
Fields
| |
Instances
| Functor OperationsBatch Source # | |
Defined in Morley.Client.Action.Batched Methods fmap :: (a -> b) -> OperationsBatch a -> OperationsBatch b # (<$) :: a -> OperationsBatch b -> OperationsBatch a # | |
| Applicative OperationsBatch Source # | |
Defined in Morley.Client.Action.Batched Methods pure :: a -> OperationsBatch a # (<*>) :: OperationsBatch (a -> b) -> OperationsBatch a -> OperationsBatch b # liftA2 :: (a -> b -> c) -> OperationsBatch a -> OperationsBatch b -> OperationsBatch c # (*>) :: OperationsBatch a -> OperationsBatch b -> OperationsBatch b # (<*) :: OperationsBatch a -> OperationsBatch b -> OperationsBatch a # | |
originateContractM :: OriginationData -> OperationsBatch Address Source #
Perform origination within a batch.
runTransactionM :: TransactionData -> OperationsBatch () Source #
Perform transaction within a batch.
revealKeyM :: RevealData -> OperationsBatch () Source #
Perform key revealing within a batch.
runOperationsBatch :: (HasTezosRpc m, HasTezosClient m, WithClientLog env m) => AddressOrAlias -> OperationsBatch a -> m (Maybe OperationHash, a) Source #
Execute a batch.