{-# LANGUAGE DerivingStrategies #-}
module Plutus.V2.Ledger.Api (
SerializedScript
, Script
, fromCompiledCode
, isScriptWellFormed
, evaluateScriptRestricting
, evaluateScriptCounting
, ProtocolVersion (..)
, VerboseMode (..)
, LogOutput
, ExBudget (..)
, ExCPU (..)
, ExMemory (..)
, SatInt
, EvaluationContext
, mkEvaluationContext
, CostModelApplyError (..)
, CostModelParams
, assertWellFormedCostModelParams
, costModelParamNames
, 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
, Validator (..)
, mkValidatorScript
, unValidatorScript
, ValidatorHash (..)
, MintingPolicy (..)
, mkMintingPolicyScript
, unMintingPolicyScript
, MintingPolicyHash (..)
, StakeValidator (..)
, mkStakeValidatorScript
, unStakeValidatorScript
, StakeValidatorHash (..)
, Redeemer (..)
, RedeemerHash (..)
, Datum (..)
, DatumHash (..)
, ScriptHash (..)
, Data (..)
, BuiltinData (..)
, ToData (..)
, FromData (..)
, UnsafeFromData (..)
, toData
, fromData
, dataToBuiltinData
, builtinDataToData
, EvaluationError (..)
) where
import Plutus.ApiCommon as Common hiding (evaluateScriptCounting, evaluateScriptRestricting, isScriptWellFormed)
import Plutus.ApiCommon qualified as Common (evaluateScriptCounting, evaluateScriptRestricting, isScriptWellFormed)
import Plutus.V1.Ledger.Api hiding (ScriptContext (..), TxInInfo (..), TxInfo (..), TxOut (..), costModelParamNames,
evaluateScriptCounting, evaluateScriptRestricting, isScriptWellFormed)
import Plutus.V1.Ledger.Scripts (ScriptHash (..))
import Plutus.V2.Ledger.Contexts
import Plutus.V2.Ledger.EvaluationContext
import Plutus.V2.Ledger.Tx (OutputDatum (..))
import PlutusCore.Data qualified as PLC
import PlutusTx.AssocMap (Map, fromList)
isScriptWellFormed :: ProtocolVersion -> SerializedScript -> Bool
isScriptWellFormed :: ProtocolVersion -> SerializedScript -> Bool
isScriptWellFormed = LedgerPlutusVersion -> ProtocolVersion -> SerializedScript -> Bool
Common.isScriptWellFormed LedgerPlutusVersion
PlutusV2
evaluateScriptCounting
:: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> SerializedScript
-> [PLC.Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptCounting :: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> SerializedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptCounting = LedgerPlutusVersion
-> ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> SerializedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
Common.evaluateScriptCounting LedgerPlutusVersion
PlutusV2
evaluateScriptRestricting
:: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> SerializedScript
-> [PLC.Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptRestricting :: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> SerializedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptRestricting = LedgerPlutusVersion
-> ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> SerializedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
Common.evaluateScriptRestricting LedgerPlutusVersion
PlutusV2