plutus-ledger-api-1.0.0.1: Interface to the Plutus ledger for the Cardano ledger.
Safe Haskell None
Language Haskell2010

Plutus.V1.Ledger.EvaluationContext

Synopsis

Documentation

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 recomputed on every evaluation.

There are two sets of parameters: one is with immediate unlifting and the other one is with deferred unlifting. We have to keep both of them, because depending on the language version either one has to be used or the other. We also compile them separately due to all the inlining and optimization that need to happen for things to be efficient.

mkEvaluationContext :: MonadError CostModelApplyError m => CostModelParams -> m EvaluationContext Source #

Build the EvaluationContext .

The input is a Map of strings to cost integer values (aka CostModelParams , CostModel ) See Note [Inlining meanings of builtins].

costModelParamNames :: Set Text Source #

The set of valid names that a cost model parameter can take for this language version. It is used for the deserialization of CostModelParams .

costModelParamsForTesting :: CostModelParams Source #

The raw cost model params, only to be used for testing purposes.

evalCtxForTesting :: EvaluationContext Source #

only to be for testing purposes: make an evaluation context by applying an empty set of protocol parameters