cardano-ledger-shelley-ma-0.1.0.0: Shelley ledger with multiasset and time lock support.
Safe HaskellNone
LanguageHaskell2010

Cardano.Ledger.ShelleyMA.Rules.Utxo

Synopsis

Documentation

data UtxoPredicateFailure era Source #

Instances

Instances details
ShelleyBased era => Eq (UtxoPredicateFailure era) Source # 
Instance details

Defined in Cardano.Ledger.ShelleyMA.Rules.Utxo

ShelleyBased era => Show (UtxoPredicateFailure era) Source # 
Instance details

Defined in Cardano.Ledger.ShelleyMA.Rules.Utxo

Generic (UtxoPredicateFailure era) Source # 
Instance details

Defined in Cardano.Ledger.ShelleyMA.Rules.Utxo

Associated Types

type Rep (UtxoPredicateFailure era) :: Type -> Type #

ShelleyBased era => ToCBOR (UtxoPredicateFailure era) Source # 
Instance details

Defined in Cardano.Ledger.ShelleyMA.Rules.Utxo

ShelleyBased era => FromCBOR (UtxoPredicateFailure era) Source # 
Instance details

Defined in Cardano.Ledger.ShelleyMA.Rules.Utxo

NoThunks (Delta (Value era)) => NoThunks (UtxoPredicateFailure era) Source # 
Instance details

Defined in Cardano.Ledger.ShelleyMA.Rules.Utxo

type Rep (UtxoPredicateFailure era) Source # 
Instance details

Defined in Cardano.Ledger.ShelleyMA.Rules.Utxo

type Rep (UtxoPredicateFailure era) = D1 ('MetaData "UtxoPredicateFailure" "Cardano.Ledger.ShelleyMA.Rules.Utxo" "cardano-ledger-shelley-ma-0.1.0.0-1YGSw9UWWJIK0EmJl3eL5D" 'False) (((C1 ('MetaCons "BadInputsUTxO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set (TxIn (Crypto era))))) :+: (C1 ('MetaCons "OutsideValidityIntervalUTxO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ValidityInterval) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo)) :+: C1 ('MetaCons "MaxTxSizeUTxO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)))) :+: (C1 ('MetaCons "InputSetEmptyUTxO" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FeeTooSmallUTxO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)) :+: C1 ('MetaCons "ValueNotConservedUTxO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Delta (Value era))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Delta (Value era))))))) :+: ((C1 ('MetaCons "WrongNetwork" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set (Addr (Crypto era))))) :+: (C1 ('MetaCons "WrongNetworkWithdrawal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set (RewardAcnt (Crypto era))))) :+: C1 ('MetaCons "OutputTooSmallUTxO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [TxOut era])))) :+: (C1 ('MetaCons "UpdateFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PredicateFailure (PPUP era)))) :+: (C1 ('MetaCons "OutputBootAddrAttrsTooBig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [TxOut era])) :+: C1 ('MetaCons "TriesToForgeADA" 'PrefixI 'False) (U1 :: Type -> Type)))))

consumed :: forall era. (ShelleyBased era, HasField "certs" (TxBody era) (StrictSeq (DCert (Crypto era))), HasField "inputs" (TxBody era) (Set (TxIn (Crypto era))), HasField "mint" (TxBody era) (Value era), HasField "wdrls" (TxBody era) (Wdrl (Crypto era))) => PParams era -> UTxO era -> TxBody era -> Value era Source #

Calculate the value consumed by the transation.

This differs from the corresponding Shelley function Shelley.consumed since it also considers the "mint" field which creates or destroys non-Ada tokens.

Note that this is slightly confusing, since it also covers non-Ada assets _created_ by the transaction, depending on the sign of the quantities in the mint field.

utxoTransition :: forall era. (ShelleyBased era, STS (UTXO era), Embed (PPUP era) (UTXO era), BaseM (UTXO era) ~ ShelleyBase, Environment (UTXO era) ~ UtxoEnv era, State (UTXO era) ~ UTxOState era, Signal (UTXO era) ~ Tx era, PredicateFailure (UTXO era) ~ UtxoPredicateFailure era, HasField "certs" (TxBody era) (StrictSeq (DCert (Crypto era))), HasField "inputs" (TxBody era) (Set (TxIn (Crypto era))), HasField "mint" (TxBody era) (Value era), HasField "outputs" (TxBody era) (StrictSeq (TxOut era)), HasField "wdrls" (TxBody era) (Wdrl (Crypto era)), HasField "txfee" (TxBody era) Coin, HasField "vldt" (TxBody era) ValidityInterval, HasField "update" (TxBody era) (StrictMaybe (Update era))) => TransitionRule (UTXO era) Source #

The UTxO transition rule for the Shelley-MA (Mary and Allegra) eras.

Orphan instances