Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Ledger.ShelleyMA.Rules.Utxo
Contents
Synopsis
- data UtxoPredicateFailure era
- = BadInputsUTxO !(Set (TxIn (Crypto era)))
- | OutsideValidityIntervalUTxO !ValidityInterval !SlotNo
- | MaxTxSizeUTxO !Integer !Integer
- | InputSetEmptyUTxO
- | FeeTooSmallUTxO !Coin !Coin
- | ValueNotConservedUTxO !(Delta (Value era)) !(Delta (Value era))
- | WrongNetwork !Network !(Set (Addr (Crypto era)))
- | WrongNetworkWithdrawal !Network !(Set (RewardAcnt (Crypto era)))
- | OutputTooSmallUTxO ![TxOut era]
- | UpdateFailure (PredicateFailure (PPUP era))
- | OutputBootAddrAttrsTooBig ![TxOut era]
- | TriesToForgeADA
- 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
- 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)
Documentation
data UtxoPredicateFailure era Source #
Constructors
BadInputsUTxO !(Set (TxIn (Crypto era))) | |
OutsideValidityIntervalUTxO !ValidityInterval !SlotNo | |
MaxTxSizeUTxO !Integer !Integer | |
InputSetEmptyUTxO | |
FeeTooSmallUTxO !Coin !Coin | |
ValueNotConservedUTxO !(Delta (Value era)) !(Delta (Value era)) | |
WrongNetwork !Network !(Set (Addr (Crypto era))) | |
WrongNetworkWithdrawal !Network !(Set (RewardAcnt (Crypto era))) | |
OutputTooSmallUTxO ![TxOut era] | |
UpdateFailure (PredicateFailure (PPUP era)) | |
OutputBootAddrAttrsTooBig ![TxOut era] | |
TriesToForgeADA |
Instances
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
(Crypto c, Typeable ma, ShelleyBased (ShelleyMAEra ma c), TxBody (ShelleyMAEra ma c) ~ TxBody (ShelleyMAEra ma c)) => STS (UTXO (ShelleyMAEra ma c)) Source # | |
Associated Types type State (UTXO (ShelleyMAEra ma c)) Source # type Signal (UTXO (ShelleyMAEra ma c)) Source # type Environment (UTXO (ShelleyMAEra ma c)) Source # type BaseM (UTXO (ShelleyMAEra ma c)) :: Type -> Type Source # type PredicateFailure (UTXO (ShelleyMAEra ma c)) = (b :: Type) Source # Methods initialRules :: [InitialRule (UTXO (ShelleyMAEra ma c))] Source # transitionRules :: [TransitionRule (UTXO (ShelleyMAEra ma c))] Source # assertions :: [Assertion (UTXO (ShelleyMAEra ma c))] Source # renderAssertionViolation :: AssertionViolation (UTXO (ShelleyMAEra ma c)) -> String Source # | |
(Crypto c, Typeable ma) => Embed (PPUP (ShelleyMAEra ma c)) (UTXO (ShelleyMAEra ma c)) Source # | |
Methods wrapFailed :: PredicateFailure (PPUP (ShelleyMAEra ma c)) -> PredicateFailure (UTXO (ShelleyMAEra ma c)) Source # |