| Copyright | (c) 2023 GYELD GMBH |
|---|---|
| License | Apache 2.0 |
| Maintainer | [email protected] |
| Stability | develop |
| Safe Haskell | None |
| Language | GHC2021 |
GeniusYield.Test.Clb
Contents
Description
Synopsis
- data GYTxMonadClbT (m :: Type -> Type) a
- type GYTxMonadClb = GYTxMonadClbT Identity
- mkTestForT :: forall a m. Monad m => String -> (TestInfo -> GYTxMonadClbT m a) -> m TestTree
- mkTestFor :: String -> (TestInfo -> GYTxMonadClb a) -> TestTree
- asClb :: forall a (m :: Type -> Type). Monad m => StdGen -> User -> Integer -> GYTxMonadClbT m a -> ClbT ApiEra m (Maybe a)
- asRandClb :: forall a (m :: Type -> Type). Monad m => User -> Integer -> GYTxMonadClbT m a -> RandT StdGen (ClbT ApiEra m) (Maybe a)
- liftClb :: forall a (m :: Type -> Type). Monad m => ClbT ApiEra m a -> GYTxMonadClbT m a
- dumpUtxoState :: forall (m :: Type -> Type). Monad m => GYTxMonadClbT m ()
- mustFail :: forall a (m :: Type -> Type). Monad m => GYTxMonadClbT m a -> GYTxMonadClbT m ()
- mustFailWith :: forall a (m :: Type -> Type). Monad m => (GYTxMonadException -> Bool) -> GYTxMonadClbT m a -> GYTxMonadClbT m ()
- sendSkeleton :: forall m (v :: PlutusVersion). GYTxMonad m => GYTxSkeleton v -> m GYTxId
- sendSkeleton' :: forall m (v :: PlutusVersion). GYTxMonad m => GYTxSkeleton v -> m (GYTxBody, GYTxId)
- logInfoS :: forall (m :: Type -> Type). Monad m => String -> ClbT ApiEra m ()
Documentation
data GYTxMonadClbT (m :: Type -> Type) a #
Instances
type GYTxMonadClb = GYTxMonadClbT Identity #
mkTestForT :: forall a m. Monad m => String -> (TestInfo -> GYTxMonadClbT m a) -> m TestTree #
mkTestFor :: String -> (TestInfo -> GYTxMonadClb a) -> TestTree #
Given a test name, runs the trace for every wallet, checking there weren't errors.
asClb :: forall a (m :: Type -> Type). Monad m => StdGen -> User -> Integer -> GYTxMonadClbT m a -> ClbT ApiEra m (Maybe a) #
asRandClb :: forall a (m :: Type -> Type). Monad m => User -> Integer -> GYTxMonadClbT m a -> RandT StdGen (ClbT ApiEra m) (Maybe a) #
dumpUtxoState :: forall (m :: Type -> Type). Monad m => GYTxMonadClbT m () #
mustFail :: forall a (m :: Type -> Type). Monad m => GYTxMonadClbT m a -> GYTxMonadClbT m () #
Try to execute an action, and if it fails, restore to the current state
while preserving logs. If the action succeeds, logs an error as we expect
it to fail. Use mustFailWith to provide custom
error message or/and failure action name.
FIXME: should we move it to CLB?
mustFailWith :: forall a (m :: Type -> Type). Monad m => (GYTxMonadException -> Bool) -> GYTxMonadClbT m a -> GYTxMonadClbT m () #
sendSkeleton :: forall m (v :: PlutusVersion). GYTxMonad m => GYTxSkeleton v -> m GYTxId #
This is simply defined as buildTxBody skeleton >>= signAndSubmitConfirmed.
sendSkeleton' :: forall m (v :: PlutusVersion). GYTxMonad m => GYTxSkeleton v -> m (GYTxBody, GYTxId) #
logInfoS :: forall (m :: Type -> Type). Monad m => String -> ClbT ApiEra m () #
Variant of logInfo from Clb that logs a string with Info severity.