scalus.cardano.ledger.PlutusScriptEvaluationException
See thePlutusScriptEvaluationException companion object
class PlutusScriptEvaluationException(message: String, cause: Throwable, val logs: Array[String], val failedScriptHash: ScriptHash, val spentBudget: ExUnits, val failedSourcePosition: Option[ScalusSourcePos], val redeemer: Option[Redeemer], val script: Option[PlutusScript], val args: Seq[Data]) extends RuntimeException
Plutus script evaluation exception during phase-2 validation of a transaction.
Thrown by PlutusScriptEvaluator when the script of redeemer fails: it evaluates error, exhausts its budget, gets an error from a builtin, or (Plutus V3) returns something other than unit. getCause says which. A cause that is not a scalus.uplc.eval.MachineError is a defect in Scalus, not a problem with the script.
Spend[0] failed: Error term evaluated
script: 5a4b…e1
spent budget: { mem: 12031, steps: 4830112 }
logs:
checking signatures
To run the failing script again on its own:
given PlutusVM = PlutusVM.makePlutusV3VM()
e.args.foldLeft(e.script.get.deBruijnedProgram)(_.applyArg(_)).evaluateDebug
redeemer and script are None, and args is empty, only for an exception built through the pre-1.3 constructor.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class RuntimeExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass Any
Members list
In this article