Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | None |
Language | GHC2021 |
GeniusYield.TxBuilder.Errors
Description
Synopsis
- data PlutusToCardanoError
- data GYConversionError
- = GYNotPubKeyAddress !GYAddress
- | GYNotScriptAddress !GYAddress
- | GYInvalidPlutusValue !GYFromPlutusValueError !Value
- | GYInvalidPlutusAsset !GYFromPlutusValueError
- | GYInvalidAddressText !Text
- | GYEraSummariesToSlotConfigError !Text
- | GYLedgerToCardanoError !PlutusToCardanoError
- | GYInvalidAssetClass !Text
- | GYInvalidSlot !Integer
- data GYQueryUTxOError
- data GYQueryDatumError
- data GYObtainTxBodyContentError
- data GYTxMonadException where
- GYConversionException :: GYConversionError -> GYTxMonadException
- GYQueryUTxOException :: GYQueryUTxOError -> GYTxMonadException
- GYBuildTxException :: GYBuildTxError -> GYTxMonadException
- GYNoSuitableCollateralException :: {..} -> GYTxMonadException
- GYSlotOverflowException :: {..} -> GYTxMonadException
- GYTimeUnderflowException :: SystemStart -> GYTime -> GYTxMonadException
- GYQueryDatumException :: GYQueryDatumError -> GYTxMonadException
- GYObtainTxBodyContentException :: GYObtainTxBodyContentError -> GYTxMonadException
- GYDatumMismatch :: forall (v :: PlutusVersion). GYOutDatum -> GYTxIn v -> GYTxMonadException
- GYApplicationException :: forall e. (Exception e, IsGYApiError e) => e -> GYTxMonadException
- data GYBuildTxError
- = GYBuildTxBalancingError !GYBalancingError
- | GYBuildTxBodyErrorAutoBalance !(TxBodyErrorAutoBalance ApiEra)
- | GYBuildTxFeeUtxoAdaInsufficient !(TxBodyErrorAutoBalance ApiEra)
- | GYBuildTxExUnitsTooBig (Natural, Natural) (Natural, Natural)
- | GYBuildTxSizeTooBig !Natural !Natural
- | GYBuildTxCollateralShortFall !Natural !Natural
- | GYBuildTxNoSuitableCollateral
- | GYBuildTxCborSimplificationError !CborSimplificationError
- | GYBuildTxCollapseExtraOutError !TxBodyError
- data GYBalancingError
- throwAppError :: (IsGYApiError e, Exception e, MonadError GYTxMonadException m) => e -> m a
Documentation
data PlutusToCardanoError #
PlutusToCardanoError
is raised when using Plutus to Cardano API type conversion functions
from plutus-ledger. It is a focused version of Ledger.Tx.CardanoAPI.ToCardanoError.
Constructors
DeserialiseRawBytesError | Deserialization failed; tag indicates the type being deserialized. |
StakePtrAddressUnsupported Address | Raised when trying to convert a stake ptr plutus address. |
UnknownPlutusToCardanoError | Wildcard unhandled constructors; shouldn't happen usually. |
Instances
Show PlutusToCardanoError # | |
Defined in GeniusYield.Types.Ledger Methods showsPrec :: Int -> PlutusToCardanoError -> ShowS # show :: PlutusToCardanoError -> String # showList :: [PlutusToCardanoError] -> ShowS # |
data GYConversionError #
GYConversionError
s may be raised during type conversions.
Constructors
GYNotPubKeyAddress !GYAddress | An address was expected to contain a pub key hash, but it did not. |
GYNotScriptAddress !GYAddress | An address was expected to contain a script hash, but it did not. |
GYInvalidPlutusValue !GYFromPlutusValueError !Value | Raised during Plutus Value to |
GYInvalidPlutusAsset !GYFromPlutusValueError | Raised during Plutus asset to GY asset conversion. |
GYInvalidAddressText !Text | |
GYEraSummariesToSlotConfigError !Text | Raised when trying to convert EraHistory to GYSlotConfig. |
GYLedgerToCardanoError !PlutusToCardanoError | Errors raised during plutus-ledger -> cardano api type conversion. |
GYInvalidAssetClass !Text | Errors raised by "GeniusYield.Types.Value.parseAssetClassCore" and similar. |
GYInvalidSlot !Integer | Errors caused by "GeniusYield.Types.Slot.slotFromInteger" resulting in |
Instances
Show GYConversionError # | |
Defined in GeniusYield.TxBuilder.Errors Methods showsPrec :: Int -> GYConversionError -> ShowS # show :: GYConversionError -> String # showList :: [GYConversionError] -> ShowS # |
data GYQueryUTxOError #
GYQueryUTxOError
s may be raised during utxo related queries.
Constructors
GYNoUtxosAtAddress ![GYAddress] | An address was queried for one or more UTxOs but none were found. |
GYNoUtxoAtRef !GYTxOutRef | No UTxO exists at given ref. |
Instances
Show GYQueryUTxOError # | |
Defined in GeniusYield.TxBuilder.Errors Methods showsPrec :: Int -> GYQueryUTxOError -> ShowS # show :: GYQueryUTxOError -> String # showList :: [GYQueryUTxOError] -> ShowS # |
data GYQueryDatumError #
GYQueryDatumError
may be raised during fetching and parsing datums.
Constructors
GYNoDatumForHash !GYDatumHash | No datum found for given hash. |
GYInvalidDatum !GYDatum | Datum parsing failed. |
GYNoDatumHash !GYUTxO | No datum hash at utxo. |
Instances
Show GYQueryDatumError # | |
Defined in GeniusYield.TxBuilder.Errors Methods showsPrec :: Int -> GYQueryDatumError -> ShowS # show :: GYQueryDatumError -> String # showList :: [GYQueryDatumError] -> ShowS # |
data GYObtainTxBodyContentError #
Constructors
GYNoScriptForHash !GYScriptHash | No script found for given hash. |
GYNoRedeemerForPurpose !(ConwayPlutusPurpose AsIx ConwayEra) | No redeemer found for given purpose. |
GYInvalidCertificate !(Certificate ApiEra) |
|
Instances
Show GYObtainTxBodyContentError # | |
Defined in GeniusYield.TxBuilder.Errors Methods showsPrec :: Int -> GYObtainTxBodyContentError -> ShowS # show :: GYObtainTxBodyContentError -> String # showList :: [GYObtainTxBodyContentError] -> ShowS # |
data GYTxMonadException where #
Exceptions raised within the GYTxMonad
computation.
This includes exceptions raised within the contract itself. It does not include:
- Exceptions that may be raised by the provider.
- Exceptions raised during transaction building/balancing.
- Other wildcard exceptions raised within IO.
Constructors
GYConversionException :: GYConversionError -> GYTxMonadException | Errors encountered during type conversions. |
GYQueryUTxOException :: GYQueryUTxOError -> GYTxMonadException | Errors encountered during utxo related queries. |
GYBuildTxException :: GYBuildTxError -> GYTxMonadException | Errors encountered during transaction building related functions. |
GYNoSuitableCollateralException | Raised when no suitable collateral of at least |
Fields
| |
GYSlotOverflowException | Raised if |
Fields
| |
GYTimeUnderflowException :: SystemStart -> GYTime -> GYTxMonadException | Raised during time -> slot conversion, if given timestamp is before known system start. |
GYQueryDatumException :: GYQueryDatumError -> GYTxMonadException | Raised during fetching/parsing datums. |
GYObtainTxBodyContentException :: GYObtainTxBodyContentError -> GYTxMonadException | Raised when obtaining tx body content. |
GYDatumMismatch :: forall (v :: PlutusVersion). GYOutDatum -> GYTxIn v -> GYTxMonadException | When actual datum in the UTxO is different than what is mentioned for in witness. |
GYApplicationException :: forall e. (Exception e, IsGYApiError e) => e -> GYTxMonadException | Wildcard user application specific errors. This is the "plug-in" point where an application
using the GY framework, can raise its own protocol specific errors within |
Instances
data GYBuildTxError #
GYBuildTxError
may be raised when building transactions, for non-trivial errors.
Insufficient funds and similar are considered trivial transaction building errors.
Constructors
GYBuildTxBalancingError !GYBalancingError | |
GYBuildTxBodyErrorAutoBalance !(TxBodyErrorAutoBalance ApiEra) | |
GYBuildTxFeeUtxoAdaInsufficient !(TxBodyErrorAutoBalance ApiEra) | If fee UTxO is provided for in extra build configuration, then this error is raised if it's insufficient to cover for fees and ADA of subsequent change output. |
GYBuildTxExUnitsTooBig | Execution units required is higher than the maximum as specified by protocol params. |
GYBuildTxSizeTooBig | Transaction size is higher than the maximum as specified by protocol params. |
GYBuildTxCollateralShortFall | Shortfall (in collateral inputs) for collateral requirement. |
GYBuildTxNoSuitableCollateral | Couldn't find a UTxO to use as collateral. |
GYBuildTxCborSimplificationError !CborSimplificationError | |
GYBuildTxCollapseExtraOutError !TxBodyError |
Instances
Show GYBuildTxError # | |
Defined in GeniusYield.Transaction.Common Methods showsPrec :: Int -> GYBuildTxError -> ShowS # show :: GYBuildTxError -> String # showList :: [GYBuildTxError] -> ShowS # |
data GYBalancingError #
Constructors
GYBalancingErrorInsufficientFunds !GYValue | |
GYBalancingErrorNonPositiveTxOut !(GYTxOut v) | |
GYBalancingErrorChangeShortFall !Natural | Lovelace shortfall in constructing a change output. See: GeniusYield.Transaction.CoinSelection.Balance.UnableToConstructChangeError |
GYBalancingErrorEmptyOwnUTxOs | User wallet has no utxos to select. |
Instances
PrintfArg GYBalancingError # | |
Defined in GeniusYield.Transaction.Common Methods | |
Show GYBalancingError # | |
Defined in GeniusYield.Transaction.Common Methods showsPrec :: Int -> GYBalancingError -> ShowS # show :: GYBalancingError -> String # showList :: [GYBalancingError] -> ShowS # | |
Eq GYBalancingError # | |
Defined in GeniusYield.Transaction.Common Methods (==) :: GYBalancingError -> GYBalancingError -> Bool # (/=) :: GYBalancingError -> GYBalancingError -> Bool # |
throwAppError :: (IsGYApiError e, Exception e, MonadError GYTxMonadException m) => e -> m a #
Throw an application specific exception (GYApplicationException
) within GYTxMonad
.