Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
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 GYTxMonadException ∷ Type where
- GYConversionException ∷ GYConversionError → GYTxMonadException
- GYQueryUTxOException ∷ GYQueryUTxOError → GYTxMonadException
- GYBuildTxException ∷ GYBuildTxError → GYTxMonadException
- GYNoSuitableCollateralException ∷ {..} → GYTxMonadException
- GYSlotOverflowException ∷ {..} → GYTxMonadException
- GYTimeUnderflowException ∷ SystemStart → GYTime → GYTxMonadException
- GYQueryDatumException ∷ GYQueryDatumError → GYTxMonadException
- GYDatumMismatch ∷ GYOutDatum → GYTxIn v → GYTxMonadException
- GYApplicationException ∷ (Exception e, IsGYApiError e) ⇒ e → GYTxMonadException
- data GYBuildTxError
- = GYBuildTxBalancingError !GYBalancingError
- | GYBuildTxBodyErrorAutoBalance !(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.
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 showsPrec ∷ Int → PlutusToCardanoError → ShowS # show ∷ PlutusToCardanoError → String # showList ∷ [PlutusToCardanoError] → ShowS # |
data GYConversionError #
GYConversionError
s may be raised during type conversions.
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 showsPrec ∷ Int → GYConversionError → ShowS # show ∷ GYConversionError → String # showList ∷ [GYConversionError] → ShowS # |
data GYQueryUTxOError #
GYQueryUTxOError
s may be raised during utxo related queries.
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 showsPrec ∷ Int → GYQueryUTxOError → ShowS # show ∷ GYQueryUTxOError → String # showList ∷ [GYQueryUTxOError] → ShowS # |
data GYQueryDatumError #
GYQueryDatumError
may be raised during fetching and parsing datums.
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 showsPrec ∷ Int → GYQueryDatumError → ShowS # show ∷ GYQueryDatumError → String # showList ∷ [GYQueryDatumError] → ShowS # |
data GYTxMonadException ∷ Type 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.
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 |
| |
GYSlotOverflowException | Raised if |
| |
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. |
GYDatumMismatch ∷ GYOutDatum → GYTxIn v → GYTxMonadException | When actual datum in the UTxO is different than what is mentioned for in witness. |
GYApplicationException ∷ (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.
GYBuildTxBalancingError !GYBalancingError | |
GYBuildTxBodyErrorAutoBalance !(TxBodyErrorAutoBalance ApiEra) | |
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 showsPrec ∷ Int → GYBuildTxError → ShowS # show ∷ GYBuildTxError → String # showList ∷ [GYBuildTxError] → ShowS # |
data GYBalancingError #
GYBalancingErrorInsufficientFunds !GYValue | |
∀ v. GYBalancingErrorNonPositiveTxOut !(GYTxOut v) | |
GYBalancingErrorChangeShortFall !Natural | Lovelace shortfall in constructing a change output. See: Cardano.CoinSelection.Balance.UnableToConstructChangeError |
GYBalancingErrorEmptyOwnUTxOs | User wallet has no utxos to select. |
Instances
Show GYBalancingError # | |
Defined in GeniusYield.Transaction.Common showsPrec ∷ Int → GYBalancingError → ShowS # show ∷ GYBalancingError → String # showList ∷ [GYBalancingError] → ShowS # | |
PrintfArg GYBalancingError # | |
Eq GYBalancingError # | |
Defined in GeniusYield.Transaction.Common |
throwAppError ∷ (IsGYApiError e, Exception e, MonadError GYTxMonadException m) ⇒ e → m a #
Throw an application specific exception (GYApplicationException
) within GYTxMonad
.