ScalusTransactionEvaluator

scalus.bloxbean.ScalusTransactionEvaluator
class ScalusTransactionEvaluator(val slotConfig: SlotConfig, val protocolParams: ProtocolParams, val utxoSupplier: UtxoSupplier, val scriptSupplier: ScriptSupplier, val mode: EvaluatorMode, val debugDumpFilesForTesting: Boolean = ...) extends TransactionEvaluator

Implements com.bloxbean.cardano.client.api.TransactionEvaluator to evaluate a transaction to get script costs using Scalus' scalus.cardano.ledger.PlutusScriptEvaluator.

Value parameters

debugDumpFilesForTesting

If true, dumps script files for testing purposes

mode

Evaluator mode.

  • scalus.bloxbean.EvaluatorMode.EVALUATE_AND_COMPUTE_COST will evaluate the transaction and compute the cost
  • scalus.bloxbean.EvaluatorMode.VALIDATE will validate the transaction and fail if execution budget exceeds
protocolParams

Protocol parameters

scriptSupplier

Additional script supplier

slotConfig

Slot configuration

utxoSupplier

Utxo supplier

Attributes

Graph
Supertypes
trait TransactionEvaluator
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(protocolParams: ProtocolParams, utxoSupplier: UtxoSupplier, scriptSupplier: ScriptSupplier, mode: EvaluatorMode)

Constructor with protocol params, utxo supplier, script supplier and mode. Uses scalus.cardano.ledger.SlotConfig.mainnet.

Constructor with protocol params, utxo supplier, script supplier and mode. Uses scalus.cardano.ledger.SlotConfig.mainnet.

Attributes

def this(protocolParams: ProtocolParams, utxoSupplier: UtxoSupplier)

Constructor with protocol params and utxo supplier. Uses scalus.bloxbean.EvaluatorMode.EVALUATE_AND_COMPUTE_COST mode and scalus.cardano.ledger.SlotConfig.mainnet.

Constructor with protocol params and utxo supplier. Uses scalus.bloxbean.EvaluatorMode.EVALUATE_AND_COMPUTE_COST mode and scalus.cardano.ledger.SlotConfig.mainnet.

Value parameters

protocolParams

Protocol parameters

utxoSupplier

Utxo supplier

Attributes

def this(slotConfig: SlotConfig, protocolParams: ProtocolParams, utxoSupplier: UtxoSupplier)

Constructor with slot config, protocol params and utxo supplier. Uses scalus.bloxbean.EvaluatorMode.EVALUATE_AND_COMPUTE_COST mode.

Constructor with slot config, protocol params and utxo supplier. Uses scalus.bloxbean.EvaluatorMode.EVALUATE_AND_COMPUTE_COST mode.

Value parameters

protocolParams

Protocol parameters

slotConfig

Slot configuration

utxoSupplier

Utxo supplier

Attributes

def this(protocolParams: ProtocolParams, utxoSupplier: UtxoSupplier, scriptSupplier: ScriptSupplier)

Constructor with protocol params, utxo supplier and script supplier. Uses scalus.cardano.ledger.SlotConfig.mainnet and scalus.bloxbean.EvaluatorMode.EVALUATE_AND_COMPUTE_COST mode.

Constructor with protocol params, utxo supplier and script supplier. Uses scalus.cardano.ledger.SlotConfig.mainnet and scalus.bloxbean.EvaluatorMode.EVALUATE_AND_COMPUTE_COST mode.

Value parameters

protocolParams

Protocol parameters

scriptSupplier

Additional script supplier

utxoSupplier

Utxo supplier

Attributes

def this(slotConfig: SlotConfig, protocolParams: ProtocolParams, utxoSupplier: UtxoSupplier, scriptSupplier: ScriptSupplier)

Constructor with slot config, protocol params, utxo supplier and script supplier. Uses scalus.bloxbean.EvaluatorMode.EVALUATE_AND_COMPUTE_COST mode.

Constructor with slot config, protocol params, utxo supplier and script supplier. Uses scalus.bloxbean.EvaluatorMode.EVALUATE_AND_COMPUTE_COST mode.

Value parameters

protocolParams

Protocol parameters

scriptSupplier

Additional script supplier

slotConfig

Slot configuration

utxoSupplier

Utxo supplier

Attributes

Concrete methods

override def evaluateTx(transaction: Transaction, inputUtxos: Set[Utxo]): Result[List[EvaluationResult]]

Attributes

Definition Classes
TransactionEvaluator
override def evaluateTx(cbor: Array[Byte], inputUtxos: Set[Utxo]): Result[List[EvaluationResult]]

Attributes

Definition Classes
TransactionEvaluator

Deprecated methods

def evaluateTx(transaction: Transaction, inputUtxos: Set[Utxo], datums: List[ByteString], txhash: String): Result[List[EvaluationResult]]

Attributes

Deprecated
[Since version 0.14.2] No longer supported in the new API

Use the new PlutusScriptEvaluator API instead

def evaluateTxWithContexts(transaction: Transaction, inputUtxos: Set[Utxo], datums: List[ByteString], txhash: String): Either[TxEvaluationException, Seq[(EvaluationResult, ScriptContext)]]

Attributes

Deprecated
[Since version 0.14.2] No longer supported in the new API

Use the new PlutusScriptEvaluator API instead

Inherited methods

def evaluateTx(x$0: Array[Byte]): Result[List[EvaluationResult]]

Attributes

Inherited from:
TransactionEvaluator

Concrete fields

val mode: EvaluatorMode
val protocolParams: ProtocolParams
val utxoSupplier: UtxoSupplier

Deprecated fields

lazy val costMdls: CostMdls

Attributes

Deprecated
[Since version 0.14.2] No longer supported in the new API

Use the new PlutusScriptEvaluator API instead