-
Notifications
You must be signed in to change notification settings - Fork 720
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
Update Cardano.Api.Tx in preparation for Alonzo #2642
Conversation
860d2c3
to
c38e2c9
Compare
aa10055
to
5ade9b9
Compare
07752b8
to
134b792
Compare
134b792
to
8c34b3c
Compare
@@ -878,6 +878,9 @@ data TxBody era where | |||
-- witnesses set, since they need to be known when building the body. | |||
-> [Ledger.Script (ShelleyLedgerEra era)] | |||
|
|||
--TODO: we will probably want to or need to put the Alonzo data and |
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.
👍
51d7684
to
3e7cc16
Compare
d307dec
to
14e41aa
Compare
bors merge |
👎 Rejected by label |
2e3a97b
to
14e41aa
Compare
e487ee2
to
2a9e029
Compare
2a9e029
to
e633016
Compare
Including Alonzo constructors for the "feature X supported in era" GADTs used in TxBody.
This manages to keep a single era-generic implementation, rather than having to do a case split on Alonzo vs the other Shelley-based eras.
The Ledger.Tx is the type family indexed on the era, while Shelley.Tx is a specific type for the Shelley era (but also used by Allegra and Mary).
Several of the easy straightforward ones. Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
It turns out that the serialiseToCBOR side did not need to do case analysis on the era at all.
Specifically the Alonzo cases for the getTxBody and getTxWitnesses helper functions used by the Tx pattern on the destructor side. Also the Alonzo case for makeSignedTransaction. There are still TODOs here to construct the dataum and redeemer mappings. Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
A bunch more of the easy ones.
Still a TODO for the Alonzo tx out data hash.
Still TODOs for the aux script data.
Still several TODOs for the new and changed fields.
We will use Hash ScriptData in the tx out datum hash.
But do export the representations from the Byron and Shelley API modules since those are supposed to expose the representations.
Both depending on the feature GADT ScriptDataSupportedInEra which covers only the Alonzo era. The TxOutDatumHash ptionally contains a Hash ScriptData. It will be added to the TxOut as a 3rd component. The TxAuxScriptData is like TxAuxScripts but for script data rather than scripts. It will be added to the TxBodyContent record. This commit just adds the types but does not yet use them.
Not yet supported in the CLI.
6fe08a3
to
27010f0
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.
I'm happy with this now.
Follow-up commits are now in #2738, in particular the redeemer map stuff.
bors merge |
Build succeeded: |
Depends on: