-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add witness and redeemer to view #861
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to keep this generic. We should not be pattern matching on era specific constructors. We want the redeemer map: Map (PlutusPurpose AsIx era) (Data era, ExUnits)
which can be accessed from the ledger's Tx
via a lens (or series of lenses).
Then use:
redeemerPointerInverse ::
TxBody era ->
PlutusPurpose AsIx era ->
StrictMaybe (PlutusPurpose AsIxItem era)
and class methods like toSpendingPurpose
to get the actual thing the plutus script is witnessing.
ae9ec8f
to
dfcade3
Compare
cardano-cli/test/cardano-cli-golden/files/golden/babbage/transaction-view-redeemer.out
Outdated
Show resolved
Hide resolved
… instead of `CardanoEra era`
4b12878
to
b42ad1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I left a couple of comments. I would say definitely factor out the rendering of AsIxItem
.
Changelog
Context
#664 added redeemers to the output of
cardano-cli transaction view
but it is difficult to know which one corresponds to which when there are several. This PR addresses this by showing this information paired with each redeemer.How to trust this PR
Ensure that the new structure makes sense, that it looks good in the updated tests. And I am not so confident about how what the indexes correspond to, so probably verify that
Checklist