| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
PlutusLedgerApi.Common
Description
The types and functions that are common among all ledger Plutus versions.
Synopsis
- type SerialisedScript = ShortByteString
- data ScriptForEvaluation
- serialisedScript :: ScriptForEvaluation -> SerialisedScript
- deserialisedScript :: ScriptForEvaluation -> ScriptNamedDeBruijn
- serialiseCompiledCode :: CompiledCode a -> SerialisedScript
- serialiseUPLC :: Program DeBruijn DefaultUni DefaultFun () -> SerialisedScript
- deserialiseScript :: MonadError ScriptDecodeError m => PlutusLedgerLanguage -> MajorProtocolVersion -> SerialisedScript -> m ScriptForEvaluation
- uncheckedDeserialiseUPLC :: SerialisedScript -> Program DeBruijn DefaultUni DefaultFun ()
- data ScriptDecodeError
- = CBORDeserialiseError !DeserialiseFailureInfo
- | RemainderError !ByteString
- | LedgerLanguageNotAvailableError { }
- | PlutusCoreLanguageNotAvailableError { }
- newtype ScriptNamedDeBruijn = ScriptNamedDeBruijn (Program NamedDeBruijn DefaultUni DefaultFun ())
- evaluateScriptCounting :: PlutusLedgerLanguage -> MajorProtocolVersion -> VerboseMode -> EvaluationContext -> ScriptForEvaluation -> [Data] -> (LogOutput, Either EvaluationError ExBudget)
- evaluateScriptRestricting :: PlutusLedgerLanguage -> MajorProtocolVersion -> VerboseMode -> EvaluationContext -> ExBudget -> ScriptForEvaluation -> [Data] -> (LogOutput, Either EvaluationError ExBudget)
- evaluateTerm :: ExBudgetMode cost DefaultUni DefaultFun -> MajorProtocolVersion -> VerboseMode -> EvaluationContext -> Term NamedDeBruijn DefaultUni DefaultFun () -> CekReport cost NamedDeBruijn DefaultUni DefaultFun
- data VerboseMode
- type LogOutput = [Text]
- data EvaluationError
- = CekError !(CekEvaluationException NamedDeBruijn DefaultUni DefaultFun)
- | DeBruijnError !FreeVariableError
- | CodecError !ScriptDecodeError
- | CostModelParameterMismatch
- | InvalidReturnValue
- newtype MajorProtocolVersion = MajorProtocolVersion {}
- data PlutusLedgerLanguage
- data Version = Version {}
- builtinsIntroducedIn :: PlutusLedgerLanguage -> Map MajorProtocolVersion (Set DefaultFun)
- builtinsAvailableIn :: PlutusLedgerLanguage -> MajorProtocolVersion -> Set DefaultFun
- ledgerLanguageIntroducedIn :: PlutusLedgerLanguage -> MajorProtocolVersion
- ledgerLanguagesAvailableIn :: MajorProtocolVersion -> Set PlutusLedgerLanguage
- shelleyPV :: MajorProtocolVersion
- allegraPV :: MajorProtocolVersion
- maryPV :: MajorProtocolVersion
- alonzoPV :: MajorProtocolVersion
- vasilPV :: MajorProtocolVersion
- valentinePV :: MajorProtocolVersion
- changPV :: MajorProtocolVersion
- plominPV :: MajorProtocolVersion
- vanRossemPV :: MajorProtocolVersion
- knownPVs :: [MajorProtocolVersion]
- data ExBudget = ExBudget {}
- newtype ExCPU = ExCPU CostingInteger
- newtype ExMemory = ExMemory CostingInteger
- data SatInt
- fromSatInt :: Num a => SatInt -> a
- type CostModelParams = Map Text Int64
- toCostModelParams :: IsParamName p => [(p, Int64)] -> CostModelParams
- assertWellFormedCostModelParams :: MonadError CostModelApplyError m => CostModelParams -> m ()
- class (Enum a, Bounded a) => IsParamName a where
- showParamName :: a -> Text
- readParamName :: Text -> Maybe a
- data GenericParamName a
- data CostModelApplyError
- data CostModelApplyWarn
- = CMTooManyParamsWarn {
- cmExpected :: !Int
- cmActual :: !Int
- | CMTooFewParamsWarn {
- cmExpected :: !Int
- cmActual :: !Int
- = CMTooManyParamsWarn {
- data EvaluationContext = EvaluationContext {
- _evalCtxLedgerLang :: PlutusLedgerLanguage
- _evalCtxCaserBuiltin :: MajorProtocolVersion -> CaserBuiltin DefaultUni
- _evalCtxToSemVar :: MajorProtocolVersion -> BuiltinSemanticsVariant DefaultFun
- _evalCtxMachParsCache :: [(BuiltinSemanticsVariant DefaultFun, DefaultMachineVariantParameters)]
- mkDynEvaluationContext :: MonadError CostModelApplyError m => PlutusLedgerLanguage -> (MajorProtocolVersion -> CaserBuiltin DefaultUni) -> [BuiltinSemanticsVariant DefaultFun] -> (MajorProtocolVersion -> BuiltinSemanticsVariant DefaultFun) -> CostModelParams -> m EvaluationContext
- toMachineParameters :: MajorProtocolVersion -> EvaluationContext -> DefaultMachineParameters
- mkTermToEvaluate :: MonadError EvaluationError m => PlutusLedgerLanguage -> MajorProtocolVersion -> ScriptForEvaluation -> [Data] -> m (Term NamedDeBruijn DefaultUni DefaultFun ())
- data BuiltinByteString
- toBuiltin :: HasToBuiltin a => a -> ToBuiltin a
- fromBuiltin :: HasFromBuiltin arep => arep -> FromBuiltin arep
- toOpaque :: HasToOpaque a arep => a -> arep
- fromOpaque :: HasFromOpaque arep a => arep -> a
- data Data
- data BuiltinData = BuiltinData ~Data
- class ToData a where
- toBuiltinData :: a -> BuiltinData
- class FromData a where
- fromBuiltinData :: BuiltinData -> Maybe a
- class UnsafeFromData a where
- unsafeFromBuiltinData :: BuiltinData -> a
- toData :: ToData a => a -> Data
- fromData :: FromData a => Data -> Maybe a
- unsafeFromData :: UnsafeFromData a => Data -> a
- dataToBuiltinData :: Data -> BuiltinData
- builtinDataToData :: BuiltinData -> Data
- class Monad m => MonadError e (m :: Type -> Type) | m -> e
Script (de)serialization
type SerialisedScript = ShortByteString Source #
Scripts to the ledger are serialised bytestrings.
data ScriptForEvaluation Source #
A Plutus script ready to be evaluated on-chain, via evaluateScriptRestricting.
Instances
serialisedScript :: ScriptForEvaluation -> SerialisedScript Source #
Get a SerialisedScript from a ScriptForEvaluation. O(1).
deserialisedScript :: ScriptForEvaluation -> ScriptNamedDeBruijn Source #
Get a ScriptNamedDeBruijn from a ScriptForEvaluation. O(1).
serialiseCompiledCode :: CompiledCode a -> SerialisedScript Source #
Turns a program which was compiled using the 'PlutusTx' toolchain into a binary format that is understood by the network and can be stored on-chain.
serialiseUPLC :: Program DeBruijn DefaultUni DefaultFun () -> SerialisedScript Source #
Turns a program's AST (most likely manually constructed) into a binary format that is understood by the network and can be stored on-chain.
Arguments
| :: MonadError ScriptDecodeError m | |
| => PlutusLedgerLanguage | the Plutus ledger language of the script. |
| -> MajorProtocolVersion | which major protocol version the script was submitted in. |
| -> SerialisedScript | the script to deserialise. |
| -> m ScriptForEvaluation |
The deserialization from a serialised script into a ScriptForEvaluation,
ready to be evaluated on-chain.
Called inside phase-1 validation (i.e., deserialisation error is a phase-1 error).
uncheckedDeserialiseUPLC :: SerialisedScript -> Program DeBruijn DefaultUni DefaultFun () Source #
Deserialises a SerialisedScript back into an AST. Does *not* do
ledger-language-version-specific checks like for allowable builtins.
data ScriptDecodeError Source #
An error that occurred during script deserialization.
Constructors
| CBORDeserialiseError !DeserialiseFailureInfo | an error from the underlying CBOR/serialise library |
| RemainderError !ByteString | Script was successfully parsed, but more (runaway) bytes encountered after script's position |
| LedgerLanguageNotAvailableError | the plutus version of the given script is not enabled yet |
Fields
| |
| PlutusCoreLanguageNotAvailableError | |
Fields
| |
Instances
| Exception ScriptDecodeError Source # | |
Defined in PlutusLedgerApi.Common.SerialisedScript Methods toException :: ScriptDecodeError -> SomeException Source # fromException :: SomeException -> Maybe ScriptDecodeError Source # | |
| Show ScriptDecodeError Source # | |
Defined in PlutusLedgerApi.Common.SerialisedScript | |
| Eq ScriptDecodeError Source # | |
Defined in PlutusLedgerApi.Common.SerialisedScript Methods (==) :: ScriptDecodeError -> ScriptDecodeError -> Bool Source # (/=) :: ScriptDecodeError -> ScriptDecodeError -> Bool Source # | |
| AsScriptDecodeError ScriptDecodeError Source # | |
Defined in PlutusLedgerApi.Common.SerialisedScript Methods _ScriptDecodeError :: Prism' ScriptDecodeError ScriptDecodeError Source # _CBORDeserialiseError :: Prism' ScriptDecodeError DeserialiseFailureInfo Source # _RemainderError :: Prism' ScriptDecodeError ByteString Source # _LedgerLanguageNotAvailableError :: Prism' ScriptDecodeError (PlutusLedgerLanguage, MajorProtocolVersion, MajorProtocolVersion) Source # _PlutusCoreLanguageNotAvailableError :: Prism' ScriptDecodeError (Version, PlutusLedgerLanguage, MajorProtocolVersion) Source # | |
| Pretty ScriptDecodeError Source # | |
Defined in PlutusLedgerApi.Common.SerialisedScript | |
newtype ScriptNamedDeBruijn Source #
A script with named de-bruijn indices.
Constructors
| ScriptNamedDeBruijn (Program NamedDeBruijn DefaultUni DefaultFun ()) |
Instances
| Generic ScriptNamedDeBruijn Source # | |||||
Defined in PlutusLedgerApi.Common.SerialisedScript Associated Types
Methods from :: ScriptNamedDeBruijn -> Rep ScriptNamedDeBruijn x Source # to :: Rep ScriptNamedDeBruijn x -> ScriptNamedDeBruijn Source # | |||||
| Show ScriptNamedDeBruijn Source # | |||||
Defined in PlutusLedgerApi.Common.SerialisedScript | |||||
| NFData ScriptNamedDeBruijn Source # | |||||
Defined in PlutusLedgerApi.Common.SerialisedScript Methods rnf :: ScriptNamedDeBruijn -> () Source # | |||||
| Eq ScriptNamedDeBruijn Source # | |||||
Defined in PlutusLedgerApi.Common.SerialisedScript Methods (==) :: ScriptNamedDeBruijn -> ScriptNamedDeBruijn -> Bool Source # (/=) :: ScriptNamedDeBruijn -> ScriptNamedDeBruijn -> Bool Source # | |||||
| type Rep ScriptNamedDeBruijn Source # | |||||
Defined in PlutusLedgerApi.Common.SerialisedScript type Rep ScriptNamedDeBruijn = D1 ('MetaData "ScriptNamedDeBruijn" "PlutusLedgerApi.Common.SerialisedScript" "plutus-ledger-api-1.60.0.0-G1HmqwHNllaA7AnJNjAfhP" 'True) (C1 ('MetaCons "ScriptNamedDeBruijn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Program NamedDeBruijn DefaultUni DefaultFun ())))) | |||||
Script evaluation
evaluateScriptCounting Source #
Arguments
| :: PlutusLedgerLanguage | The Plutus ledger language of the script under execution. |
| -> MajorProtocolVersion | Which major protocol version to run the operation in |
| -> VerboseMode | Whether to produce log output |
| -> EvaluationContext | Includes the cost model to use for tallying up the execution costs |
| -> ScriptForEvaluation | The script to evaluate |
| -> [Data] | The arguments to the script |
| -> (LogOutput, Either EvaluationError ExBudget) |
Evaluates a script, returning the minimum budget that the script would need
to evaluate successfully. This will take as long as the script takes, if you need to
limit the execution time of the script also, you can use evaluateScriptRestricting, which
also returns the used budget.
Note: Parameterized over the ledger-plutus-version since the builtins allowed (during decoding) differs.
evaluateScriptRestricting Source #
Arguments
| :: PlutusLedgerLanguage | The Plutus ledger language of the script under execution. |
| -> MajorProtocolVersion | Which major protocol version to run the operation in |
| -> VerboseMode | Whether to produce log output |
| -> EvaluationContext | Includes the cost model to use for tallying up the execution costs |
| -> ExBudget | The resource budget which must not be exceeded during evaluation |
| -> ScriptForEvaluation | The script to evaluate |
| -> [Data] | The arguments to the script |
| -> (LogOutput, Either EvaluationError ExBudget) |
Evaluates a script, with a cost model and a budget that restricts how many resources it can use according to the cost model. Also returns the budget that was actually used.
Can be used to calculate budgets for scripts, but even in this case you must give a limit to guard against scripts that run for a long time or loop.
Note: Parameterized over the LedgerPlutusVersion since
1. The builtins allowed (during decoding) differ, and
2. The Plutus language versions allowed differ.
evaluateTerm :: ExBudgetMode cost DefaultUni DefaultFun -> MajorProtocolVersion -> VerboseMode -> EvaluationContext -> Term NamedDeBruijn DefaultUni DefaultFun () -> CekReport cost NamedDeBruijn DefaultUni DefaultFun Source #
Evaluate a fully-applied term using the CEK machine. Useful for mimicking the behaviour of the on-chain evaluator.
data VerboseMode Source #
A simple toggle indicating whether or not we should accumulate logs during script execution.
Instances
| Eq VerboseMode Source # | |
Defined in PlutusLedgerApi.Common.Eval Methods (==) :: VerboseMode -> VerboseMode -> Bool Source # (/=) :: VerboseMode -> VerboseMode -> Bool Source # | |
type LogOutput = [Text] Source #
The type of the executed script's accumulated log output: a list of Text.
It will be an empty list if the VerboseMode is set to Quiet.
data EvaluationError Source #
Errors that can be thrown when evaluating a Plutus script.
Constructors
| CekError !(CekEvaluationException NamedDeBruijn DefaultUni DefaultFun) | An error from the evaluator itself |
| DeBruijnError !FreeVariableError | An error in the pre-evaluation step of converting from de-Bruijn indices |
| CodecError !ScriptDecodeError | A deserialisation error TODO: make this error more informative when we have more information about what went wrong |
| CostModelParameterMismatch | An error indicating that the cost model parameters didn't match what we expected |
| InvalidReturnValue | The script evaluated to a value that is not a valid return value. |
Instances
| Show EvaluationError Source # | |
Defined in PlutusLedgerApi.Common.Eval | |
| Eq EvaluationError Source # | |
Defined in PlutusLedgerApi.Common.Eval Methods (==) :: EvaluationError -> EvaluationError -> Bool Source # (/=) :: EvaluationError -> EvaluationError -> Bool Source # | |
| AsScriptDecodeError EvaluationError Source # | |
Defined in PlutusLedgerApi.Common.Eval Methods _ScriptDecodeError :: Prism' EvaluationError ScriptDecodeError Source # _CBORDeserialiseError :: Prism' EvaluationError DeserialiseFailureInfo Source # _RemainderError :: Prism' EvaluationError ByteString Source # _LedgerLanguageNotAvailableError :: Prism' EvaluationError (PlutusLedgerLanguage, MajorProtocolVersion, MajorProtocolVersion) Source # _PlutusCoreLanguageNotAvailableError :: Prism' EvaluationError (Version, PlutusLedgerLanguage, MajorProtocolVersion) Source # | |
| Pretty EvaluationError Source # | |
Defined in PlutusLedgerApi.Common.Eval | |
Network's versioning
The network's behaviour (and plutus's by extension) can change via hard forks, which directly correspond to major-number protocol version bumps.
newtype MajorProtocolVersion Source #
This represents the major component of the Cardano protocol version. The ledger can only supply the major component of the protocol version, not the minor component, and Plutus should only need to care about the major component anyway. This relies on careful understanding between us and the ledger as to what this means.
Constructors
| MajorProtocolVersion | |
Fields | |
Instances
| Enum MajorProtocolVersion Source # | |||||
Defined in PlutusLedgerApi.Common.ProtocolVersions Methods succ :: MajorProtocolVersion -> MajorProtocolVersion Source # pred :: MajorProtocolVersion -> MajorProtocolVersion Source # toEnum :: Int -> MajorProtocolVersion Source # fromEnum :: MajorProtocolVersion -> Int Source # enumFrom :: MajorProtocolVersion -> [MajorProtocolVersion] Source # enumFromThen :: MajorProtocolVersion -> MajorProtocolVersion -> [MajorProtocolVersion] Source # enumFromTo :: MajorProtocolVersion -> MajorProtocolVersion -> [MajorProtocolVersion] Source # enumFromThenTo :: MajorProtocolVersion -> MajorProtocolVersion -> MajorProtocolVersion -> [MajorProtocolVersion] Source # | |||||
| Generic MajorProtocolVersion Source # | |||||
Defined in PlutusLedgerApi.Common.ProtocolVersions Associated Types
Methods from :: MajorProtocolVersion -> Rep MajorProtocolVersion x Source # to :: Rep MajorProtocolVersion x -> MajorProtocolVersion Source # | |||||
| Show MajorProtocolVersion Source # | |||||
Defined in PlutusLedgerApi.Common.ProtocolVersions | |||||
| Eq MajorProtocolVersion Source # | |||||
Defined in PlutusLedgerApi.Common.ProtocolVersions Methods (==) :: MajorProtocolVersion -> MajorProtocolVersion -> Bool Source # (/=) :: MajorProtocolVersion -> MajorProtocolVersion -> Bool Source # | |||||
| Ord MajorProtocolVersion Source # | |||||
Defined in PlutusLedgerApi.Common.ProtocolVersions Methods compare :: MajorProtocolVersion -> MajorProtocolVersion -> Ordering Source # (<) :: MajorProtocolVersion -> MajorProtocolVersion -> Bool Source # (<=) :: MajorProtocolVersion -> MajorProtocolVersion -> Bool Source # (>) :: MajorProtocolVersion -> MajorProtocolVersion -> Bool Source # (>=) :: MajorProtocolVersion -> MajorProtocolVersion -> Bool Source # max :: MajorProtocolVersion -> MajorProtocolVersion -> MajorProtocolVersion Source # min :: MajorProtocolVersion -> MajorProtocolVersion -> MajorProtocolVersion Source # | |||||
| Pretty MajorProtocolVersion Source # | |||||
Defined in PlutusLedgerApi.Common.ProtocolVersions | |||||
| Serialise MajorProtocolVersion Source # | |||||
Defined in PlutusLedgerApi.Common.ProtocolVersions Methods encode :: MajorProtocolVersion -> Encoding decode :: Decoder s MajorProtocolVersion encodeList :: [MajorProtocolVersion] -> Encoding decodeList :: Decoder s [MajorProtocolVersion] | |||||
| type Rep MajorProtocolVersion Source # | |||||
Defined in PlutusLedgerApi.Common.ProtocolVersions type Rep MajorProtocolVersion = D1 ('MetaData "MajorProtocolVersion" "PlutusLedgerApi.Common.ProtocolVersions" "plutus-ledger-api-1.60.0.0-G1HmqwHNllaA7AnJNjAfhP" 'True) (C1 ('MetaCons "MajorProtocolVersion" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMajorProtocolVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) | |||||
data PlutusLedgerLanguage Source #
The Plutus ledger language. These are entirely different script languages from the ledger's perspective, which on our side are interpreted in very similar ways.
It is a simple enumerated datatype (there is no major and minor components as in protocol version) and the ordering of constructors is essential for deriving Enum,Ord,Bounded.
IMPORTANT: this is different from the Plutus Core language version, Version
Constructors
| PlutusV1 | introduced in Alonzo HF |
| PlutusV2 | introduced in Vasil HF |
| PlutusV3 | introduced in Chang HF |
Instances
| Bounded PlutusLedgerLanguage Source # | |||||
Defined in PlutusLedgerApi.Common.Versions | |||||
| Enum PlutusLedgerLanguage Source # | |||||
Defined in PlutusLedgerApi.Common.Versions Methods succ :: PlutusLedgerLanguage -> PlutusLedgerLanguage Source # pred :: PlutusLedgerLanguage -> PlutusLedgerLanguage Source # toEnum :: Int -> PlutusLedgerLanguage Source # fromEnum :: PlutusLedgerLanguage -> Int Source # enumFrom :: PlutusLedgerLanguage -> [PlutusLedgerLanguage] Source # enumFromThen :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> [PlutusLedgerLanguage] Source # enumFromTo :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> [PlutusLedgerLanguage] Source # enumFromThenTo :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> PlutusLedgerLanguage -> [PlutusLedgerLanguage] Source # | |||||
| Generic PlutusLedgerLanguage Source # | |||||
Defined in PlutusLedgerApi.Common.Versions Associated Types
Methods from :: PlutusLedgerLanguage -> Rep PlutusLedgerLanguage x Source # to :: Rep PlutusLedgerLanguage x -> PlutusLedgerLanguage Source # | |||||
| Show PlutusLedgerLanguage Source # | |||||
Defined in PlutusLedgerApi.Common.Versions | |||||
| NFData PlutusLedgerLanguage Source # | |||||
Defined in PlutusLedgerApi.Common.Versions Methods rnf :: PlutusLedgerLanguage -> () Source # | |||||
| Eq PlutusLedgerLanguage Source # | |||||
Defined in PlutusLedgerApi.Common.Versions Methods (==) :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> Bool Source # (/=) :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> Bool Source # | |||||
| Ord PlutusLedgerLanguage Source # | |||||
Defined in PlutusLedgerApi.Common.Versions Methods compare :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> Ordering Source # (<) :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> Bool Source # (<=) :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> Bool Source # (>) :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> Bool Source # (>=) :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> Bool Source # max :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> PlutusLedgerLanguage Source # min :: PlutusLedgerLanguage -> PlutusLedgerLanguage -> PlutusLedgerLanguage Source # | |||||
| NoThunks PlutusLedgerLanguage Source # | |||||
Defined in PlutusLedgerApi.Common.Versions Methods noThunks :: Context -> PlutusLedgerLanguage -> IO (Maybe ThunkInfo) wNoThunks :: Context -> PlutusLedgerLanguage -> IO (Maybe ThunkInfo) | |||||
| Pretty PlutusLedgerLanguage Source # | |||||
Defined in PlutusLedgerApi.Common.Versions | |||||
| Serialise PlutusLedgerLanguage Source # | |||||
Defined in PlutusLedgerApi.Common.Versions Methods encode :: PlutusLedgerLanguage -> Encoding decode :: Decoder s PlutusLedgerLanguage encodeList :: [PlutusLedgerLanguage] -> Encoding decodeList :: Decoder s [PlutusLedgerLanguage] | |||||
| type Rep PlutusLedgerLanguage Source # | |||||
Defined in PlutusLedgerApi.Common.Versions type Rep PlutusLedgerLanguage = D1 ('MetaData "PlutusLedgerLanguage" "PlutusLedgerApi.Common.Versions" "plutus-ledger-api-1.60.0.0-G1HmqwHNllaA7AnJNjAfhP" 'False) (C1 ('MetaCons "PlutusV1" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PlutusV2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PlutusV3" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
Constructors
| Version | |
Fields | |
Instances
| Generic Version | |||||
Defined in PlutusCore.Version Associated Types
| |||||
| Show Version | |||||
| NFData Version | |||||
Defined in PlutusCore.Version | |||||
| Eq Version | |||||
| Ord Version | |||||
Defined in PlutusCore.Version | |||||
| Hashable Version | |||||
Defined in PlutusCore.Version | |||||
| Pretty Version | |||||
Defined in PlutusCore.Version | |||||
| type Rep Version | |||||
Defined in PlutusCore.Version type Rep Version = D1 ('MetaData "Version" "PlutusCore.Version" "plutus-core-1.60.0.0-LXFqBsoUlXsJIEqLytHte7" 'False) (C1 ('MetaCons "Version" 'PrefixI 'True) (S1 ('MetaSel ('Just "_versionMajor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: (S1 ('MetaSel ('Just "_versionMinor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "_versionPatch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)))) | |||||
builtinsIntroducedIn :: PlutusLedgerLanguage -> Map MajorProtocolVersion (Set DefaultFun) Source #
Given a ledger language, return a map indicating which builtin functions were
introduced in which MajorProtocolVersion. This must be updated when new
builtins are added. It is not necessary to add entries for protocol versions
where no new builtins are added. See Note [New builtins/language versions and
protocol versions]
builtinsAvailableIn :: PlutusLedgerLanguage -> MajorProtocolVersion -> Set DefaultFun Source #
Return a set containing the builtins which are available in a given LL in a
given PV. All builtins are available in all LLs from vanRossemPV onwards.
ledgerLanguageIntroducedIn :: PlutusLedgerLanguage -> MajorProtocolVersion Source #
Query the protocol version that a specific Plutus ledger language was first introduced in.
ledgerLanguagesAvailableIn :: MajorProtocolVersion -> Set PlutusLedgerLanguage Source #
Which Plutus language versions are available in the given
MajorProtocolVersion? See Note [New builtins/language versions and protocol
versions]. This function (and others in this module) assumes that once a LL is
available it remains available in all later PVs and that if m <= n, PlutusVm is
introduced no later than PlutusVn.
Protocol Versions
shelleyPV :: MajorProtocolVersion Source #
Shelley era was introduced in protocol version 2.0
allegraPV :: MajorProtocolVersion Source #
Allegra era was introduced in protocol version 3.0
maryPV :: MajorProtocolVersion Source #
Mary era was introduced in protocol version 4.0
alonzoPV :: MajorProtocolVersion Source #
Alonzo era was introduced in protocol version 5.0
vasilPV :: MajorProtocolVersion Source #
The Vasil HF introduced the Babbage era and Plutus V2
valentinePV :: MajorProtocolVersion Source #
Valentine was an intra-era HF where builtin functions VerifyEcdsaSecp256k1Signature and
VerifySchnorrSecp256k1Signature were enabled.
changPV :: MajorProtocolVersion Source #
The Chang HF introduced the Conway era and Plutus V3
plominPV :: MajorProtocolVersion Source #
The Plomin HF was an intra-era HF where some new builtin functions were introduced in Plutus V2 and V3.
vanRossemPV :: MajorProtocolVersion Source #
The van Rossem HF will be an intra-era HF.
knownPVs :: [MajorProtocolVersion] Source #
The set of protocol versions that are "known", i.e. that have been released and have actual differences associated with them. This is currently only used for testing, so efficiency is not parmount and a list is fine.
Costing-related types
Constructors
| ExBudget | |
Fields | |
Instances
| FromJSON ExBudget | |||||
Defined in PlutusCore.Evaluation.Machine.ExBudget | |||||
| ToJSON ExBudget | |||||
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods toEncoding :: ExBudget -> Encoding toJSONList :: [ExBudget] -> Value toEncodingList :: [ExBudget] -> Encoding | |||||
| Monoid ExBudget | |||||
| Semigroup ExBudget | |||||
| Generic ExBudget | |||||
Defined in PlutusCore.Evaluation.Machine.ExBudget Associated Types
| |||||
| Show ExBudget | |||||
| NFData ExBudget | |||||
Defined in PlutusCore.Evaluation.Machine.ExBudget | |||||
| Eq ExBudget | |||||
| NoThunks ExBudget | |||||
| Pretty ExBudget | |||||
Defined in PlutusCore.Evaluation.Machine.ExBudget | |||||
| Serialise ExBudget | |||||
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods encode :: ExBudget -> Encoding encodeList :: [ExBudget] -> Encoding decodeList :: Decoder s [ExBudget] | |||||
| PrettyBy config ExBudget | |||||
Defined in PlutusCore.Evaluation.Machine.ExBudget | |||||
| Lift ExBudget | |||||
| type Rep ExBudget | |||||
Defined in PlutusCore.Evaluation.Machine.ExBudget type Rep ExBudget = D1 ('MetaData "ExBudget" "PlutusCore.Evaluation.Machine.ExBudget" "plutus-core-1.60.0.0-LXFqBsoUlXsJIEqLytHte7" 'False) (C1 ('MetaCons "ExBudget" 'PrefixI 'True) (S1 ('MetaSel ('Just "exBudgetCPU") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 ExCPU) :*: S1 ('MetaSel ('Just "exBudgetMemory") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedUnpack) (Rec0 ExMemory))) | |||||
Constructors
| ExCPU CostingInteger |
Instances
| FromJSON ExCPU | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| ToJSON ExCPU | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory Methods toEncoding :: ExCPU -> Encoding toJSONList :: [ExCPU] -> Value toEncodingList :: [ExCPU] -> Encoding | |||||
| Monoid ExCPU | |||||
| Semigroup ExCPU | |||||
| Bounded ExCPU | |||||
| Generic ExCPU | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory Associated Types
| |||||
| Num ExCPU | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| Read ExCPU | |||||
| Show ExCPU | |||||
| NFData ExCPU | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| Eq ExCPU | |||||
| Ord ExCPU | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| NoThunks ExCPU | |||||
| Pretty ExCPU | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| Serialise ExCPU | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| PrettyBy config ExCPU | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| Lift ExCPU | |||||
| type Rep ExCPU | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
Constructors
| ExMemory CostingInteger |
Instances
| FromJSON ExMemory | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| ToJSON ExMemory | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory Methods toEncoding :: ExMemory -> Encoding toJSONList :: [ExMemory] -> Value toEncodingList :: [ExMemory] -> Encoding | |||||
| Monoid ExMemory | |||||
| Semigroup ExMemory | |||||
| Bounded ExMemory | |||||
| Generic ExMemory | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory Associated Types
| |||||
| Num ExMemory | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory Methods (+) :: ExMemory -> ExMemory -> ExMemory Source # (-) :: ExMemory -> ExMemory -> ExMemory Source # (*) :: ExMemory -> ExMemory -> ExMemory Source # negate :: ExMemory -> ExMemory Source # abs :: ExMemory -> ExMemory Source # signum :: ExMemory -> ExMemory Source # fromInteger :: Integer -> ExMemory Source # | |||||
| Read ExMemory | |||||
| Show ExMemory | |||||
| NFData ExMemory | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| Eq ExMemory | |||||
| Ord ExMemory | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| NoThunks ExMemory | |||||
| Pretty ExMemory | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| Serialise ExMemory | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory Methods encode :: ExMemory -> Encoding encodeList :: [ExMemory] -> Encoding decodeList :: Decoder s [ExMemory] | |||||
| PrettyBy config ExMemory | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory | |||||
| Lift ExMemory | |||||
| type Rep ExMemory | |||||
Defined in PlutusCore.Evaluation.Machine.ExMemory type Rep ExMemory = D1 ('MetaData "ExMemory" "PlutusCore.Evaluation.Machine.ExMemory" "plutus-core-1.60.0.0-LXFqBsoUlXsJIEqLytHte7" 'True) (C1 ('MetaCons "ExMemory" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostingInteger))) | |||||
Instances
| FromJSON SatInt | |||||
Defined in Data.SatInt | |||||
| ToJSON SatInt | |||||
Defined in Data.SatInt Methods toEncoding :: SatInt -> Encoding toJSONList :: [SatInt] -> Value toEncodingList :: [SatInt] -> Encoding | |||||
| Bits SatInt | |||||
Defined in Data.SatInt Methods (.&.) :: SatInt -> SatInt -> SatInt Source # (.|.) :: SatInt -> SatInt -> SatInt Source # xor :: SatInt -> SatInt -> SatInt Source # complement :: SatInt -> SatInt Source # shift :: SatInt -> Int -> SatInt Source # rotate :: SatInt -> Int -> SatInt Source # setBit :: SatInt -> Int -> SatInt Source # clearBit :: SatInt -> Int -> SatInt Source # complementBit :: SatInt -> Int -> SatInt Source # testBit :: SatInt -> Int -> Bool Source # bitSizeMaybe :: SatInt -> Maybe Int Source # bitSize :: SatInt -> Int Source # isSigned :: SatInt -> Bool Source # shiftL :: SatInt -> Int -> SatInt Source # unsafeShiftL :: SatInt -> Int -> SatInt Source # shiftR :: SatInt -> Int -> SatInt Source # unsafeShiftR :: SatInt -> Int -> SatInt Source # rotateL :: SatInt -> Int -> SatInt Source # | |||||
| FiniteBits SatInt | |||||
Defined in Data.SatInt Methods finiteBitSize :: SatInt -> Int Source # countLeadingZeros :: SatInt -> Int Source # countTrailingZeros :: SatInt -> Int Source # | |||||
| Bounded SatInt | |||||
| Generic SatInt | |||||
Defined in Data.SatInt Associated Types
| |||||
| Num SatInt | |||||
| Read SatInt | |||||
| Show SatInt | |||||
| FromField SatInt | |||||
Defined in Data.SatInt Methods parseField :: Field -> Parser SatInt | |||||
| NFData SatInt | |||||
Defined in Data.SatInt | |||||
| Eq SatInt | |||||
| Ord SatInt | |||||
| NoThunks SatInt | |||||
| Prim SatInt | |||||
Defined in Data.SatInt Methods sizeOfType# :: Proxy SatInt -> Int# alignmentOfType# :: Proxy SatInt -> Int# alignment# :: SatInt -> Int# indexByteArray# :: ByteArray# -> Int# -> SatInt readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SatInt #) writeByteArray# :: MutableByteArray# s -> Int# -> SatInt -> State# s -> State# s setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SatInt -> State# s -> State# s indexOffAddr# :: Addr# -> Int# -> SatInt readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SatInt #) writeOffAddr# :: Addr# -> Int# -> SatInt -> State# s -> State# s setOffAddr# :: Addr# -> Int# -> Int# -> SatInt -> State# s -> State# s | |||||
| Serialise SatInt | |||||
Defined in Data.SatInt | |||||
| Lift SatInt | |||||
| type Rep SatInt | |||||
Defined in Data.SatInt | |||||
fromSatInt :: Num a => SatInt -> a #
Network's costing parameters
A less drastic approach (that does not rely on a HF) to affect the network's (and plutus's by extension) behaviour is by tweaking the values of the cost model parameters.
The network does not associate names to cost model parameters; Plutus attaches names to the network's cost model parameters (values) either in a raw textual form or typed by a specific plutus version.
See Note [Cost model parameters]
type CostModelParams = Map Text Int64 #
toCostModelParams :: IsParamName p => [(p, Int64)] -> CostModelParams Source #
Untags the plutus version from the typed cost model parameters and returns their raw textual form (internally used by CostModelInterface).
assertWellFormedCostModelParams :: MonadError CostModelApplyError m => CostModelParams -> m () Source #
class (Enum a, Bounded a) => IsParamName a where Source #
A parameter name for different plutus versions.
Each Plutus version should expose such an enumeration as an ADT and create
an instance of ParamName out of it.
A valid parameter name has to be enumeration, bounded, ordered, and prettyprintable to a "lower-Kebab" string.
Minimal complete definition
Methods
showParamName :: a -> Text Source #
Produce the raw textual form for a given typed-by-plutus-version cost model parameter
Any implementation *must be* an injective function.
The GIsParamName generic implementation guarantees injectivity.
readParamName :: Text -> Maybe a Source #
default implementation that inverts the showParamName operation (not very efficient)
Instances
| IsParamName ParamName Source # | |
Defined in PlutusLedgerApi.V1.ParamName | |
| IsParamName ParamName Source # | |
Defined in PlutusLedgerApi.V2.ParamName | |
| IsParamName ParamName Source # | |
Defined in PlutusLedgerApi.V3.ParamName | |
| (Enum (GenericParamName a), Bounded (GenericParamName a), Generic a, GIsParamName (Rep a)) => IsParamName (GenericParamName a) Source # | |
Defined in PlutusLedgerApi.Common.ParamName Methods showParamName :: GenericParamName a -> Text Source # readParamName :: Text -> Maybe (GenericParamName a) Source # | |
data GenericParamName a Source #
A Generic wrapper for use with deriving via
Instances
| Bounded a => Bounded (GenericParamName a) Source # | |
Defined in PlutusLedgerApi.Common.ParamName | |
| Enum a => Enum (GenericParamName a) Source # | |
Defined in PlutusLedgerApi.Common.ParamName Methods succ :: GenericParamName a -> GenericParamName a Source # pred :: GenericParamName a -> GenericParamName a Source # toEnum :: Int -> GenericParamName a Source # fromEnum :: GenericParamName a -> Int Source # enumFrom :: GenericParamName a -> [GenericParamName a] Source # enumFromThen :: GenericParamName a -> GenericParamName a -> [GenericParamName a] Source # enumFromTo :: GenericParamName a -> GenericParamName a -> [GenericParamName a] Source # enumFromThenTo :: GenericParamName a -> GenericParamName a -> GenericParamName a -> [GenericParamName a] Source # | |
| (Enum (GenericParamName a), Bounded (GenericParamName a), Generic a, GIsParamName (Rep a)) => IsParamName (GenericParamName a) Source # | |
Defined in PlutusLedgerApi.Common.ParamName Methods showParamName :: GenericParamName a -> Text Source # readParamName :: Text -> Maybe (GenericParamName a) Source # | |
data CostModelApplyError #
Constructors
| CMUnknownParamError !Text | |
| CMInternalReadError | |
| CMInternalWriteError !String |
Instances
| Data CostModelApplyError | |||||
Defined in PlutusCore.Evaluation.Machine.CostModelInterface Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CostModelApplyError -> c CostModelApplyError Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CostModelApplyError Source # toConstr :: CostModelApplyError -> Constr Source # dataTypeOf :: CostModelApplyError -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CostModelApplyError) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CostModelApplyError) Source # gmapT :: (forall b. Data b => b -> b) -> CostModelApplyError -> CostModelApplyError Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CostModelApplyError -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CostModelApplyError -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CostModelApplyError -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CostModelApplyError -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CostModelApplyError -> m CostModelApplyError Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CostModelApplyError -> m CostModelApplyError Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CostModelApplyError -> m CostModelApplyError Source # | |||||
| Exception CostModelApplyError | |||||
| Generic CostModelApplyError | |||||
Defined in PlutusCore.Evaluation.Machine.CostModelInterface Associated Types
Methods from :: CostModelApplyError -> Rep CostModelApplyError x Source # to :: Rep CostModelApplyError x -> CostModelApplyError Source # | |||||
| Show CostModelApplyError | |||||
| NFData CostModelApplyError | |||||
Defined in PlutusCore.Evaluation.Machine.CostModelInterface Methods rnf :: CostModelApplyError -> () Source # | |||||
| Eq CostModelApplyError | |||||
Defined in PlutusCore.Evaluation.Machine.CostModelInterface Methods (==) :: CostModelApplyError -> CostModelApplyError -> Bool Source # (/=) :: CostModelApplyError -> CostModelApplyError -> Bool Source # | |||||
| NoThunks CostModelApplyError | |||||
Defined in PlutusCore.Evaluation.Machine.CostModelInterface Methods noThunks :: Context -> CostModelApplyError -> IO (Maybe ThunkInfo) wNoThunks :: Context -> CostModelApplyError -> IO (Maybe ThunkInfo) | |||||
| Pretty CostModelApplyError | |||||
| type Rep CostModelApplyError | |||||
Defined in PlutusCore.Evaluation.Machine.CostModelInterface type Rep CostModelApplyError = D1 ('MetaData "CostModelApplyError" "PlutusCore.Evaluation.Machine.CostModelInterface" "plutus-core-1.60.0.0-LXFqBsoUlXsJIEqLytHte7" 'False) (C1 ('MetaCons "CMUnknownParamError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: (C1 ('MetaCons "CMInternalReadError" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CMInternalWriteError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)))) | |||||
data CostModelApplyWarn #
Constructors
| CMTooManyParamsWarn | |
Fields
| |
| CMTooFewParamsWarn | |
Fields
| |
Instances
| Pretty CostModelApplyWarn | |
Evaluation context
data EvaluationContext Source #
An opaque type that contains all the static parameters that the evaluator needs to evaluate a script. This is so that they can be computed once and cached, rather than being recomputed on every evaluation.
Different protocol versions may require different bundles of machine parameters, which allows us for
example to tweak the shape of the costing function of a builtin, so that the builtin costs less.
Currently this means that we have to create multiple DefaultMachineParameters per language
version, which we put into a cache (represented by an association list) in order to avoid costly
recomputation of machine parameters.
In order to get the appropriate DefaultMachineParameters at validation time we look it up in the
cache using a semantics variant as a key. We compute the semantics variant from the protocol
version using the stored function. Note that the semantics variant depends on the language version
too, but the latter is known statically (because each language version has its own evaluation
context), hence there's no reason to require it to be provided at runtime.
To say it differently, there's a matrix of semantics variants indexed by (LL, PV) pairs and we
cache its particular row corresponding to the statically given LL in an EvaluationContext.
The reason why we associate a DefaultMachineParameters with a semantics variant rather than a
protocol version are
- generally there are far more protocol versions than semantics variants supported by a specific language version, so we save on pointless duplication of bundles of machine parameters
- builtins don't know anything about protocol versions, only semantics variants. It is therefore more semantically precise to associate bundles of machine parameters with semantics variants than with protocol versions
Constructors
| EvaluationContext | |
Fields
| |
Instances
| Generic EvaluationContext Source # | |||||
Defined in PlutusLedgerApi.Common.Eval Associated Types
Methods from :: EvaluationContext -> Rep EvaluationContext x Source # to :: Rep EvaluationContext x -> EvaluationContext Source # | |||||
| NFData EvaluationContext Source # | |||||
Defined in PlutusLedgerApi.Common.Eval Methods rnf :: EvaluationContext -> () Source # | |||||
| NoThunks EvaluationContext Source # | |||||
Defined in PlutusLedgerApi.Common.Eval Methods noThunks :: Context -> EvaluationContext -> IO (Maybe ThunkInfo) wNoThunks :: Context -> EvaluationContext -> IO (Maybe ThunkInfo) | |||||
| type Rep EvaluationContext Source # | |||||
Defined in PlutusLedgerApi.Common.Eval type Rep EvaluationContext = D1 ('MetaData "EvaluationContext" "PlutusLedgerApi.Common.Eval" "plutus-ledger-api-1.60.0.0-G1HmqwHNllaA7AnJNjAfhP" 'False) (C1 ('MetaCons "EvaluationContext" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_evalCtxLedgerLang") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PlutusLedgerLanguage) :*: S1 ('MetaSel ('Just "_evalCtxCaserBuiltin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (MajorProtocolVersion -> CaserBuiltin DefaultUni))) :*: (S1 ('MetaSel ('Just "_evalCtxToSemVar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (MajorProtocolVersion -> BuiltinSemanticsVariant DefaultFun)) :*: S1 ('MetaSel ('Just "_evalCtxMachParsCache") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(BuiltinSemanticsVariant DefaultFun, DefaultMachineVariantParameters)])))) | |||||
mkDynEvaluationContext :: MonadError CostModelApplyError m => PlutusLedgerLanguage -> (MajorProtocolVersion -> CaserBuiltin DefaultUni) -> [BuiltinSemanticsVariant DefaultFun] -> (MajorProtocolVersion -> BuiltinSemanticsVariant DefaultFun) -> CostModelParams -> m EvaluationContext Source #
Create an EvaluationContext given all builtin semantics variants supported by the provided
language version.
The input is a Map of Texts to cost integer values (aka CostModelParams, CostModel)
See Note [Inlining meanings of builtins].
IMPORTANT: the toSemVar argument computes the semantics variant for each MajorProtocolVersion
and it must only return semantics variants from the semVars list, as well as cover ANY
MajorProtocolVersion, including those that do not exist yet (i.e. toSemVar must never fail).
IMPORTANT: The evaluation context of every Plutus version must be recreated upon a protocol update with the updated cost model parameters.
toMachineParameters :: MajorProtocolVersion -> EvaluationContext -> DefaultMachineParameters Source #
Arguments
| :: MonadError EvaluationError m | |
| => PlutusLedgerLanguage | the Plutus ledger language of the script under execution. |
| -> MajorProtocolVersion | which major protocol version to run the operation in |
| -> ScriptForEvaluation | the script to evaluate |
| -> [Data] | the arguments that the script's underlying term will be applied to |
| -> m (Term NamedDeBruijn DefaultUni DefaultFun ()) |
Shared helper for the evaluation functions: evaluateScriptCounting and evaluateScriptRestricting,
Given a ScriptForEvaluation:
1) applies the term to a list of Data arguments (e.g. Datum, Redeemer, ScriptContext)
2) checks that the applied-term is well-scoped
3) returns the applied-term
Supporting types used in the context types
Builtins
data BuiltinByteString #
Instances
| Data BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BuiltinByteString -> c BuiltinByteString Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BuiltinByteString Source # toConstr :: BuiltinByteString -> Constr Source # dataTypeOf :: BuiltinByteString -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BuiltinByteString) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuiltinByteString) Source # gmapT :: (forall b. Data b => b -> b) -> BuiltinByteString -> BuiltinByteString Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinByteString -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinByteString -> r Source # gmapQ :: (forall d. Data d => d -> u) -> BuiltinByteString -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinByteString -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinByteString -> m BuiltinByteString Source # | |||||
| Monoid BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal Methods mempty :: BuiltinByteString Source # mappend :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString Source # mconcat :: [BuiltinByteString] -> BuiltinByteString Source # | |||||
| Semigroup BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal Methods (<>) :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString Source # sconcat :: NonEmpty BuiltinByteString -> BuiltinByteString Source # stimes :: Integral b => b -> BuiltinByteString -> BuiltinByteString Source # | |||||
| Show BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| NFData BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal Methods rnf :: BuiltinByteString -> () Source # | |||||
| Eq BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal Methods (==) :: BuiltinByteString -> BuiltinByteString -> Bool Source # (/=) :: BuiltinByteString -> BuiltinByteString -> Bool Source # | |||||
| Ord BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal Methods compare :: BuiltinByteString -> BuiltinByteString -> Ordering Source # (<) :: BuiltinByteString -> BuiltinByteString -> Bool Source # (<=) :: BuiltinByteString -> BuiltinByteString -> Bool Source # (>) :: BuiltinByteString -> BuiltinByteString -> Bool Source # (>=) :: BuiltinByteString -> BuiltinByteString -> Bool Source # max :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString Source # min :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString Source # | |||||
| Hashable BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| ByteArray BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| ByteArrayAccess BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal Methods length :: BuiltinByteString -> Int withByteArray :: BuiltinByteString -> (Ptr p -> IO a) -> IO a copyByteArrayToPtr :: BuiltinByteString -> Ptr p -> IO () | |||||
| HasBlueprintDefinition BuiltinByteString | |||||
Defined in PlutusTx.Blueprint.Definition.Unroll Associated Types
Methods definitionId :: DefinitionId | |||||
| HasFromBuiltin BuiltinByteString | |||||
Defined in PlutusTx.Builtins.HasBuiltin Associated Types
Methods fromBuiltin :: BuiltinByteString -> FromBuiltin BuiltinByteString # | |||||
| MkNil BuiltinByteString | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods mkNil :: BuiltinList BuiltinByteString | |||||
| Eq BuiltinByteString | |||||
Defined in PlutusTx.Eq.Class Methods (==) :: BuiltinByteString -> BuiltinByteString -> Bool | |||||
| FromData BuiltinByteString | |||||
Defined in PlutusTx.IsData.Class Methods | |||||
| ToData BuiltinByteString | |||||
Defined in PlutusTx.IsData.Class Methods | |||||
| UnsafeFromData BuiltinByteString | |||||
Defined in PlutusTx.IsData.Class Methods | |||||
| Monoid BuiltinByteString | |||||
Defined in PlutusTx.Monoid Methods | |||||
| Ord BuiltinByteString | |||||
Defined in PlutusTx.Ord.Class Methods compare :: BuiltinByteString -> BuiltinByteString -> Ordering (<) :: BuiltinByteString -> BuiltinByteString -> Bool (<=) :: BuiltinByteString -> BuiltinByteString -> Bool (>) :: BuiltinByteString -> BuiltinByteString -> Bool (>=) :: BuiltinByteString -> BuiltinByteString -> Bool max :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString min :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString | |||||
| Semigroup BuiltinByteString | |||||
Defined in PlutusTx.Semigroup Methods (<>) :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString | |||||
| Pretty BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| Serialise BuiltinByteString | |||||
Defined in PlutusTx.Builtins.Internal Methods encode :: BuiltinByteString -> Encoding decode :: Decoder s BuiltinByteString encodeList :: [BuiltinByteString] -> Encoding decodeList :: Decoder s [BuiltinByteString] | |||||
| HasBlueprintSchema BuiltinByteString referencedTypes | |||||
Defined in PlutusTx.Blueprint.Class Methods schema :: Schema referencedTypes | |||||
| HasFromOpaque BuiltinByteString BuiltinByteString | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods | |||||
| HasToOpaque BuiltinByteString BuiltinByteString | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods | |||||
| HasTermLevel uni ByteString => Lift uni BuiltinByteString | |||||
Defined in PlutusTx.Lift.Class Methods lift :: BuiltinByteString -> RTCompile uni fun (Term TyName Name uni fun ()) | |||||
| HasTypeLevel uni ByteString => Typeable uni BuiltinByteString | |||||
Defined in PlutusTx.Lift.Class Methods typeRep :: Proxy BuiltinByteString -> RTCompile uni fun (Type TyName uni ()) | |||||
| type Unroll BuiltinByteString | |||||
Defined in PlutusTx.Blueprint.Definition.Unroll | |||||
| type FromBuiltin BuiltinByteString | |||||
Defined in PlutusTx.Builtins.HasBuiltin | |||||
fromBuiltin :: HasFromBuiltin arep => arep -> FromBuiltin arep #
fromOpaque :: HasFromOpaque arep a => arep -> a #
Data
Instances
| Data Data | |||||||||||||
Defined in PlutusCore.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Data -> c Data Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Data Source # toConstr :: Data -> Constr Source # dataTypeOf :: Data -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Data) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Data) Source # gmapT :: (forall b. Data b => b -> b) -> Data -> Data Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Data -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Data -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Data -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Data -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Data -> m Data Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Data -> m Data Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Data -> m Data Source # | |||||||||||||
| Generic Data | |||||||||||||
Defined in PlutusCore.Data Associated Types
| |||||||||||||
| Read Data | |||||||||||||
| Show Data | |||||||||||||
| NFData Data | |||||||||||||
Defined in PlutusCore.Data | |||||||||||||
| Eq Data | |||||||||||||
| Ord Data | |||||||||||||
| Hashable Data | |||||||||||||
Defined in PlutusCore.Data | |||||||||||||
| NoThunks Data | |||||||||||||
| ExMemoryUsage Data | |||||||||||||
Defined in PlutusCore.Evaluation.Machine.ExMemoryUsage Methods memoryUsage :: Data -> CostRose | |||||||||||||
| HasToBuiltin Data | |||||||||||||
Defined in PlutusTx.Builtins.HasBuiltin Associated Types
| |||||||||||||
| Pretty Data | |||||||||||||
Defined in PlutusCore.Data | |||||||||||||
| Serialise Data | |||||||||||||
Defined in PlutusCore.Data | |||||||||||||
| PrettyBy ConstConfig Data | |||||||||||||
Defined in PlutusCore.Pretty.PrettyConst | |||||||||||||
| KnownBuiltinTypeIn DefaultUni term Data => MakeKnownIn DefaultUni term Data | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
| KnownBuiltinTypeIn DefaultUni term Data => ReadKnownIn DefaultUni term Data | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
| Contains DefaultUni Data | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
| KnownBuiltinTypeAst tyname DefaultUni Data => KnownTypeAst tyname DefaultUni Data | |||||||||||||
Defined in PlutusCore.Default.Universe Associated Types
Methods typeAst :: Type tyname DefaultUni () | |||||||||||||
| type Rep Data | |||||||||||||
Defined in PlutusCore.Data type Rep Data = D1 ('MetaData "Data" "PlutusCore.Data" "plutus-core-1.60.0.0-LXFqBsoUlXsJIEqLytHte7" 'False) ((C1 ('MetaCons "Constr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Data])) :+: C1 ('MetaCons "Map" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Data, Data)]))) :+: (C1 ('MetaCons "List" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Data])) :+: (C1 ('MetaCons "I" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)) :+: C1 ('MetaCons "B" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))))) | |||||||||||||
| type ToBuiltin Data | |||||||||||||
Defined in PlutusTx.Builtins.HasBuiltin | |||||||||||||
| type IsBuiltin DefaultUni Data | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
| type ToBinds DefaultUni acc Data | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
| type ToHoles DefaultUni hole Data | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
data BuiltinData #
Constructors
| BuiltinData ~Data |
Instances
| Data BuiltinData | |||||
Defined in PlutusTx.Builtins.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BuiltinData -> c BuiltinData Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BuiltinData Source # toConstr :: BuiltinData -> Constr Source # dataTypeOf :: BuiltinData -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BuiltinData) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuiltinData) Source # gmapT :: (forall b. Data b => b -> b) -> BuiltinData -> BuiltinData Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinData -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinData -> r Source # gmapQ :: (forall d. Data d => d -> u) -> BuiltinData -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinData -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source # | |||||
| Generic BuiltinData | |||||
Defined in PlutusTx.Builtins.Internal Associated Types
Methods from :: BuiltinData -> Rep BuiltinData x Source # to :: Rep BuiltinData x -> BuiltinData Source # | |||||
| Show BuiltinData | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| NFData BuiltinData | |||||
Defined in PlutusTx.Builtins.Internal Methods rnf :: BuiltinData -> () Source # | |||||
| Eq BuiltinData | |||||
Defined in PlutusTx.Builtins.Internal Methods (==) :: BuiltinData -> BuiltinData -> Bool Source # (/=) :: BuiltinData -> BuiltinData -> Bool Source # | |||||
| Ord BuiltinData | |||||
Defined in PlutusTx.Builtins.Internal Methods compare :: BuiltinData -> BuiltinData -> Ordering Source # (<) :: BuiltinData -> BuiltinData -> Bool Source # (<=) :: BuiltinData -> BuiltinData -> Bool Source # (>) :: BuiltinData -> BuiltinData -> Bool Source # (>=) :: BuiltinData -> BuiltinData -> Bool Source # max :: BuiltinData -> BuiltinData -> BuiltinData Source # min :: BuiltinData -> BuiltinData -> BuiltinData Source # | |||||
| HasBlueprintDefinition BuiltinData | |||||
Defined in PlutusTx.Blueprint.Definition.Unroll Associated Types
Methods definitionId :: DefinitionId | |||||
| HasFromBuiltin BuiltinData | |||||
Defined in PlutusTx.Builtins.HasBuiltin Associated Types
Methods fromBuiltin :: BuiltinData -> FromBuiltin BuiltinData # | |||||
| MkNil BuiltinData | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods mkNil :: BuiltinList BuiltinData | |||||
| Eq BuiltinData | |||||
Defined in PlutusTx.Eq.Class Methods (==) :: BuiltinData -> BuiltinData -> Bool | |||||
| FromData BuiltinData | |||||
Defined in PlutusTx.IsData.Class Methods | |||||
| ToData BuiltinData | |||||
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: BuiltinData -> BuiltinData # | |||||
| UnsafeFromData BuiltinData | |||||
Defined in PlutusTx.IsData.Class Methods | |||||
| Pretty BuiltinData | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| HasBlueprintSchema BuiltinData referencedTypes | |||||
Defined in PlutusTx.Blueprint.Class Methods schema :: Schema referencedTypes | |||||
| HasFromOpaque BuiltinData BuiltinData | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods fromOpaque :: BuiltinData -> BuiltinData # | |||||
| HasToOpaque BuiltinData BuiltinData | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods toOpaque :: BuiltinData -> BuiltinData # | |||||
| HasTermLevel uni Data => Lift uni BuiltinData | |||||
Defined in PlutusTx.Lift.Class Methods lift :: BuiltinData -> RTCompile uni fun (Term TyName Name uni fun ()) | |||||
| HasTypeLevel uni Data => Typeable uni BuiltinData | |||||
Defined in PlutusTx.Lift.Class Methods typeRep :: Proxy BuiltinData -> RTCompile uni fun (Type TyName uni ()) | |||||
| HasToOpaque (BuiltinData, BuiltinData) (BuiltinPair BuiltinData BuiltinData) | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods toOpaque :: (BuiltinData, BuiltinData) -> BuiltinPair BuiltinData BuiltinData # | |||||
| type Rep BuiltinData | |||||
Defined in PlutusTx.Builtins.Internal type Rep BuiltinData = D1 ('MetaData "BuiltinData" "PlutusTx.Builtins.Internal" "plutus-tx-1.60.0.0-2VI8qZOpowK2Zo3DTnqORk" 'False) (C1 ('MetaCons "BuiltinData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceLazy 'DecidedLazy) (Rec0 Data))) | |||||
| type Unroll BuiltinData | |||||
Defined in PlutusTx.Blueprint.Definition.Unroll | |||||
| type FromBuiltin BuiltinData | |||||
Defined in PlutusTx.Builtins.HasBuiltin | |||||
Methods
toBuiltinData :: a -> BuiltinData #
Instances
| ToData Void | |
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: Void -> BuiltinData # | |
| ToData Address Source # | |
Defined in PlutusLedgerApi.V1.Address Methods toBuiltinData :: Address -> BuiltinData # | |
| ToData LedgerBytes Source # | |
Defined in PlutusLedgerApi.V1.Bytes Methods toBuiltinData :: LedgerBytes -> BuiltinData # | |
| ToData ScriptContext Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods | |
| ToData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods | |
| ToData TxInInfo Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods toBuiltinData :: TxInInfo -> BuiltinData # | |
| ToData TxInfo Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods toBuiltinData :: TxInfo -> BuiltinData # | |
| ToData Credential Source # | |
Defined in PlutusLedgerApi.V1.Credential Methods toBuiltinData :: Credential -> BuiltinData # | |
| ToData StakingCredential Source # | |
Defined in PlutusLedgerApi.V1.Credential Methods | |
| ToData PubKeyHash Source # | |
Defined in PlutusLedgerApi.V1.Crypto Methods toBuiltinData :: PubKeyHash -> BuiltinData # | |
| ToData DCert Source # | |
Defined in PlutusLedgerApi.V1.DCert Methods toBuiltinData :: DCert -> BuiltinData # | |
| ToData Address Source # | |
Defined in PlutusLedgerApi.V1.Data.Address Methods toBuiltinData :: Address -> BuiltinData # | |
| ToData ScriptContext Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods | |
| ToData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods | |
| ToData TxInInfo Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods toBuiltinData :: TxInInfo -> BuiltinData # | |
| ToData TxInfo Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods toBuiltinData :: TxInfo -> BuiltinData # | |
| ToData Credential Source # | |
Defined in PlutusLedgerApi.V1.Data.Credential Methods toBuiltinData :: Credential -> BuiltinData # | |
| ToData StakingCredential Source # | |
Defined in PlutusLedgerApi.V1.Data.Credential Methods | |
| ToData DCert Source # | |
Defined in PlutusLedgerApi.V1.Data.DCert Methods toBuiltinData :: DCert -> BuiltinData # | |
| ToData DiffMilliSeconds Source # | |
Defined in PlutusLedgerApi.V1.Data.Time Methods | |
| ToData POSIXTime Source # | |
Defined in PlutusLedgerApi.V1.Data.Time Methods toBuiltinData :: POSIXTime -> BuiltinData # | |
| ToData TxId Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx Methods toBuiltinData :: TxId -> BuiltinData # | |
| ToData TxOut Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx Methods toBuiltinData :: TxOut -> BuiltinData # | |
| ToData TxOutRef Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx Methods toBuiltinData :: TxOutRef -> BuiltinData # | |
| ToData AssetClass Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods toBuiltinData :: AssetClass -> BuiltinData # | |
| ToData CurrencySymbol Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods | |
| ToData Lovelace Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods toBuiltinData :: Lovelace -> BuiltinData # | |
| ToData TokenName Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods toBuiltinData :: TokenName -> BuiltinData # | |
| ToData Value Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods toBuiltinData :: Value -> BuiltinData # | |
| ToData Datum Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods toBuiltinData :: Datum -> BuiltinData # | |
| ToData DatumHash Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods toBuiltinData :: DatumHash -> BuiltinData # | |
| ToData Redeemer Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods toBuiltinData :: Redeemer -> BuiltinData # | |
| ToData RedeemerHash Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods | |
| ToData ScriptHash Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods toBuiltinData :: ScriptHash -> BuiltinData # | |
| ToData DiffMilliSeconds Source # | |
Defined in PlutusLedgerApi.V1.Time Methods | |
| ToData POSIXTime Source # | |
Defined in PlutusLedgerApi.V1.Time Methods toBuiltinData :: POSIXTime -> BuiltinData # | |
| ToData RedeemerPtr Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods toBuiltinData :: RedeemerPtr -> BuiltinData # | |
| ToData ScriptTag Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods toBuiltinData :: ScriptTag -> BuiltinData # | |
| ToData TxId Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods toBuiltinData :: TxId -> BuiltinData # | |
| ToData TxOut Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods toBuiltinData :: TxOut -> BuiltinData # | |
| ToData TxOutRef Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods toBuiltinData :: TxOutRef -> BuiltinData # | |
| ToData AssetClass Source # | |
Defined in PlutusLedgerApi.V1.Value Methods toBuiltinData :: AssetClass -> BuiltinData # | |
| ToData CurrencySymbol Source # | |
Defined in PlutusLedgerApi.V1.Value Methods | |
| ToData Lovelace Source # | |
Defined in PlutusLedgerApi.V1.Value Methods toBuiltinData :: Lovelace -> BuiltinData # | |
| ToData TokenName Source # | |
Defined in PlutusLedgerApi.V1.Value Methods toBuiltinData :: TokenName -> BuiltinData # | |
| ToData Value Source # | |
Defined in PlutusLedgerApi.V1.Value Methods toBuiltinData :: Value -> BuiltinData # | |
| ToData ScriptContext Source # | |
Defined in PlutusLedgerApi.V2.Contexts Methods | |
| ToData TxInInfo Source # | |
Defined in PlutusLedgerApi.V2.Contexts Methods toBuiltinData :: TxInInfo -> BuiltinData # | |
| ToData TxInfo Source # | |
Defined in PlutusLedgerApi.V2.Contexts Methods toBuiltinData :: TxInfo -> BuiltinData # | |
| ToData ScriptContext Source # | |
Defined in PlutusLedgerApi.V2.Data.Contexts Methods | |
| ToData TxInInfo Source # | |
Defined in PlutusLedgerApi.V2.Data.Contexts Methods toBuiltinData :: TxInInfo -> BuiltinData # | |
| ToData TxInfo Source # | |
Defined in PlutusLedgerApi.V2.Data.Contexts Methods toBuiltinData :: TxInfo -> BuiltinData # | |
| ToData OutputDatum Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx Methods toBuiltinData :: OutputDatum -> BuiltinData # | |
| ToData TxOut Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx Methods toBuiltinData :: TxOut -> BuiltinData # | |
| ToData OutputDatum Source # | |
Defined in PlutusLedgerApi.V2.Tx Methods toBuiltinData :: OutputDatum -> BuiltinData # | |
| ToData TxOut Source # | |
Defined in PlutusLedgerApi.V2.Tx Methods toBuiltinData :: TxOut -> BuiltinData # | |
| ToData ChangedParameters Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| ToData ColdCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| ToData Committee Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods toBuiltinData :: Committee -> BuiltinData # | |
| ToData Constitution Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| ToData DRep Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods toBuiltinData :: DRep -> BuiltinData # | |
| ToData DRepCredential Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| ToData Delegatee Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods toBuiltinData :: Delegatee -> BuiltinData # | |
| ToData GovernanceAction Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| ToData GovernanceActionId Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| ToData HotCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| ToData ProposalProcedure Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| ToData ProtocolVersion Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| ToData ScriptContext Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| ToData ScriptInfo Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods toBuiltinData :: ScriptInfo -> BuiltinData # | |
| ToData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| ToData TxCert Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods toBuiltinData :: TxCert -> BuiltinData # | |
| ToData TxInInfo Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods toBuiltinData :: TxInInfo -> BuiltinData # | |
| ToData TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods toBuiltinData :: TxInfo -> BuiltinData # | |
| ToData Vote Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods toBuiltinData :: Vote -> BuiltinData # | |
| ToData Voter Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods toBuiltinData :: Voter -> BuiltinData # | |
| ToData ChangedParameters Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| ToData ColdCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| ToData Committee Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods toBuiltinData :: Committee -> BuiltinData # | |
| ToData Constitution Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| ToData DRep Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods toBuiltinData :: DRep -> BuiltinData # | |
| ToData DRepCredential Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| ToData Delegatee Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods toBuiltinData :: Delegatee -> BuiltinData # | |
| ToData GovernanceAction Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| ToData GovernanceActionId Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| ToData HotCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| ToData ProposalProcedure Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| ToData ProtocolVersion Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| ToData ScriptContext Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| ToData ScriptInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods toBuiltinData :: ScriptInfo -> BuiltinData # | |
| ToData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| ToData TxCert Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods toBuiltinData :: TxCert -> BuiltinData # | |
| ToData TxInInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods toBuiltinData :: TxInInfo -> BuiltinData # | |
| ToData TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods toBuiltinData :: TxInfo -> BuiltinData # | |
| ToData Vote Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods toBuiltinData :: Vote -> BuiltinData # | |
| ToData Voter Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods toBuiltinData :: Voter -> BuiltinData # | |
| ToData MintValue Source # | |
Defined in PlutusLedgerApi.V3.Data.MintValue Methods toBuiltinData :: MintValue -> BuiltinData # | |
| ToData TxId Source # | |
Defined in PlutusLedgerApi.V3.Data.Tx Methods toBuiltinData :: TxId -> BuiltinData # | |
| ToData TxOutRef Source # | |
Defined in PlutusLedgerApi.V3.Data.Tx Methods toBuiltinData :: TxOutRef -> BuiltinData # | |
| ToData MintValue Source # | |
Defined in PlutusLedgerApi.V3.MintValue Methods toBuiltinData :: MintValue -> BuiltinData # | |
| ToData TxId Source # | |
Defined in PlutusLedgerApi.V3.Tx Methods toBuiltinData :: TxId -> BuiltinData # | |
| ToData TxOutRef Source # | |
Defined in PlutusLedgerApi.V3.Tx Methods toBuiltinData :: TxOutRef -> BuiltinData # | |
| ToData BuiltinBLS12_381_G1_Element | |
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: BuiltinBLS12_381_G1_Element -> BuiltinData # | |
| ToData BuiltinBLS12_381_G2_Element | |
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: BuiltinBLS12_381_G2_Element -> BuiltinData # | |
| (TypeError ('Text "toBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => ToData BuiltinBLS12_381_MlResult | |
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: BuiltinBLS12_381_MlResult -> BuiltinData # | |
| ToData BuiltinByteString | |
Defined in PlutusTx.IsData.Class Methods | |
| ToData BuiltinData | |
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: BuiltinData -> BuiltinData # | |
| ToData Rational | |
Defined in PlutusTx.Ratio Methods toBuiltinData :: Rational -> BuiltinData # | |
| ToData Sqrt | |
Defined in PlutusTx.Sqrt Methods toBuiltinData :: Sqrt -> BuiltinData # | |
| ToData Integer | |
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: Integer -> BuiltinData # | |
| (TypeError ('Text "Int is not supported, use Integer instead") :: Constraint) => ToData Int | |
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: Int -> BuiltinData # | |
| ToData (Extended a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods toBuiltinData :: Extended a -> BuiltinData # | |
| ToData (Interval a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods toBuiltinData :: Interval a -> BuiltinData # | |
| ToData (LowerBound a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods toBuiltinData :: LowerBound a -> BuiltinData # | |
| ToData (UpperBound a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods toBuiltinData :: UpperBound a -> BuiltinData # | |
| ToData a => ToData (Extended a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods toBuiltinData :: Extended a -> BuiltinData # | |
| ToData a => ToData (Interval a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods toBuiltinData :: Interval a -> BuiltinData # | |
| ToData a => ToData (LowerBound a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods toBuiltinData :: LowerBound a -> BuiltinData # | |
| ToData a => ToData (UpperBound a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods toBuiltinData :: UpperBound a -> BuiltinData # | |
| ToData (List a) | |
Defined in PlutusTx.Data.List Methods toBuiltinData :: List a -> BuiltinData # | |
| ToData a => ToData [a] | |
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: [a] -> BuiltinData # | |
| (ToData k, ToData v) => ToData (Map k v) | |
Defined in PlutusTx.AssocMap Methods toBuiltinData :: Map k v -> BuiltinData # | |
| ToData (Map k a) | |
Defined in PlutusTx.Data.AssocMap Methods toBuiltinData :: Map k a -> BuiltinData # | |
| (ToData a, ToData b) => ToData (These a b) | |
Defined in PlutusTx.These Methods toBuiltinData :: These a b -> BuiltinData # | |
Methods
fromBuiltinData :: BuiltinData -> Maybe a #
Instances
| FromData Void | |
Defined in PlutusTx.IsData.Class Methods fromBuiltinData :: BuiltinData -> Maybe Void # | |
| FromData Address Source # | |
Defined in PlutusLedgerApi.V1.Address Methods fromBuiltinData :: BuiltinData -> Maybe Address # | |
| FromData LedgerBytes Source # | |
Defined in PlutusLedgerApi.V1.Bytes Methods | |
| FromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods | |
| FromData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods | |
| FromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInInfo # | |
| FromData TxInfo Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInfo # | |
| FromData Credential Source # | |
Defined in PlutusLedgerApi.V1.Credential Methods | |
| FromData StakingCredential Source # | |
Defined in PlutusLedgerApi.V1.Credential Methods | |
| FromData PubKeyHash Source # | |
Defined in PlutusLedgerApi.V1.Crypto Methods | |
| FromData DCert Source # | |
Defined in PlutusLedgerApi.V1.DCert Methods fromBuiltinData :: BuiltinData -> Maybe DCert # | |
| FromData Address Source # | |
Defined in PlutusLedgerApi.V1.Data.Address Methods fromBuiltinData :: BuiltinData -> Maybe Address # | |
| FromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods | |
| FromData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods | |
| FromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInInfo # | |
| FromData TxInfo Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInfo # | |
| FromData Credential Source # | |
Defined in PlutusLedgerApi.V1.Data.Credential Methods | |
| FromData StakingCredential Source # | |
Defined in PlutusLedgerApi.V1.Data.Credential Methods | |
| FromData DCert Source # | |
Defined in PlutusLedgerApi.V1.Data.DCert Methods fromBuiltinData :: BuiltinData -> Maybe DCert # | |
| FromData DiffMilliSeconds Source # | |
Defined in PlutusLedgerApi.V1.Data.Time Methods | |
| FromData POSIXTime Source # | |
Defined in PlutusLedgerApi.V1.Data.Time Methods | |
| FromData TxId Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxId # | |
| FromData TxOut Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxOut # | |
| FromData TxOutRef Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxOutRef # | |
| FromData AssetClass Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods | |
| FromData CurrencySymbol Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods | |
| FromData Lovelace Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods fromBuiltinData :: BuiltinData -> Maybe Lovelace # | |
| FromData TokenName Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods | |
| FromData Value Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods fromBuiltinData :: BuiltinData -> Maybe Value # | |
| FromData Datum Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods fromBuiltinData :: BuiltinData -> Maybe Datum # | |
| FromData DatumHash Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods | |
| FromData Redeemer Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods fromBuiltinData :: BuiltinData -> Maybe Redeemer # | |
| FromData RedeemerHash Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods | |
| FromData ScriptHash Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods | |
| FromData DiffMilliSeconds Source # | |
Defined in PlutusLedgerApi.V1.Time Methods | |
| FromData POSIXTime Source # | |
Defined in PlutusLedgerApi.V1.Time Methods | |
| FromData RedeemerPtr Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods | |
| FromData ScriptTag Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods | |
| FromData TxId Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxId # | |
| FromData TxOut Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxOut # | |
| FromData TxOutRef Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxOutRef # | |
| FromData AssetClass Source # | |
Defined in PlutusLedgerApi.V1.Value Methods | |
| FromData CurrencySymbol Source # | |
Defined in PlutusLedgerApi.V1.Value Methods | |
| FromData Lovelace Source # | |
Defined in PlutusLedgerApi.V1.Value Methods fromBuiltinData :: BuiltinData -> Maybe Lovelace # | |
| FromData TokenName Source # | |
Defined in PlutusLedgerApi.V1.Value Methods | |
| FromData Value Source # | |
Defined in PlutusLedgerApi.V1.Value Methods fromBuiltinData :: BuiltinData -> Maybe Value # | |
| FromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V2.Contexts Methods | |
| FromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V2.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInInfo # | |
| FromData TxInfo Source # | |
Defined in PlutusLedgerApi.V2.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInfo # | |
| FromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V2.Data.Contexts Methods | |
| FromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V2.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInInfo # | |
| FromData TxInfo Source # | |
Defined in PlutusLedgerApi.V2.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInfo # | |
| FromData OutputDatum Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx Methods | |
| FromData TxOut Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxOut # | |
| FromData OutputDatum Source # | |
Defined in PlutusLedgerApi.V2.Tx Methods | |
| FromData TxOut Source # | |
Defined in PlutusLedgerApi.V2.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxOut # | |
| FromData ChangedParameters Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| FromData ColdCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe ColdCommitteeCredential # | |
| FromData Committee Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| FromData Constitution Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| FromData DRep Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe DRep # | |
| FromData DRepCredential Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| FromData Delegatee Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| FromData GovernanceAction Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| FromData GovernanceActionId Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe GovernanceActionId # | |
| FromData HotCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe HotCommitteeCredential # | |
| FromData ProposalProcedure Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| FromData ProtocolVersion Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| FromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| FromData ScriptInfo Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| FromData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| FromData TxCert Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxCert # | |
| FromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInInfo # | |
| FromData TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInfo # | |
| FromData Vote Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe Vote # | |
| FromData Voter Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe Voter # | |
| FromData ChangedParameters Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| FromData ColdCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe ColdCommitteeCredential # | |
| FromData Committee Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| FromData Constitution Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| FromData DRep Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe DRep # | |
| FromData DRepCredential Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| FromData Delegatee Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| FromData GovernanceAction Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| FromData GovernanceActionId Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe GovernanceActionId # | |
| FromData HotCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe HotCommitteeCredential # | |
| FromData ProposalProcedure Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| FromData ProtocolVersion Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| FromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| FromData ScriptInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| FromData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| FromData TxCert Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxCert # | |
| FromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInInfo # | |
| FromData TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe TxInfo # | |
| FromData Vote Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe Vote # | |
| FromData Voter Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods fromBuiltinData :: BuiltinData -> Maybe Voter # | |
| FromData MintValue Source # | |
Defined in PlutusLedgerApi.V3.Data.MintValue Methods | |
| FromData TxId Source # | |
Defined in PlutusLedgerApi.V3.Data.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxId # | |
| FromData TxOutRef Source # | |
Defined in PlutusLedgerApi.V3.Data.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxOutRef # | |
| FromData MintValue Source # | |
Defined in PlutusLedgerApi.V3.MintValue Methods | |
| FromData TxId Source # | |
Defined in PlutusLedgerApi.V3.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxId # | |
| FromData TxOutRef Source # | |
Defined in PlutusLedgerApi.V3.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxOutRef # | |
| FromData BuiltinBLS12_381_G1_Element | |
Defined in PlutusTx.IsData.Class Methods fromBuiltinData :: BuiltinData -> Maybe BuiltinBLS12_381_G1_Element # | |
| FromData BuiltinBLS12_381_G2_Element | |
Defined in PlutusTx.IsData.Class Methods fromBuiltinData :: BuiltinData -> Maybe BuiltinBLS12_381_G2_Element # | |
| (TypeError ('Text "fromBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => FromData BuiltinBLS12_381_MlResult | |
Defined in PlutusTx.IsData.Class Methods fromBuiltinData :: BuiltinData -> Maybe BuiltinBLS12_381_MlResult # | |
| FromData BuiltinByteString | |
Defined in PlutusTx.IsData.Class Methods | |
| FromData BuiltinData | |
Defined in PlutusTx.IsData.Class Methods | |
| FromData Rational | |
Defined in PlutusTx.Ratio Methods fromBuiltinData :: BuiltinData -> Maybe Rational # | |
| FromData Sqrt | |
Defined in PlutusTx.Sqrt Methods fromBuiltinData :: BuiltinData -> Maybe Sqrt # | |
| FromData Integer | |
Defined in PlutusTx.IsData.Class Methods fromBuiltinData :: BuiltinData -> Maybe Integer # | |
| (TypeError ('Text "Int is not supported, use Integer instead") :: Constraint) => FromData Int | |
Defined in PlutusTx.IsData.Class Methods fromBuiltinData :: BuiltinData -> Maybe Int # | |
| FromData (Extended a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods fromBuiltinData :: BuiltinData -> Maybe (Extended a) # | |
| FromData (Interval a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods fromBuiltinData :: BuiltinData -> Maybe (Interval a) # | |
| FromData (LowerBound a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods fromBuiltinData :: BuiltinData -> Maybe (LowerBound a) # | |
| FromData (UpperBound a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods fromBuiltinData :: BuiltinData -> Maybe (UpperBound a) # | |
| FromData a => FromData (Extended a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods fromBuiltinData :: BuiltinData -> Maybe (Extended a) # | |
| FromData a => FromData (Interval a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods fromBuiltinData :: BuiltinData -> Maybe (Interval a) # | |
| FromData a => FromData (LowerBound a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods fromBuiltinData :: BuiltinData -> Maybe (LowerBound a) # | |
| FromData a => FromData (UpperBound a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods fromBuiltinData :: BuiltinData -> Maybe (UpperBound a) # | |
| FromData (List a) | |
Defined in PlutusTx.Data.List Methods fromBuiltinData :: BuiltinData -> Maybe (List a) # | |
| FromData a => FromData [a] | |
Defined in PlutusTx.IsData.Class Methods fromBuiltinData :: BuiltinData -> Maybe [a] # | |
| (FromData k, FromData v) => FromData (Map k v) | |
Defined in PlutusTx.AssocMap Methods fromBuiltinData :: BuiltinData -> Maybe (Map k v) # | |
| FromData (Map k a) | |
Defined in PlutusTx.Data.AssocMap Methods fromBuiltinData :: BuiltinData -> Maybe (Map k a) # | |
| (FromData a, FromData b) => FromData (These a b) | |
Defined in PlutusTx.These Methods fromBuiltinData :: BuiltinData -> Maybe (These a b) # | |
class UnsafeFromData a where #
Methods
unsafeFromBuiltinData :: BuiltinData -> a #
Instances
| UnsafeFromData Void | |
Defined in PlutusTx.IsData.Class Methods | |
| UnsafeFromData Address Source # | |
Defined in PlutusLedgerApi.V1.Address Methods | |
| UnsafeFromData LedgerBytes Source # | |
Defined in PlutusLedgerApi.V1.Bytes Methods | |
| UnsafeFromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods | |
| UnsafeFromData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods | |
| UnsafeFromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods | |
| UnsafeFromData TxInfo Source # | |
Defined in PlutusLedgerApi.V1.Contexts Methods | |
| UnsafeFromData Credential Source # | |
Defined in PlutusLedgerApi.V1.Credential Methods | |
| UnsafeFromData StakingCredential Source # | |
Defined in PlutusLedgerApi.V1.Credential Methods | |
| UnsafeFromData PubKeyHash Source # | |
Defined in PlutusLedgerApi.V1.Crypto Methods | |
| UnsafeFromData DCert Source # | |
Defined in PlutusLedgerApi.V1.DCert Methods | |
| UnsafeFromData Address Source # | |
Defined in PlutusLedgerApi.V1.Data.Address Methods | |
| UnsafeFromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods | |
| UnsafeFromData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods | |
| UnsafeFromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods | |
| UnsafeFromData TxInfo Source # | |
Defined in PlutusLedgerApi.V1.Data.Contexts Methods | |
| UnsafeFromData Credential Source # | |
Defined in PlutusLedgerApi.V1.Data.Credential Methods | |
| UnsafeFromData StakingCredential Source # | |
Defined in PlutusLedgerApi.V1.Data.Credential Methods | |
| UnsafeFromData DCert Source # | |
Defined in PlutusLedgerApi.V1.Data.DCert Methods | |
| UnsafeFromData DiffMilliSeconds Source # | |
Defined in PlutusLedgerApi.V1.Data.Time Methods | |
| UnsafeFromData POSIXTime Source # | |
Defined in PlutusLedgerApi.V1.Data.Time Methods | |
| UnsafeFromData TxId Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx Methods | |
| UnsafeFromData TxOut Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx Methods | |
| UnsafeFromData TxOutRef Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx Methods | |
| UnsafeFromData AssetClass Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods | |
| UnsafeFromData CurrencySymbol Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods | |
| UnsafeFromData Lovelace Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods | |
| UnsafeFromData TokenName Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods | |
| UnsafeFromData Value Source # | |
Defined in PlutusLedgerApi.V1.Data.Value Methods | |
| UnsafeFromData Datum Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods | |
| UnsafeFromData DatumHash Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods | |
| UnsafeFromData Redeemer Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods | |
| UnsafeFromData RedeemerHash Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods | |
| UnsafeFromData ScriptHash Source # | |
Defined in PlutusLedgerApi.V1.Scripts Methods | |
| UnsafeFromData DiffMilliSeconds Source # | |
Defined in PlutusLedgerApi.V1.Time Methods | |
| UnsafeFromData POSIXTime Source # | |
Defined in PlutusLedgerApi.V1.Time Methods | |
| UnsafeFromData RedeemerPtr Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods | |
| UnsafeFromData ScriptTag Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods | |
| UnsafeFromData TxId Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods | |
| UnsafeFromData TxOut Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods | |
| UnsafeFromData TxOutRef Source # | |
Defined in PlutusLedgerApi.V1.Tx Methods | |
| UnsafeFromData AssetClass Source # | |
Defined in PlutusLedgerApi.V1.Value Methods | |
| UnsafeFromData CurrencySymbol Source # | |
Defined in PlutusLedgerApi.V1.Value Methods | |
| UnsafeFromData Lovelace Source # | |
Defined in PlutusLedgerApi.V1.Value Methods | |
| UnsafeFromData TokenName Source # | |
Defined in PlutusLedgerApi.V1.Value Methods | |
| UnsafeFromData Value Source # | |
Defined in PlutusLedgerApi.V1.Value Methods | |
| UnsafeFromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V2.Contexts Methods | |
| UnsafeFromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V2.Contexts Methods | |
| UnsafeFromData TxInfo Source # | |
Defined in PlutusLedgerApi.V2.Contexts Methods | |
| UnsafeFromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V2.Data.Contexts Methods | |
| UnsafeFromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V2.Data.Contexts Methods | |
| UnsafeFromData TxInfo Source # | |
Defined in PlutusLedgerApi.V2.Data.Contexts Methods | |
| UnsafeFromData OutputDatum Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx Methods | |
| UnsafeFromData TxOut Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx Methods | |
| UnsafeFromData OutputDatum Source # | |
Defined in PlutusLedgerApi.V2.Tx Methods | |
| UnsafeFromData TxOut Source # | |
Defined in PlutusLedgerApi.V2.Tx Methods | |
| UnsafeFromData ChangedParameters Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData ColdCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods unsafeFromBuiltinData :: BuiltinData -> ColdCommitteeCredential # | |
| UnsafeFromData Committee Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData Constitution Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData DRep Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData DRepCredential Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData Delegatee Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData GovernanceAction Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData GovernanceActionId Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods unsafeFromBuiltinData :: BuiltinData -> GovernanceActionId # | |
| UnsafeFromData HotCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods unsafeFromBuiltinData :: BuiltinData -> HotCommitteeCredential # | |
| UnsafeFromData ProposalProcedure Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData ProtocolVersion Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData ScriptInfo Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData TxCert Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData Vote Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData Voter Source # | |
Defined in PlutusLedgerApi.V3.Contexts Methods | |
| UnsafeFromData ChangedParameters Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData ColdCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods unsafeFromBuiltinData :: BuiltinData -> ColdCommitteeCredential # | |
| UnsafeFromData Committee Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData Constitution Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData DRep Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData DRepCredential Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData Delegatee Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData GovernanceAction Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData GovernanceActionId Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods unsafeFromBuiltinData :: BuiltinData -> GovernanceActionId # | |
| UnsafeFromData HotCommitteeCredential Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods unsafeFromBuiltinData :: BuiltinData -> HotCommitteeCredential # | |
| UnsafeFromData ProposalProcedure Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData ProtocolVersion Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData ScriptContext Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData ScriptInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData ScriptPurpose Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData TxCert Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData TxInInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData Vote Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData Voter Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods | |
| UnsafeFromData MintValue Source # | |
Defined in PlutusLedgerApi.V3.Data.MintValue Methods | |
| UnsafeFromData TxId Source # | |
Defined in PlutusLedgerApi.V3.Data.Tx Methods | |
| UnsafeFromData TxOutRef Source # | |
Defined in PlutusLedgerApi.V3.Data.Tx Methods | |
| UnsafeFromData MintValue Source # | |
Defined in PlutusLedgerApi.V3.MintValue Methods | |
| UnsafeFromData TxId Source # | |
Defined in PlutusLedgerApi.V3.Tx Methods | |
| UnsafeFromData TxOutRef Source # | |
Defined in PlutusLedgerApi.V3.Tx Methods | |
| UnsafeFromData BuiltinBLS12_381_G1_Element | |
Defined in PlutusTx.IsData.Class Methods unsafeFromBuiltinData :: BuiltinData -> BuiltinBLS12_381_G1_Element # | |
| UnsafeFromData BuiltinBLS12_381_G2_Element | |
Defined in PlutusTx.IsData.Class Methods unsafeFromBuiltinData :: BuiltinData -> BuiltinBLS12_381_G2_Element # | |
| (TypeError ('Text "unsafeFromBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => UnsafeFromData BuiltinBLS12_381_MlResult | |
Defined in PlutusTx.IsData.Class Methods unsafeFromBuiltinData :: BuiltinData -> BuiltinBLS12_381_MlResult # | |
| UnsafeFromData BuiltinByteString | |
Defined in PlutusTx.IsData.Class Methods | |
| UnsafeFromData BuiltinData | |
Defined in PlutusTx.IsData.Class Methods | |
| UnsafeFromData Rational | |
Defined in PlutusTx.Ratio Methods | |
| UnsafeFromData Sqrt | |
Defined in PlutusTx.Sqrt Methods unsafeFromBuiltinData :: BuiltinData -> Sqrt # | |
| UnsafeFromData Integer | |
Defined in PlutusTx.IsData.Class Methods | |
| (TypeError ('Text "Int is not supported, use Integer instead") :: Constraint) => UnsafeFromData Int | |
Defined in PlutusTx.IsData.Class Methods unsafeFromBuiltinData :: BuiltinData -> Int # | |
| UnsafeFromData (Extended a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods unsafeFromBuiltinData :: BuiltinData -> Extended a # | |
| UnsafeFromData (Interval a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods unsafeFromBuiltinData :: BuiltinData -> Interval a # | |
| UnsafeFromData (LowerBound a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods unsafeFromBuiltinData :: BuiltinData -> LowerBound a # | |
| UnsafeFromData (UpperBound a) Source # | |
Defined in PlutusLedgerApi.V1.Data.Interval Methods unsafeFromBuiltinData :: BuiltinData -> UpperBound a # | |
| UnsafeFromData a => UnsafeFromData (Extended a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods unsafeFromBuiltinData :: BuiltinData -> Extended a # | |
| UnsafeFromData a => UnsafeFromData (Interval a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods unsafeFromBuiltinData :: BuiltinData -> Interval a # | |
| UnsafeFromData a => UnsafeFromData (LowerBound a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods unsafeFromBuiltinData :: BuiltinData -> LowerBound a # | |
| UnsafeFromData a => UnsafeFromData (UpperBound a) Source # | |
Defined in PlutusLedgerApi.V1.Interval Methods unsafeFromBuiltinData :: BuiltinData -> UpperBound a # | |
| UnsafeFromData (List a) | |
Defined in PlutusTx.Data.List Methods unsafeFromBuiltinData :: BuiltinData -> List a # | |
| UnsafeFromData a => UnsafeFromData [a] | |
Defined in PlutusTx.IsData.Class Methods unsafeFromBuiltinData :: BuiltinData -> [a] # | |
| (UnsafeFromData k, UnsafeFromData v) => UnsafeFromData (Map k v) | |
Defined in PlutusTx.AssocMap Methods unsafeFromBuiltinData :: BuiltinData -> Map k v # | |
| UnsafeFromData (Map k a) | |
Defined in PlutusTx.Data.AssocMap Methods unsafeFromBuiltinData :: BuiltinData -> Map k a # | |
| (UnsafeFromData a, UnsafeFromData b) => UnsafeFromData (These a b) | |
Defined in PlutusTx.These Methods unsafeFromBuiltinData :: BuiltinData -> These a b # | |
unsafeFromData :: UnsafeFromData a => Data -> a #
dataToBuiltinData :: Data -> BuiltinData #
builtinDataToData :: BuiltinData -> Data #
Misc
class Monad m => MonadError e (m :: Type -> Type) | m -> e Source #
The strategy of combining computations that can throw exceptions by bypassing bound functions from the point an exception is thrown to the point that it is handled.
Is parameterized over the type of error information and
the monad type constructor.
It is common to use as the monad type constructor
for an error monad in which error descriptions take the form of strings.
In that case and many other common cases the resulting monad is already defined
as an instance of the Either StringMonadError class.
You can also define your own error type and/or use a monad type constructor
other than or Either String.
In these cases you will have to explicitly define instances of the Either IOErrorMonadError
class.
(If you are using the deprecated Control.Monad.Error or
Control.Monad.Trans.Error, you may also have to define an Error instance.)
Minimal complete definition
Instances
| MonadError IOException IO | |
Defined in Control.Monad.Error.Class Methods throwError :: IOException -> IO a Source # catchError :: IO a -> (IOException -> IO a) -> IO a Source # | |
| MonadError BuiltinError BuiltinResult | |
Defined in PlutusCore.Builtin.Result Methods throwError :: BuiltinError -> BuiltinResult a Source # catchError :: BuiltinResult a -> (BuiltinError -> BuiltinResult a) -> BuiltinResult a Source # | |
| MonadError () EvaluationResult | |
Defined in PlutusCore.Evaluation.Result Methods throwError :: () -> EvaluationResult a Source # catchError :: EvaluationResult a -> (() -> EvaluationResult a) -> EvaluationResult a Source # | |
| MonadError () Maybe | Since: mtl-2.2.2 |
Defined in Control.Monad.Error.Class Methods throwError :: () -> Maybe a Source # catchError :: Maybe a -> (() -> Maybe a) -> Maybe a Source # | |
| MonadError e (Either e) | |
Defined in Control.Monad.Error.Class Methods throwError :: e -> Either e a Source # catchError :: Either e a -> (e -> Either e a) -> Either e a Source # | |
| MonadError e m => MonadError e (Free m) | |
Defined in Control.Monad.Free Methods throwError :: e -> Free m a Source # catchError :: Free m a -> (e -> Free m a) -> Free m a Source # | |
| MonadError e m => MonadError e (GenT m) | |
Defined in Hedgehog.Internal.Gen Methods throwError :: e -> GenT m a Source # catchError :: GenT m a -> (e -> GenT m a) -> GenT m a Source # | |
| MonadError e m => MonadError e (PropertyT m) | |
Defined in Hedgehog.Internal.Property Methods throwError :: e -> PropertyT m a Source # catchError :: PropertyT m a -> (e -> PropertyT m a) -> PropertyT m a Source # | |
| MonadError e m => MonadError e (TestT m) | |
Defined in Hedgehog.Internal.Property Methods throwError :: e -> TestT m a Source # catchError :: TestT m a -> (e -> TestT m a) -> TestT m a Source # | |
| MonadError e m => MonadError e (TreeT m) | |
Defined in Hedgehog.Internal.Tree Methods throwError :: e -> TreeT m a Source # catchError :: TreeT m a -> (e -> TreeT m a) -> TreeT m a Source # | |
| MonadError e m => MonadError e (ListT m) | |
Defined in ListT Methods throwError :: e -> ListT m a Source # catchError :: ListT m a -> (e -> ListT m a) -> ListT m a Source # | |
| MonadError e m => MonadError e (QuoteT m) | |
Defined in PlutusCore.Quote Methods throwError :: e -> QuoteT m a Source # catchError :: QuoteT m a -> (e -> QuoteT m a) -> QuoteT m a Source # | |
| MonadError e m => MonadError e (ResourceT m) | |
Defined in Control.Monad.Trans.Resource.Internal Methods throwError :: e -> ResourceT m a Source # catchError :: ResourceT m a -> (e -> ResourceT m a) -> ResourceT m a Source # | |
| MonadError e m => MonadError e (MaybeT m) | |
Defined in Control.Monad.Error.Class Methods throwError :: e -> MaybeT m a Source # catchError :: MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a Source # | |
| (Functor f, MonadError e m) => MonadError e (FreeT f m) | |
Defined in Control.Monad.Trans.Free Methods throwError :: e -> FreeT f m a Source # catchError :: FreeT f m a -> (e -> FreeT f m a) -> FreeT f m a Source # | |
| (Monoid w, MonadError e m) => MonadError e (AccumT w m) | Since: mtl-2.3 |
Defined in Control.Monad.Error.Class Methods throwError :: e -> AccumT w m a Source # catchError :: AccumT w m a -> (e -> AccumT w m a) -> AccumT w m a Source # | |
| Monad m => MonadError e (ExceptT e m) | Since: mtl-2.2 |
Defined in Control.Monad.Error.Class Methods throwError :: e -> ExceptT e m a Source # catchError :: ExceptT e m a -> (e -> ExceptT e m a) -> ExceptT e m a Source # | |
| MonadError e m => MonadError e (IdentityT m) | |
Defined in Control.Monad.Error.Class Methods throwError :: e -> IdentityT m a Source # catchError :: IdentityT m a -> (e -> IdentityT m a) -> IdentityT m a Source # | |
| MonadError e m => MonadError e (ReaderT r m) | |
Defined in Control.Monad.Error.Class Methods throwError :: e -> ReaderT r m a Source # catchError :: ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a Source # | |
| MonadError e m => MonadError e (StateT s m) | |
Defined in Control.Monad.Error.Class Methods throwError :: e -> StateT s m a Source # catchError :: StateT s m a -> (e -> StateT s m a) -> StateT s m a Source # | |
| MonadError e m => MonadError e (StateT s m) | |
Defined in Control.Monad.Error.Class Methods throwError :: e -> StateT s m a Source # catchError :: StateT s m a -> (e -> StateT s m a) -> StateT s m a Source # | |
| (Monoid w, MonadError e m) => MonadError e (WriterT w m) | Since: mtl-2.3 |
Defined in Control.Monad.Error.Class Methods throwError :: e -> WriterT w m a Source # catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a Source # | |
| (Monoid w, MonadError e m) => MonadError e (WriterT w m) | |
Defined in Control.Monad.Error.Class Methods throwError :: e -> WriterT w m a Source # catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a Source # | |
| (Monoid w, MonadError e m) => MonadError e (WriterT w m) | |
Defined in Control.Monad.Error.Class Methods throwError :: e -> WriterT w m a Source # catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a Source # | |
| (Monoid w, MonadError e m) => MonadError e (RWST r w s m) | Since: mtl-2.3 |
Defined in Control.Monad.Error.Class Methods throwError :: e -> RWST r w s m a Source # catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a Source # | |
| (Monoid w, MonadError e m) => MonadError e (RWST r w s m) | |
Defined in Control.Monad.Error.Class Methods throwError :: e -> RWST r w s m a Source # catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a Source # | |
| (Monoid w, MonadError e m) => MonadError e (RWST r w s m) | |
Defined in Control.Monad.Error.Class Methods throwError :: e -> RWST r w s m a Source # catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a Source # | |
| MonadError e m => MonadError e (DefT key uni fun ann m) | |
Defined in PlutusIR.Compiler.Definitions Methods throwError :: e -> DefT key uni fun ann m a Source # catchError :: DefT key uni fun ann m a -> (e -> DefT key uni fun ann m a) -> DefT key uni fun ann m a Source # | |
| ThrowableBuiltins uni fun => MonadError (CekEvaluationException NamedDeBruijn uni fun) (CekM uni fun s) | |
Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal Methods throwError :: CekEvaluationException NamedDeBruijn uni fun -> CekM uni fun s a Source # catchError :: CekM uni fun s a -> (CekEvaluationException NamedDeBruijn uni fun -> CekM uni fun s a) -> CekM uni fun s a Source # | |