module PlutusLedgerApi.V1 (
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(..)
, Interval (..)
, Extended (..)
, Closure
, UpperBound (..)
, LowerBound (..)
, always
, from
, to
, lowerBound
, upperBound
, strictLowerBound
, strictUpperBound
, ScriptHash (..)
, Redeemer (..)
, RedeemerHash (..)
, Datum (..)
, DatumHash (..)
, PLC.Data (..)
, BuiltinData (..)
, ToData (..)
, FromData (..)
, UnsafeFromData (..)
, toData
, fromData
, dataToBuiltinData
, builtinDataToData
, EvaluationError (..)
, ScriptDecodeError (..)
) where
import Control.Monad.Except (MonadError)
import Data.SatInt
import PlutusCore.Data qualified as PLC
import PlutusCore.Evaluation.Machine.ExBudget as PLC
import PlutusCore.Evaluation.Machine.ExMemory (ExCPU (..), ExMemory (..))
import PlutusLedgerApi.Common as Common hiding (assertScriptWellFormed, evaluateScriptCounting,
evaluateScriptRestricting)
import PlutusLedgerApi.Common qualified as Common (assertScriptWellFormed, evaluateScriptCounting,
evaluateScriptRestricting)
import PlutusLedgerApi.V1.Address
import PlutusLedgerApi.V1.Bytes
import PlutusLedgerApi.V1.Contexts
import PlutusLedgerApi.V1.Credential
import PlutusLedgerApi.V1.Crypto
import PlutusLedgerApi.V1.DCert
import PlutusLedgerApi.V1.EvaluationContext
import PlutusLedgerApi.V1.Interval hiding (singleton)
import PlutusLedgerApi.V1.ParamName
import PlutusLedgerApi.V1.Scripts as Scripts
import PlutusLedgerApi.V1.Time
import PlutusLedgerApi.V1.Value
import PlutusTx (FromData (..), ToData (..), UnsafeFromData (..), fromData, toData)
import PlutusTx.Builtins.Internal (BuiltinData (..), builtinDataToData, dataToBuiltinData)
import PlutusTx.Prelude (BuiltinByteString, fromBuiltin, toBuiltin)
thisPlutusVersion :: LedgerPlutusVersion
thisPlutusVersion :: LedgerPlutusVersion
thisPlutusVersion = LedgerPlutusVersion
PlutusV1
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