atlas-cardano-0.5.0: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainer[email protected]
Stabilitydevelop
Safe HaskellSafe-Inferred
LanguageGHC2021

GeniusYield.TxBuilder.Errors

Description

 
Synopsis

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.

Fields

StakePtrAddressUnsupported Address

Raised when trying to convert a stake ptr plutus address.

UnknownPlutusToCardanoError

Wildcard unhandled constructors; shouldn't happen usually.

Fields

Instances

Instances details
Show PlutusToCardanoError # 
Instance details

Defined in GeniusYield.Types.Ledger

data GYConversionError #

GYConversionErrors 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 GYValue conversion.

GYInvalidPlutusAsset !GYFromPlutusValueError

Raised during Plutus asset to GY asset conversion.

GYInvalidAddressText !Text

Raised when trying to parse Text into GYAddress.

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 Nothing.

Instances

Instances details
Show GYConversionError # 
Instance details

Defined in GeniusYield.TxBuilder.Errors

data GYQueryUTxOError #

GYQueryUTxOErrors 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

Instances details
Show GYQueryUTxOError # 
Instance details

Defined in GeniusYield.TxBuilder.Errors

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

Instances details
Show GYQueryDatumError # 
Instance details

Defined in GeniusYield.TxBuilder.Errors

data GYTxMonadExceptionType 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

GYConversionExceptionGYConversionErrorGYTxMonadException

Errors encountered during type conversions.

GYQueryUTxOExceptionGYQueryUTxOErrorGYTxMonadException

Errors encountered during utxo related queries.

GYBuildTxExceptionGYBuildTxErrorGYTxMonadException

Errors encountered during transaction building related functions.

GYNoSuitableCollateralException

Raised when no suitable collateral of at least tmeMinLovelace amount is found at tmeAddress.

Fields

GYSlotOverflowException

Raised if tmeSlot value overflows when advancing it by tmeAdvanceAmount.

Fields

GYTimeUnderflowExceptionSystemStartGYTimeGYTxMonadException

Raised during time -> slot conversion, if given timestamp is before known system start.

GYQueryDatumExceptionGYQueryDatumErrorGYTxMonadException

Raised during fetching/parsing datums.

GYDatumMismatchGYOutDatumGYTxIn 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 GYTxMonad.

Instances

Instances details
Exception GYTxMonadException # 
Instance details

Defined in GeniusYield.TxBuilder.Errors

Show GYTxMonadException # 
Instance details

Defined in GeniusYield.TxBuilder.Errors

MonadError GYTxMonadException GYTxMonadClb # 
Instance details

Defined in GeniusYield.Test.Clb

MonadError GYTxMonadException GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

MonadError GYTxMonadException GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

MonadError GYTxMonadException GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

MonadError GYTxMonadException GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

MonadError GYTxMonadException m ⇒ MonadError GYTxMonadException (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

MonadError GYTxMonadException m ⇒ MonadError GYTxMonadException (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

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 BabbageEra) 
GYBuildTxPPConversionError !ProtocolParametersConversionError 
GYBuildTxMissingMaxExUnitsParam

Missing max ex units in protocol params

GYBuildTxExUnitsTooBig

Execution units required is higher than the maximum as specified by protocol params.

Fields

  • (Natural, Natural)

    Tuple of maximum execution steps & memory as given by protocol parameters.

  • (Natural, Natural)

    Tuple of execution steps & memory as taken by built transaction.

GYBuildTxSizeTooBig

Transaction size is higher than the maximum as specified by protocol params.

Fields

  • !Natural

    Maximum size as specified by protocol parameters.

  • !Natural

    Size our built transaction took.

GYBuildTxCollateralShortFall

Shortfall (in collateral inputs) for collateral requirement.

Fields

  • !Natural

    Transaction collateral requirement.

  • !Natural

    Lovelaces in given collateral UTxO.

GYBuildTxNoSuitableCollateral

Couldn't find a UTxO to use as collateral.

GYBuildTxCborSimplificationError !CborSimplificationError 
GYBuildTxCollapseExtraOutError !TxBodyError 

Instances

Instances details
Show GYBuildTxError # 
Instance details

Defined in GeniusYield.Transaction.Common

throwAppError ∷ (IsGYApiError e, Exception e, MonadError GYTxMonadException m) ⇒ e → m a #

Throw an application specific exception (GYApplicationException) within GYTxMonad.