| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Rpc.Server.Internal.UtxoRpc.Type.TxEval
Synopsis
- mkProtoTxEval :: Coin -> Map ScriptWitnessIndex (Either ScriptExecutionError ([Text], ExecutionUnits)) -> Map ScriptWitnessIndex (ScriptData, ByteString) -> Proto TxEval
- mkProtoRedeemer :: ScriptWitnessIndex -> ExecutionUnits -> Maybe (ScriptData, ByteString) -> Proto Redeemer
- scriptExecutionErrorToEvalReport :: ScriptWitnessIndex -> ScriptExecutionError -> Proto EvalReport
- scriptWitnessIndexToRedeemerPurpose :: ScriptWitnessIndex -> (Proto RedeemerPurpose, Word32)
Documentation
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.
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.