| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cooked.MockChain.Error
Description
This module exposes the errors that can be raised during a mockchain run
Synopsis
- data BalancingError
- data MockChainError
- runToCardanoErrorInMockChainError :: forall effs a. Member (Error MockChainError) effs => Sem (Error ToCardanoError : effs) a -> Sem effs a
- runFailInMockChainError :: forall effs a. Member (Error MockChainError) effs => Sem (Fail : effs) a -> Sem effs a
Mockchain errors
data BalancingError Source #
Errors that can be produced during balancing
Constructors
| NotEnoughFundForExtraMinAda Peer | The balancing user theoretically has enough funds to balancing the trasaction, but this balancing results in a surplus payment which they cannot afford ADA-wise. |
| NotEnoughFundForProperFee Peer | The balancing does not have enough funds to sustain the fee required to balance the transaction. |
| NotEnoughFund Peer Value | The balancing wallet does not have enough funds to balance the transaction |
| NoSuitableCollateral Integer Integer Value | The provided of collateral UTxOs does not have enough funds to cover the potential collateral cost |
| MissingBalancingUser | The balancing user has not be provided, but the balancing requires it |
Instances
| Show BalancingError Source # | |
Defined in Cooked.MockChain.Error Methods showsPrec :: Int -> BalancingError -> ShowS # show :: BalancingError -> String # showList :: [BalancingError] -> ShowS # | |
| PrettyCooked BalancingError Source # | |
Defined in Cooked.Pretty.MockChain Methods prettyCookedOpt :: PrettyCookedOpts -> BalancingError -> DocCooked Source # | |
| Eq BalancingError Source # | |
Defined in Cooked.MockChain.Error Methods (==) :: BalancingError -> BalancingError -> Bool # (/=) :: BalancingError -> BalancingError -> Bool # | |
data MockChainError Source #
Errors that can be produced by the blockchain
Constructors
| MCEValidationError ValidationPhase ValidationError | Validation errors, either in Phase 1 or Phase 2 |
| MCEBalancingError BalancingError | Balancing errors |
| MCEToCardanoError ToCardanoError | Translating a skeleton element to its Cardano counterpart failed |
| MCEWrongReferenceScriptError TxOutRef ScriptHash (Maybe ScriptHash) | The required reference script is missing from a witness utxo |
| MCEUnknownOutRef TxOutRef | A UTxO is missing from the mockchain state |
| MCEPastSlot Slot Slot | A jump in time would result in a past slot |
| MCEUnsupportedFeature String | An attempt to invoke an unsupported feature has been made |
| MCEFailure String | Used to provide |
Instances
| Show MockChainError Source # | |
Defined in Cooked.MockChain.Error Methods showsPrec :: Int -> MockChainError -> ShowS # show :: MockChainError -> String # showList :: [MockChainError] -> ShowS # | |
| RunnableMockChain FullEffs Source # | |
Defined in Cooked.MockChain.Instances Methods runMockChain :: MockChainState -> Sem FullEffs a -> [RawMockChainReturn a] Source # | |
| PrettyCooked MockChainError Source # | |
Defined in Cooked.Pretty.MockChain Methods prettyCookedOpt :: PrettyCookedOpts -> MockChainError -> DocCooked Source # | |
| Eq MockChainError Source # | |
Defined in Cooked.MockChain.Error Methods (==) :: MockChainError -> MockChainError -> Bool # (/=) :: MockChainError -> MockChainError -> Bool # | |
Interpretating effects into `Error MockChainError`
runToCardanoErrorInMockChainError :: forall effs a. Member (Error MockChainError) effs => Sem (Error ToCardanoError : effs) a -> Sem effs a Source #
Interpreting ToCardanoError in terms of MockChainError
runFailInMockChainError :: forall effs a. Member (Error MockChainError) effs => Sem (Fail : effs) a -> Sem effs a Source #
Interpreting failures in terms of MockChainError