module PlutusLedgerApi.V2 (
Common.SerialisedScript,
Common.ScriptForEvaluation,
Common.serialisedScript,
Common.deserialisedScript,
Common.serialiseCompiledCode,
Common.serialiseUPLC,
deserialiseScript,
Common.uncheckedDeserialiseUPLC,
evaluateScriptRestricting,
evaluateScriptCounting,
Common.MajorProtocolVersion (..),
Common.VerboseMode (..),
Common.LogOutput,
Common.ExBudget (..),
V1.ExCPU (..),
V1.ExMemory (..),
V1.SatInt (unSatInt),
V1.fromSatInt,
Common.EvaluationContext,
EvaluationContext.mkEvaluationContext,
ParamName.ParamName (..),
Common.CostModelApplyError (..),
Common.CostModelParams,
Common.assertWellFormedCostModelParams,
Contexts.ScriptContext (..),
Contexts.ScriptPurpose (..),
Common.BuiltinByteString,
Common.toBuiltin,
Common.fromBuiltin,
Common.toOpaque,
Common.fromOpaque,
V1.LedgerBytes (..),
V1.fromBytes,
V1.DCert (..),
V1.StakingCredential (..),
V1.Credential (..),
V1.Value (..),
V1.CurrencySymbol (..),
V1.TokenName (..),
V1.singleton,
V1.unionWith,
V1.adaSymbol,
V1.adaToken,
V1.Lovelace (..),
V1.POSIXTime (..),
V1.POSIXTimeRange,
V1.Address (..),
V1.PubKeyHash (..),
Tx.TxId (..),
Contexts.TxInfo (..),
Tx.TxOut (..),
Tx.TxOutRef (..),
Contexts.TxInInfo (..),
Tx.OutputDatum (..),
V1.Interval (..),
V1.Extended (..),
V1.Closure,
V1.UpperBound (..),
V1.LowerBound (..),
V1.always,
V1.from,
V1.to,
V1.lowerBound,
V1.upperBound,
V1.strictLowerBound,
V1.strictUpperBound,
Map,
unsafeFromList,
V1.ScriptHash (..),
V1.Redeemer (..),
V1.RedeemerHash (..),
V1.Datum (..),
V1.DatumHash (..),
Common.Data (..),
Common.BuiltinData (..),
Common.ToData (..),
Common.FromData (..),
Common.UnsafeFromData (..),
Common.toData,
Common.fromData,
Common.unsafeFromData,
Common.dataToBuiltinData,
Common.builtinDataToData,
Common.MonadError,
Common.EvaluationError (..),
Common.ScriptDecodeError (..),
) where
import PlutusLedgerApi.Common qualified as Common
import PlutusLedgerApi.V1 qualified as V1
import PlutusLedgerApi.V2.Contexts qualified as Contexts
import PlutusLedgerApi.V2.EvaluationContext qualified as EvaluationContext
import PlutusLedgerApi.V2.ParamName qualified as ParamName
import PlutusLedgerApi.V2.Tx qualified as Tx
import PlutusTx.AssocMap (Map, unsafeFromList)
thisLedgerLanguage :: Common.PlutusLedgerLanguage
thisLedgerLanguage :: PlutusLedgerLanguage
thisLedgerLanguage = PlutusLedgerLanguage
Common.PlutusV2
deserialiseScript ::
forall m.
(Common.MonadError Common.ScriptDecodeError m) =>
Common.MajorProtocolVersion ->
Common.SerialisedScript ->
m Common.ScriptForEvaluation
deserialiseScript :: forall (m :: * -> *).
MonadError ScriptDecodeError m =>
MajorProtocolVersion -> SerialisedScript -> m ScriptForEvaluation
deserialiseScript = PlutusLedgerLanguage
-> MajorProtocolVersion
-> SerialisedScript
-> m ScriptForEvaluation
forall (m :: * -> *).
MonadError ScriptDecodeError m =>
PlutusLedgerLanguage
-> MajorProtocolVersion
-> SerialisedScript
-> m ScriptForEvaluation
Common.deserialiseScript PlutusLedgerLanguage
thisLedgerLanguage
evaluateScriptCounting ::
Common.MajorProtocolVersion ->
Common.VerboseMode ->
Common.EvaluationContext ->
Common.ScriptForEvaluation ->
[Common.Data] ->
(Common.LogOutput, Either Common.EvaluationError Common.ExBudget)
evaluateScriptCounting :: MajorProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ScriptForEvaluation
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptCounting = PlutusLedgerLanguage
-> MajorProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ScriptForEvaluation
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
Common.evaluateScriptCounting PlutusLedgerLanguage
thisLedgerLanguage
evaluateScriptRestricting ::
Common.MajorProtocolVersion ->
Common.VerboseMode ->
Common.EvaluationContext ->
Common.ExBudget ->
Common.ScriptForEvaluation ->
[Common.Data] ->
(Common.LogOutput, Either Common.EvaluationError Common.ExBudget)
evaluateScriptRestricting :: MajorProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> ScriptForEvaluation
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptRestricting = PlutusLedgerLanguage
-> MajorProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> ScriptForEvaluation
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
Common.evaluateScriptRestricting PlutusLedgerLanguage
thisLedgerLanguage