cardano-ledger-alonzo-1.13.0.0: Cardano ledger introducing Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Alonzo.Plutus.Context

Synopsis

Documentation

data LedgerTxInfo era Source #

All information that is necessary from the ledger to construct Plutus' TxInfo.

Constructors

LedgerTxInfo 

Fields

class (AlonzoEraScript era, Eq (ContextError era), Show (ContextError era), NFData (ContextError era), NoThunks (ContextError era), EncCBOR (ContextError era), DecCBOR (ContextError era), ToJSON (ContextError era)) ⇒ EraPlutusContext era where Source #

Associated Types

type ContextError era = (r ∷ Type) | r → era Source #

data TxInfoResult era ∷ Type Source #

This data type family is used to memoize the results of toPlutusTxInfo, so the outcome can be shared between execution of different scripts with the same language version.

Methods

mkTxInfoResultLedgerTxInfo era → TxInfoResult era Source #

Construct PlutusTxInfo for all supported languages in this era.

lookupTxInfoResultEraPlutusTxInfo l era ⇒ SLanguage l → TxInfoResult era → Either (ContextError era) (PlutusTxInfo l) Source #

TxInfo for the same language can be shared between executions of every script of the same version in a single transaction.

Note - The EraPlutusTxInfo is here only to enforce this function is not called with an unsupported plutus language version.

mkPlutusWithContextPlutusScript era → ScriptHashPlutusPurpose AsIxItem era → LedgerTxInfo era → TxInfoResult era → (Data era, ExUnits) → CostModelEither (ContextError era) PlutusWithContext Source #

lookupTxInfoResultImpossible ∷ (HasCallStack, EraPlutusTxInfo l era) ⇒ SLanguage l → Either (ContextError era) (PlutusTxInfo l) Source #

Helper function to use when implementing lookupTxInfoResult for plutus languages that are not supported by the era.

Language dependent translation