Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Members list
Value members
Concrete methods
Factory method to create a PlutusScriptEvaluator instance with custom evaluation logic.
Factory method to create a PlutusScriptEvaluator instance with custom evaluation logic.
This allows injecting custom evaluation behavior for testing or specialized scenarios.
Value parameters
- evalBudget
-
Function that computes execution units for a given redeemer and script
Attributes
- Returns
-
PlutusScriptEvaluator instance using the provided evaluation function
Factory method to create a PlutusScriptEvaluator instance.
Factory method to create a PlutusScriptEvaluator instance.
Value parameters
- initialBudget
-
The budget of the whole transaction. In
EvaluateAndComputeCostmode each script runs within what the scripts before it left, and exceeding it is a budget failure.Validatemode limits each script by its redeemer's declared units instead. - logBudgetDifferences
-
If true, logs differences between original redeemer budgets and computed budgets. Useful for debugging budget discrepancies. Default is false.
Attributes
Factory method taking a typed EvaluatorReportConfig instead of the legacy boolean.
Factory method taking a typed EvaluatorReportConfig instead of the legacy boolean.
Environment overrides (SCALUS_DUMP* / SCALUS_PROFILE*) are layered on top of report field-by-field; see EvaluatorReportConfig.fromEnv.
Attributes
As the factory above, keeping scripts in scriptCache across the transactions it evaluates, so each script is hashed and decoded once. The cache can be shared between evaluators.
As the factory above, keeping scripts in scriptCache across the transactions it evaluates, so each script is hashed and decoded once. The cache can be shared between evaluators.
Attributes
Creates a PlutusScriptEvaluator from CardanoInfo.
Creates a PlutusScriptEvaluator from CardanoInfo.
Value parameters
- cardanoInfo
-
The CardanoInfo containing protocol parameters and slot configuration
- mode
-
The evaluator mode
Attributes
Build all script contexts for Plutus scripts in a transaction without evaluation.
Build all script contexts for Plutus scripts in a transaction without evaluation.
This method extracts all Plutus script redeemers from a transaction and builds their corresponding script contexts (V1, V2, or V3) based on the script version.
Useful for testing and debugging scenarios where you need to inspect script contexts without actually executing the scripts.
Value parameters
- protocolVersion
-
Protocol version for validation rules Unlike the evaluator, it skips a needed script that the tx does not provide and a needed script without a redeemer, and it builds the context of a V1 or V2 spend without a datum.
- slotConfig
-
Slot configuration for time conversions
- tx
-
The transaction containing Plutus scripts and redeemers
- utxos
-
The UTxO set for resolving spent outputs
Attributes
- Returns
-
Map from Redeemer to ScriptContext (union type: v1 | v2 | v3)
- Throws
-
java.lang.IllegalArgumentException
if the tx cannot be translated to the context of a script's language, for example a V1 or V2 script in a tx with a donation
java.lang.IllegalStateExceptionif the tx cannot be translated to the context of a script's language for another reason, for example an inline datum in a tx with a V1 script
java.lang.UnsupportedOperationExceptionif any redeemer's script is
Script.PlutusV4— V4 evaluation is not yet implementedscalus.cardano.ledger.TransactionException.BadInputsUTxOExceptionif an input is not in
utxosscalus.cardano.ledger.TransactionException.BadReferenceInputsUTxOExceptionif a reference input is not in
utxos
Factory method to create a PlutusScriptEvaluator instance that always returns a constant budget.
Factory method to create a PlutusScriptEvaluator instance that always returns a constant budget.
This is useful for testing scenarios where you want to simulate script evaluations without executing actual logic.
Value parameters
- budget
-
The constant execution units to return for any script evaluation
Attributes
- Returns
-
PlutusScriptEvaluator instance that always returns the specified budget
Factory method to create a PlutusScriptEvaluator instance that uses the maximum budget defined in Cardano protocol parameters.
Factory method to create a PlutusScriptEvaluator instance that uses the maximum budget defined in Cardano protocol parameters.
This is useful for testing scenarios where you want to simulate script evaluations with the maximum allowed resources.
Value parameters
- cardanoInfo
-
The CardanoInfo containing protocol parameters
Attributes
- Returns
-
PlutusScriptEvaluator instance that always returns the maximum budget
Concrete fields
A no-op evaluator that returns empty sequences.
A no-op evaluator that returns empty sequences.
Useful for testing scenarios where script evaluation is not needed, such as transaction building tests that don't require actual Plutus script execution.