ProviderTxEvaluator

class cometa.providers.provider_tx_evaluator.ProviderTxEvaluator(provider)[source]

Bases: object

Transaction evaluator that uses a provider’s evaluation API.

This evaluator wraps any Provider that implements ProviderProtocol and uses its evaluate_transaction method to compute execution units for Plutus scripts. It implements the TxEvaluatorProtocol interface.

Parameters:

provider (ProviderProtocol)

get_name()[source]

Get the human-readable name of this evaluator.

Returns:

The evaluator name (derived from the provider name).

Return type:

str

property provider: ProviderProtocol

The Provider used by this evaluator.

evaluate(transaction, additional_utxos)[source]

Evaluate the execution units required for a transaction.

This method uses the provider’s evaluation API to calculate the execution units needed for each Plutus script in the transaction.

Parameters:
  • transaction (Transaction) – The transaction to evaluate.

  • additional_utxos (Union['UtxoList', List['Utxo'], None]) – Optional additional UTXOs needed for evaluation.

Returns:

A list of Redeemer objects with computed execution units.

Raises:

CardanoError – If evaluation fails.

Return type:

List[‘Redeemer’]