module PlutusLedgerApi.V2 (
SerialisedScript
, serialiseCompiledCode
, serialiseUPLC
, deserialiseUPLC
, assertScriptWellFormed
, evaluateScriptRestricting
, evaluateScriptCounting
, ProtocolVersion (..)
, VerboseMode (..)
, LogOutput
, ExBudget (..)
, ExCPU (..)
, ExMemory (..)
, SatInt
, EvaluationContext
, mkEvaluationContext
, ParamName (..)
, CostModelApplyError (..)
, CostModelParams
, assertWellFormedCostModelParams
, ScriptContext(..)
, ScriptPurpose(..)
, BuiltinByteString
, toBuiltin
, fromBuiltin
, LedgerBytes (..)
, fromBytes
, DCert(..)
, StakingCredential(..)
, Credential(..)
, Value (..)
, CurrencySymbol (..)
, TokenName (..)
, singleton
, unionWith
, adaSymbol
, adaToken
, POSIXTime (..)
, POSIXTimeRange
, Address (..)
, PubKeyHash (..)
, TxId (..)
, TxInfo (..)
, TxOut(..)
, TxOutRef(..)
, TxInInfo(..)
, OutputDatum (..)
, Interval (..)
, Extended (..)
, Closure
, UpperBound (..)
, LowerBound (..)
, always
, from
, to
, lowerBound
, upperBound
, strictLowerBound
, strictUpperBound
, Map
, fromList
, ScriptHash (..)
, Redeemer (..)
, RedeemerHash (..)
, Datum (..)
, DatumHash (..)
, Data (..)
, BuiltinData (..)
, ToData (..)
, FromData (..)
, UnsafeFromData (..)
, toData
, fromData
, dataToBuiltinData
, builtinDataToData
, EvaluationError (..)
, ScriptDecodeError (..)
) where
import Control.Monad.Except (MonadError)
import PlutusLedgerApi.Common as Common hiding (assertScriptWellFormed, evaluateScriptCounting,
evaluateScriptRestricting)
import PlutusLedgerApi.Common qualified as Common (assertScriptWellFormed, evaluateScriptCounting,
evaluateScriptRestricting)
import PlutusLedgerApi.V1 hiding (ParamName, ScriptContext (..), TxInInfo (..), TxInfo (..), TxOut (..),
assertScriptWellFormed, evaluateScriptCounting, evaluateScriptRestricting,
mkEvaluationContext)
import PlutusLedgerApi.V2.Contexts
import PlutusLedgerApi.V2.EvaluationContext
import PlutusLedgerApi.V2.ParamName
import PlutusLedgerApi.V2.Tx (OutputDatum (..))
import PlutusCore.Data qualified as PLC
import PlutusTx.AssocMap (Map, fromList)
thisPlutusVersion :: LedgerPlutusVersion
thisPlutusVersion :: LedgerPlutusVersion
thisPlutusVersion = LedgerPlutusVersion
PlutusV2
assertScriptWellFormed :: MonadError ScriptDecodeError m
=> ProtocolVersion
-> SerialisedScript
-> m ()
assertScriptWellFormed :: forall (m :: * -> *).
MonadError ScriptDecodeError m =>
ProtocolVersion -> SerialisedScript -> m ()
assertScriptWellFormed = forall (m :: * -> *).
MonadError ScriptDecodeError m =>
LedgerPlutusVersion -> ProtocolVersion -> SerialisedScript -> m ()
Common.assertScriptWellFormed LedgerPlutusVersion
thisPlutusVersion
evaluateScriptCounting
:: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> SerialisedScript
-> [PLC.Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptCounting :: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> SerialisedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptCounting = LedgerPlutusVersion
-> ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> SerialisedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
Common.evaluateScriptCounting LedgerPlutusVersion
thisPlutusVersion
evaluateScriptRestricting
:: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> SerialisedScript
-> [PLC.Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptRestricting :: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> SerialisedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptRestricting = LedgerPlutusVersion
-> ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> SerialisedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
Common.evaluateScriptRestricting LedgerPlutusVersion
thisPlutusVersion