Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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 ContractAddress
- runTransactionM :: TransactionData -> OperationsBatch [IntOpEvent]
- revealKeyM :: RevealData -> OperationsBatch ()
- runOperationsBatch :: (HasTezosRpc m, HasTezosClient m, WithClientLog env m) => ImplicitAddressOrAlias -> 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.
OperationsBatch | |
|
Instances
Applicative OperationsBatch Source # | |
Defined in Morley.Client.Action.Batched 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 # | |
Functor OperationsBatch Source # | |
Defined in Morley.Client.Action.Batched fmap :: (a -> b) -> OperationsBatch a -> OperationsBatch b # (<$) :: a -> OperationsBatch b -> OperationsBatch a # |
originateContractM :: OriginationData -> OperationsBatch ContractAddress Source #
Perform origination within a batch.
runTransactionM :: TransactionData -> OperationsBatch [IntOpEvent] Source #
Perform transaction within a batch.
revealKeyM :: RevealData -> OperationsBatch () Source #
Perform key revealing within a batch.
runOperationsBatch :: (HasTezosRpc m, HasTezosClient m, WithClientLog env m) => ImplicitAddressOrAlias -> OperationsBatch a -> m (Maybe OperationHash, a) Source #
Execute a batch.