You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to render the redeemer of a transaction using cardano-cli with the command: cardano-cli debug transaction view --output-json --tx-file ample.tx
The CLI shows the following error message: Error decoding redeemer: unexpected CBOR token type for a JSON value: TypeTag
Note: It also fails rendering with --output-yaml too.
Expected result: The redeemer should be rendered as part of the transaction data in JSON format.
Steps to Reproduce
Create a transaction that includes a redeemer.
Run the cardano-cli with the following command: cardano-cli debug transaction view --output-json --tx-file <path-to-tx-file>
Observe the error Error decoding redeemer: unexpected CBOR token type for a JSON value: TypeTag.
Additional Context
The error appears to occur while decoding the CBOR representation of the redeemer, where the redeemer's Plutus data contains tags. The decoding works correctly for redeemers using the Bigint Plutus type, such as [ 0, 0, 0, [123, 234]].
However, it fails when the redeemer contains tag-based Plutus types, such as [0, 0, 121([]), [123, 234]].
Cardano-cli just outputs null in the case of a redeemer containing a constructor (e.g. 121([]) ).
But we can verify that it indeed has a redeemer from manually decoding transaction cbor using https://cbor.me. The transaction decoding part should be looked into to facilitate tag-based plutus types.
Description
When attempting to render the redeemer of a transaction using cardano-cli with the command:
cardano-cli debug transaction view --output-json --tx-file ample.tx
The CLI shows the following error message:
Error decoding redeemer: unexpected CBOR token type for a JSON value: TypeTag
Expected result: The redeemer should be rendered as part of the transaction data in JSON format.
Steps to Reproduce
cardano-cli debug transaction view --output-json --tx-file <path-to-tx-file>
Error decoding redeemer: unexpected CBOR token type for a JSON value: TypeTag
.Additional Context
The error appears to occur while decoding the CBOR representation of the redeemer, where the redeemer's Plutus data contains tags. The decoding works correctly for redeemers using the Bigint Plutus type, such as
[ 0, 0, 0, [123, 234]]
.However, it fails when the redeemer contains tag-based Plutus types, such as
[0, 0, 121([]), [123, 234]]
.Cardano CLI version: 9.x.y.z (probably earlier are affected too).
Operating System: Ubuntu 22.04]
Possible Solution
A potential solution could involve reviewing the CBOR decoding logic to properly handle tags within redeemer data types.
The text was updated successfully, but these errors were encountered: