Plutus.V1.Ledger.EvaluationContext
1. π Overview
2. π§ LANGUAGE PRAGMAS, OPTIONS, AND IMPORTS
3. ποΈ Type Synonyms and Data Types
3.1 π€ SerializedScript (type)
3.2 π LedgerPlutusVersion (data)
3.3 π’ ProtocolVersion (data)
3.4 π§ͺ EvaluationError (data)
3.5 π VerboseMode (data)
3.6 π οΈ ScriptForExecution (newtype)
3.7 ποΈ EvaluationContext (data)
4. βοΈ Core Functions
4.1 π builtinsIntroducedIn
4.2 π builtinsAvailableIn
4.3 π οΈ scriptCBORDecoder
4.4 β isScriptWellFormed
4.5 βοΈ mkTermToEvaluate
4.6 π unliftingModeIn
4.7 π§ toMachineParameters
4.8 π οΈ mkMachineParametersFor
4.9 ποΈ mkEvaluationContext
4.10 βοΈ assertWellFormedCostModelParams
4.11 π evaluateScriptRestricting
4.12 π¨ evaluateScriptCounting
5. π€ Typeclass Instances
6. π On-Chain Derivations
7. π Glossary
1 π Overview
This updated Plutus.ApiCommon module variant adds StrictData to ensure all fields are strict, and retains the extensive evaluation and serialization tools:
Strict data fields to avoid laziness-related thunks.
Configures GHC simplifier tick budget.
Defines
SerializedScript, versioning types, error types, logging, and evaluation context.Core functions for decoding, checking well-formedness, and running scripts under cost constraints.
2 π§ LANGUAGE PRAGMAS, OPTIONS, AND IMPORTS
StrictData: makes all fields in data types strict by default.
-fsimpl-tick-factor: increases simplifier ticks.
Imports: identical to previous, importing Plutus Core, CBOR, control, and utility modules.
3 ποΈ Type Synonyms and Data Types
3.1 π€ SerializedScript
3.2 π LedgerPlutusVersion
3.3 π’ ProtocolVersion
3.4 π§ͺ EvaluationError
3.5 π VerboseMode
3.6 π οΈ ScriptForExecution
3.7 ποΈ EvaluationContext
4 βοΈ Core Functions
See Section 4 of the previous ApiCommon tutorial for detailed code, inputs, processing, and outputs. This variant is strictly data-strict but function signatures and behavior remain unchanged.
5 π€ Typeclass Instances
Identical to the earlier walkthrough:
OrdforProtocolVersionPrettyforProtocolVersionandEvaluationErrorNo change in instance definitions beyond strictness in data.
6 π On-Chain Derivations
Same makeIsDataIndexed and makeLift calls as before; unaffected by StrictData.
7 π Glossary
All terms match the previous glossary, with the addition of:
StrictData: pragma making all data fields strict, preventing thunks.
NoThunks: class ensuring absence of unexpected laziness in data structures.
Last updated