PlutusVM

scalus.uplc.eval.PlutusVM
See thePlutusVM companion object
class PlutusVM(val language: PlutusLedgerLanguage, val machineParams: MachineParams, val semanticVariant: BuiltinSemanticsVariant, platformSpecific: PlatformSpecific)

Plutus VM facade.

  • Term is a representation of a UPLC term.
  • Term can be named, debruijned, or both.
  • Term can be evaluated by CekMachine
  • Program is a versioned UPLC term. 1.0.0 for Plutus V1 and V2, 1.1.0 for Plutus V3.
  • Plutus Script is a UPLC Program that should be evaluated according to the Plutus specification. This includes CIP-117.

Value parameters

language

The Plutus version

machineParams

The machine parameters

platformSpecific

The platform specific implementation of certain functions used by VM builtins

semanticVariant

The builtin semantics variant

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def evaluateDeBruijnedTerm(debruijnedTerm: Term, budgetSpender: BudgetSpender, logger: Logger): Term

Evaluates a debruijned term using the CEK machine. This method does not follow CIP-117.

Evaluates a debruijned term using the CEK machine. This method does not follow CIP-117.

Value parameters

budgetSpender

The budget spender

debruijnedTerm

The debruijned term

logger

The logger

Attributes

Returns

The evaluated term

def evaluateScript(program: DeBruijnedProgram, budgetSpender: BudgetSpender, logger: Logger): Term

Evaluates a Plutus script according to the Plutus specification.

Evaluates a Plutus script according to the Plutus specification.

This includes CIP-117.

Value parameters

budgetSpender

The budget spender

logger

The logger

program

The Plutus script

Attributes

Returns

The result of the evaluation. Must be Unit for Plutus V3.

Throws
RuntimeException

if the result is not valid

Evaluates a Plutus script according to the Plutus specification.

Evaluates a Plutus script according to the Plutus specification.

This includes CIP-117.

Value parameters

program

The Plutus script

Attributes

Returns

The result of the evaluation