Skip to content

Commit

Permalink
Adapting to addition of supplementalData
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Oct 14, 2024
1 parent c9338c7 commit 2a7e32e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cardano-cli/src/Cardano/CLI/Json/Friendly.hs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ friendlyTxBodyImpl
txValidityUpperBound
txMetadata
txAuxScripts
txSupplementalData
txExtraKeyWits
_txProtocolParams
txWithdrawals
Expand Down Expand Up @@ -248,6 +249,7 @@ friendlyTxBodyImpl
, "return collateral" .= friendlyReturnCollateral era txReturnCollateral
, "required signers (payment key hashes needed for scripts)"
.= friendlyExtraKeyWits txExtraKeyWits
, "supplemental data" .= friendlySupplementalDatums txSupplementalData
, "update proposal" .= friendlyUpdateProposal txUpdateProposal
, "validity range" .= friendlyValidityRange era (txValidityLowerBound, txValidityUpperBound)
, "withdrawals" .= friendlyWithdrawals txWithdrawals
Expand Down Expand Up @@ -293,6 +295,12 @@ friendlyTxBodyImpl
friendlyLedgerProposals cOnwards proposalProcedures =
Array $ fromList $ map (friendlyLedgerProposal cOnwards) proposalProcedures

friendlySupplementalDatums :: BuildTxWith build (TxSupplementalDatums era) -> Aeson.Value
friendlySupplementalDatums = \case
ViewTx -> Aeson.Object mempty
BuildTxWith TxSupplementalDataNone -> Aeson.Object mempty
BuildTxWith (TxSupplementalDatums hashableScriptDatas) -> toJSON hashableScriptDatas

friendlyLedgerProposal
:: ConwayEraOnwards era -> L.ProposalProcedure (ShelleyLedgerEra era) -> Aeson.Value
friendlyLedgerProposal cOnwards proposalProcedure = object $ friendlyProposalImpl cOnwards (Proposal proposalProcedure)
Expand Down

0 comments on commit 2a7e32e

Please sign in to comment.