{-# LANGUAGE PatternSynonyms #-}
module PlutusLedgerApi.Data.V3 (
Common.SerialisedScript,
Common.ScriptForEvaluation,
Common.serialisedScript,
Common.deserialisedScript,
Common.serialiseCompiledCode,
Common.serialiseUPLC,
deserialiseScript,
Common.uncheckedDeserialiseUPLC,
evaluateScriptRestricting,
evaluateScriptCounting,
Contexts.ColdCommitteeCredential (..),
Contexts.HotCommitteeCredential (..),
Contexts.DRepCredential (..),
Contexts.DRep,
pattern Contexts.DRep,
pattern Contexts.DRepAlwaysAbstain,
pattern Contexts.DRepAlwaysNoConfidence,
Contexts.Delegatee,
pattern Contexts.DelegStake,
pattern Contexts.DelegVote,
pattern Contexts.DelegStakeVote,
Contexts.TxCert,
pattern Contexts.TxCertRegStaking,
pattern Contexts.TxCertUnRegStaking,
pattern Contexts.TxCertDelegStaking,
pattern Contexts.TxCertRegDeleg,
pattern Contexts.TxCertRegDRep,
pattern Contexts.TxCertUpdateDRep,
pattern Contexts.TxCertUnRegDRep,
pattern Contexts.TxCertPoolRegister,
pattern Contexts.TxCertPoolRetire,
pattern Contexts.TxCertAuthHotCommittee,
pattern Contexts.TxCertResignColdCommittee,
Contexts.Voter,
pattern Contexts.CommitteeVoter,
pattern Contexts.DRepVoter,
pattern Contexts.StakePoolVoter,
Contexts.Vote,
pattern Contexts.VoteNo,
pattern Contexts.VoteYes,
pattern Contexts.Abstain,
Contexts.GovernanceActionId,
Contexts.gaidTxId,
Contexts.gaidGovActionIx,
Contexts.Committee,
pattern Contexts.Committee,
Contexts.committeeMembers,
Contexts.committeeQuorum,
Contexts.Constitution (..),
Contexts.ProtocolVersion,
pattern Contexts.ProtocolVersion,
Contexts.pvMajor,
Contexts.pvMinor,
Contexts.GovernanceAction,
pattern Contexts.ParameterChange,
pattern Contexts.HardForkInitiation,
pattern Contexts.TreasuryWithdrawals,
pattern Contexts.NoConfidence,
pattern Contexts.UpdateCommittee,
pattern Contexts.NewConstitution,
pattern Contexts.InfoAction,
Contexts.ChangedParameters (..),
Contexts.ProposalProcedure,
pattern Contexts.ProposalProcedure,
Contexts.ppDeposit,
Contexts.ppReturnAddr,
Contexts.ppGovernanceAction,
Common.MajorProtocolVersion (..),
Common.VerboseMode (..),
Common.LogOutput,
Common.ExBudget (..),
V2.ExCPU (..),
V2.ExMemory (..),
V2.SatInt (V2.unSatInt),
V2.fromSatInt,
EvaluationContext.EvaluationContext,
EvaluationContext.mkEvaluationContext,
ParamName.ParamName (..),
EvaluationContext.CostModelApplyError (..),
EvaluationContext.CostModelParams,
EvaluationContext.assertWellFormedCostModelParams,
Contexts.ScriptContext,
pattern Contexts.ScriptContext,
Contexts.ScriptPurpose,
pattern Contexts.Minting,
pattern Contexts.Spending,
pattern Contexts.Rewarding,
pattern Contexts.Certifying,
pattern Contexts.Voting,
pattern Contexts.Proposing,
Contexts.ScriptInfo,
pattern Contexts.MintingScript,
pattern Contexts.SpendingScript,
pattern Contexts.RewardingScript,
pattern Contexts.CertifyingScript,
pattern Contexts.VotingScript,
pattern Contexts.ProposingScript,
Common.BuiltinByteString,
Common.toBuiltin,
Common.fromBuiltin,
Common.toOpaque,
Common.fromOpaque,
V2.LedgerBytes (..),
V2.fromBytes,
V2.StakingCredential,
pattern V2.StakingHash,
pattern V2.StakingPtr,
V2.Credential,
pattern V2.PubKeyCredential,
pattern V2.ScriptCredential,
V2.Value (..),
V2.CurrencySymbol (..),
V2.TokenName (..),
V2.singleton,
V2.unionWith,
V2.adaSymbol,
V2.adaToken,
V2.Lovelace (..),
V2.POSIXTime (..),
V2.POSIXTimeRange,
V2.Address,
pattern V2.Address,
V2.addressCredential,
V2.addressStakingCredential,
V2.PubKeyHash (..),
Tx.TxId (..),
Contexts.TxInfo,
pattern Contexts.TxInfo,
Contexts.txInfoInputs,
Contexts.txInfoReferenceInputs,
Contexts.txInfoOutputs,
Contexts.txInfoFee,
Contexts.txInfoMint,
Contexts.txInfoTxCerts,
Contexts.txInfoWdrl,
Contexts.txInfoValidRange,
Contexts.txInfoSignatories,
Contexts.txInfoRedeemers,
Contexts.txInfoData,
Contexts.txInfoId,
Contexts.txInfoVotes,
Contexts.txInfoProposalProcedures,
Contexts.txInfoCurrentTreasuryAmount,
Contexts.txInfoTreasuryDonation,
V2.TxOut,
pattern V2.TxOut,
V2.txOutAddress,
V2.txOutValue,
V2.txOutDatum,
V2.txOutReferenceScript,
Tx.TxOutRef,
pattern Tx.TxOutRef,
Tx.txOutRefId,
Tx.txOutRefIdx,
Contexts.TxInInfo,
pattern Contexts.TxInInfo,
Contexts.txInInfoOutRef,
Contexts.txInInfoResolved,
V2.OutputDatum,
pattern V2.NoOutputDatum,
pattern V2.OutputDatum,
pattern V2.OutputDatumHash,
V2.Interval,
pattern V2.Interval,
V2.ivFrom,
V2.ivTo,
V2.Extended,
pattern V2.NegInf,
pattern V2.PosInf,
pattern V2.Finite,
V2.Closure,
V2.UpperBound,
pattern V2.UpperBound,
V2.LowerBound,
pattern V2.LowerBound,
V2.always,
V2.from,
V2.to,
V2.lowerBound,
V2.upperBound,
V2.strictLowerBound,
V2.strictUpperBound,
Ratio.Rational,
Ratio.ratio,
Ratio.fromGHC,
Ratio.toGHC,
V2.Map,
V2.unsafeFromList,
V2.ScriptHash (..),
V2.Redeemer (..),
V2.RedeemerHash (..),
V2.Datum (..),
V2.DatumHash (..),
V2.Data (..),
V2.BuiltinData (..),
V2.ToData (..),
V2.FromData (..),
V2.UnsafeFromData (..),
V2.toData,
V2.fromData,
V2.unsafeFromData,
V2.dataToBuiltinData,
V2.builtinDataToData,
Common.MonadError,
V2.EvaluationError (..),
V2.ScriptDecodeError (..),
) where
import PlutusLedgerApi.Common qualified as Common
import PlutusLedgerApi.Data.V2 qualified as V2
import PlutusLedgerApi.V3.Data.Contexts qualified as Contexts
import PlutusLedgerApi.V3.Data.Tx qualified as Tx
import PlutusLedgerApi.V3.EvaluationContext qualified as EvaluationContext
import PlutusLedgerApi.V3.ParamName qualified as ParamName
import PlutusTx.Ratio qualified as Ratio
thisLedgerLanguage :: Common.PlutusLedgerLanguage
thisLedgerLanguage :: PlutusLedgerLanguage
thisLedgerLanguage = PlutusLedgerLanguage
Common.PlutusV3
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
-> EvaluationContext.EvaluationContext
-> Common.ScriptForEvaluation
-> Common.Data
-> (Common.LogOutput, Either Common.EvaluationError Common.ExBudget)
evaluateScriptCounting :: MajorProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ScriptForEvaluation
-> Data
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptCounting MajorProtocolVersion
mpv VerboseMode
verbose EvaluationContext
ec ScriptForEvaluation
s Data
arg =
PlutusLedgerLanguage
-> MajorProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ScriptForEvaluation
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
Common.evaluateScriptCounting PlutusLedgerLanguage
thisLedgerLanguage MajorProtocolVersion
mpv VerboseMode
verbose EvaluationContext
ec ScriptForEvaluation
s [Data
arg]
evaluateScriptRestricting
:: Common.MajorProtocolVersion
-> Common.VerboseMode
-> EvaluationContext.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 MajorProtocolVersion
mpv VerboseMode
verbose EvaluationContext
ec ExBudget
budget ScriptForEvaluation
s Data
arg =
PlutusLedgerLanguage
-> MajorProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> ScriptForEvaluation
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
Common.evaluateScriptRestricting PlutusLedgerLanguage
thisLedgerLanguage MajorProtocolVersion
mpv VerboseMode
verbose EvaluationContext
ec ExBudget
budget ScriptForEvaluation
s [Data
arg]