cardano-rpc
Safe HaskellNone
LanguageHaskell2010

Cardano.Rpc.Server.Internal.UtxoRpc.Type.TxEval

Synopsis

Documentation

mkProtoTxEval Source #

Arguments

:: Coin

Computed minimum fee

-> Map ScriptWitnessIndex (Either ScriptExecutionError ([Text], ExecutionUnits))

Per-redeemer evaluation results: script traces and execution units on success, or a script execution error on failure

-> Map ScriptWitnessIndex (ScriptData, ByteString)

Redeemer Plutus data extracted from the transaction witness set, keyed by script witness index, with decoded payload and CBOR bytes.

-> Proto TxEval 

Assemble a proto TxEval response from the computed fee, per-redeemer evaluation results, and redeemer Plutus data from the transaction witness set.

mkProtoRedeemer Source #

Arguments

:: ScriptWitnessIndex

Redeemer purpose and index

-> ExecutionUnits

Execution units consumed

-> Maybe (ScriptData, ByteString)

Plutus data payload and its CBOR bytes

-> Proto Redeemer 

Assemble a proto Redeemer from evaluation results and transaction witness data.

scriptExecutionErrorToEvalReport :: ScriptWitnessIndex -> ScriptExecutionError -> Proto EvalReport Source #

Convert a ScriptExecutionError into a proto EvalReport with the redeemer purpose and 0-based index that produced the error.

scriptWitnessIndexToRedeemerPurpose :: ScriptWitnessIndex -> (Proto RedeemerPurpose, Word32) Source #

Map a ScriptWitnessIndex to the corresponding proto RedeemerPurpose and the numeric index within that purpose.