Evaluator

scalus.testing.eval.Evaluator
object Evaluator

Core evaluation functions - framework agnostic, pure functions returning Result.

These primitives form the foundation of the testing API.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Evaluator.type

Members list

Value members

Concrete methods

def evalCompiled[A](compiled: Compiled[A])(using vm: PlutusVM): Result

Evaluate a Compiled script.

Evaluate a Compiled script.

This evaluates the already-lowered UPLC program from the Compiled instance.

Value parameters

compiled

The compiled script

vm

The PlutusVM to use

Attributes

Returns

Result of evaluation

def evalMulti(sir: SIR, config: EvalConfig = ...): MultiEvalResult

Evaluate SIR across multiple backends and VMs.

Evaluate SIR across multiple backends and VMs.

Value parameters

config

Evaluation configuration

sir

The SIR to evaluate

Attributes

Returns

MultiEvalResult with results from all backends/VMs

def evalProgram(program: Program)(using vm: PlutusVM): Result

Evaluate a Program on a specific PlutusVM.

Evaluate a Program on a specific PlutusVM.

Value parameters

program

The UPLC program to evaluate

vm

The PlutusVM to use for evaluation

Attributes

Returns

Result containing success/failure with budget and logs

def evalSIR(sir: SIR, backend: TargetLoweringBackend = ..., generateErrorTraces: Boolean = ...)(using vm: PlutusVM): Result

Evaluate SIR by lowering to UPLC and evaluating.

Evaluate SIR by lowering to UPLC and evaluating.

Value parameters

backend

The lowering backend to use

generateErrorTraces

Whether to include error traces

sir

The SIR to evaluate

vm

The PlutusVM to use

Attributes

Returns

Result of evaluation

def evalTerm(term: Term)(using vm: PlutusVM): Result

Evaluate a Term on a specific PlutusVM.

Evaluate a Term on a specific PlutusVM.

Value parameters

term

The UPLC term to evaluate

vm

The PlutusVM to use for evaluation

Attributes

Returns

Result containing success/failure with budget and logs