cardano-ledger-alonzo-1.17.1.0: Cardano ledger introducing Plutus Core
Safe HaskellNone
LanguageHaskell2010

Cardano.Ledger.Alonzo.Plutus.TxInfo

Synopsis

Documentation

data AlonzoContextError era Source #

Constructors

TranslationLogicMissingInput TxIn 
TimeTranslationPastHorizon Text 
CertificateNotSupported (TxCert era) 
PlutusPurposeNotSupported (PlutusPurpose AsItem era) 
ImpossibleContextError Text

This is a freeform failure message for impossible scenarios. It is better to produce an impossible message than crash with an error exception.

Instances

Instances details
(ToJSON (TxCert era), ToJSON (PlutusPurpose AsItem era)) ⇒ ToJSON (AlonzoContextError era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Plutus.TxInfo

(Era era, DecCBOR (TxCert era), DecCBOR (PlutusPurpose AsItem era)) ⇒ DecCBOR (AlonzoContextError era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Plutus.TxInfo

(Era era, EncCBOR (TxCert era), EncCBOR (PlutusPurpose AsItem era)) ⇒ EncCBOR (AlonzoContextError era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Plutus.TxInfo

(Era era, NFData (TxCert era), NFData (PlutusPurpose AsItem era)) ⇒ NFData (AlonzoContextError era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Plutus.TxInfo

Methods

rnf ∷ AlonzoContextError era → () #

Generic (AlonzoContextError era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Plutus.TxInfo

Associated Types

type Rep (AlonzoContextError era) 
Instance details

Defined in Cardano.Ledger.Alonzo.Plutus.TxInfo

type Rep (AlonzoContextError era) = D1 ('MetaData "AlonzoContextError" "Cardano.Ledger.Alonzo.Plutus.TxInfo" "cardano-ledger-alonzo-1.17.1.0-inplace" 'False) ((C1 ('MetaCons "TranslationLogicMissingInput" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxIn)) :+: C1 ('MetaCons "TimeTranslationPastHorizon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: (C1 ('MetaCons "CertificateNotSupported" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TxCert era))) :+: (C1 ('MetaCons "PlutusPurposeNotSupported" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PlutusPurpose AsItem era))) :+: C1 ('MetaCons "ImpossibleContextError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))))
(Show (TxCert era), Show (PlutusPurpose AsItem era), EraPParams era) ⇒ Show (AlonzoContextError era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Plutus.TxInfo

(Eq (TxCert era), Eq (PlutusPurpose AsItem era), EraPParams era) ⇒ Eq (AlonzoContextError era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Plutus.TxInfo

(Ord (TxCert era), Ord (PlutusPurpose AsItem era), EraPParams era) ⇒ Ord (AlonzoContextError era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Plutus.TxInfo

type Rep (AlonzoContextError era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Plutus.TxInfo

type Rep (AlonzoContextError era) = D1 ('MetaData "AlonzoContextError" "Cardano.Ledger.Alonzo.Plutus.TxInfo" "cardano-ledger-alonzo-1.17.1.0-inplace" 'False) ((C1 ('MetaCons "TranslationLogicMissingInput" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxIn)) :+: C1 ('MetaCons "TimeTranslationPastHorizon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: (C1 ('MetaCons "CertificateNotSupported" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TxCert era))) :+: (C1 ('MetaCons "PlutusPurposeNotSupported" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PlutusPurpose AsItem era))) :+: C1 ('MetaCons "ImpossibleContextError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))))

transTxOut ∷ (Value era ~ MaryValue, AlonzoEraTxOut era) ⇒ TxOut era → Maybe TxOut Source #

Translate a TxOut. Returns Nothing if a Byron address is present in the TxOut.

transValidityInterval ∷ ∀ proxy era. Inject (AlonzoContextError era) (ContextError era) ⇒ proxy era → EpochInfo (Either Text) → SystemStart → ValidityInterval → Either (ContextError era) POSIXTimeRange Source #

Translate a validity interval to POSIX time

transMintValue ∷ MultiAsset → Value Source #

Hysterical raisins:

Previously transaction body contained a mint field with MaryValue instead of a MultiAsset, which has changed since then to just MultiAsset (because minting ADA makes no sense). However, if we don't preserve previous translation, scripts that previously succeeded will fail.

transTxCertCommon ∷ (ShelleyEraTxCert era, Inject (AlonzoContextError era) (ContextError era)) ⇒ TxCert era → Either (ContextError era) DCert Source #

Just like transTxCert, but do not translate certificates that were deprecated in Conway

transTxBodyId ∷ ∀ era (l ∷ TxLevel). EraTxBody era ⇒ TxBody l era → TxId Source #

transTxBodyCerts ∷ ∀ (l ∷ Language) era proxy (t ∷ TxLevel). (EraPlutusTxInfo l era, EraTxBody era) ⇒ proxy l → ProtVer → TxBody t era → Either (ContextError era) [PlutusTxCert l] Source #

Translate all TxCerts from within a TxBody

transTxBodyWithdrawals ∷ ∀ era (t ∷ TxLevel). EraTxBody era ⇒ TxBody t era → [(StakingCredential, Integer)] Source #

Translate all Withdrawals from within a TxBody

transTxBodyReqSignerHashes ∷ ∀ era (t ∷ TxLevel). AlonzoEraTxBody era ⇒ TxBody t era → [PubKeyHash] Source #

Translate all required signers produced by reqSignerHashesTxBodyLs from within a TxBody

transTxWitsDatums ∷ AlonzoEraTxWits era ⇒ TxWits era → [(DatumHash, Datum)] Source #

Translate all TxDatss from within TxWits

LegacyPlutusArgs helpers

toPlutusV1Args ∷ ∀ era proxy (level ∷ TxLevel). (AlonzoEraUTxO era, EraPlutusTxInfo 'PlutusV1 era) ⇒ proxy 'PlutusV1 → LedgerTxInfo level era → TxInfo → PlutusPurpose AsIxItem era → Data era → Either (ContextError era) (PlutusArgs 'PlutusV1) Source #

toLegacyPlutusArgs ∷ ∀ (l ∷ Language) era proxy (level ∷ TxLevel). EraPlutusTxInfo l era ⇒ proxy l → LedgerTxInfo level era → (PlutusScriptPurpose l → PlutusScriptContext l) → PlutusPurpose AsIxItem era → Maybe (Data era) → Data era → Either (ContextError era) (LegacyPlutusArgs l) Source #

Orphan instances

EraPlutusContext AlonzoEra Source # 
Instance details

EraPlutusTxInfo 'PlutusV1 AlonzoEra Source # 
Instance details