diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs index c59ace374..e4b1018e7 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs @@ -1313,7 +1313,7 @@ toTxAlonzoDatum supp cliDatum = pure (TxOutDatumHash supp $ hashScriptDataBytes sData) TxOutDatumByValue sDataOrFile -> do sData <- firstExceptT TxCmdScriptDataError $ readScriptDataOrFile sDataOrFile - pure (TxOutDatumInTx supp sData) + pure (TxOutSupplementalDatum supp sData) TxOutInlineDatumByValue sDataOrFile -> do let cEra = toCardanoEra supp forEraInEon cEra (txFeatureMismatch cEra TxFeatureInlineDatums) $ \babbageOnwards -> do diff --git a/cardano-cli/src/Cardano/CLI/Json/Friendly.hs b/cardano-cli/src/Cardano/CLI/Json/Friendly.hs index 8549ae2a2..8c95c4bf3 100644 --- a/cardano-cli/src/Cardano/CLI/Json/Friendly.hs +++ b/cardano-cli/src/Cardano/CLI/Json/Friendly.hs @@ -212,7 +212,6 @@ friendlyTxBodyImpl txValidityUpperBound txMetadata txAuxScripts - txSupplementalData txExtraKeyWits _txProtocolParams txWithdrawals @@ -252,10 +251,6 @@ friendlyTxBodyImpl era (`getRedeemerDetails` tb) ) - ++ ( monoidForEraInEon @AlonzoEraOnwards - era - (`friendlySupplementalDatums` txSupplementalData) - ) ++ ( monoidForEraInEon @ConwayEraOnwards era ( \cOnwards -> @@ -293,16 +288,6 @@ friendlyTxBodyImpl friendlyLedgerProposals cOnwards proposalProcedures = Array $ fromList $ map (friendlyLedgerProposal cOnwards) proposalProcedures --- | API doesn't yet show that supplemental datums are alonzo onwards. So we do it in this function prototype, --- even if we don't use the witness. -friendlySupplementalDatums - :: AlonzoEraOnwards era -> BuildTxWith build (TxSupplementalDatums era) -> [Aeson.Pair] -friendlySupplementalDatums _era = \case - ViewTx -> [] - BuildTxWith TxSupplementalDataNone -> [] - BuildTxWith (TxSupplementalDatums hashableScriptDatas) -> - ["supplemental datums" .= toJSON hashableScriptDatas] - friendlyLedgerProposal :: ConwayEraOnwards era -> L.ProposalProcedure (ShelleyLedgerEra era) -> Aeson.Value friendlyLedgerProposal cOnwards proposalProcedure = object $ friendlyProposalImpl cOnwards (Proposal proposalProcedure) @@ -483,7 +468,7 @@ friendlyTxOut era (TxOut addr amount mdatum script) = renderDatum = \case TxOutDatumNone -> Nothing TxOutDatumHash _ h -> Just $ toJSON h - TxOutDatumInTx _ sData -> Just $ scriptDataToJson ScriptDataJsonDetailedSchema sData + TxOutSupplementalDatum _ sData -> Just $ scriptDataToJson ScriptDataJsonDetailedSchema sData TxOutDatumInline _ sData -> Just $ scriptDataToJson ScriptDataJsonDetailedSchema sData friendlyStakeReference :: StakeAddressReference -> Aeson.Value