Skip to content

Commit

Permalink
Merge pull request #407 from input-output-hk/mgalazyn/fix/enable-inli…
Browse files Browse the repository at this point in the history
…ne-datums-in-babbage

#406 Enable use of inline datums in Babbage era transactions
  • Loading branch information
carbolymer authored Oct 27, 2023
2 parents fced0aa + 9d025e8 commit 98f3773
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -766,9 +766,11 @@ toTxOutInAnyEra era (TxOutAnyEra addr' val' mDatumHash refScriptFp) = do
TxOutDatumByValue sDataOrFile -> do
sData <- firstExceptT TxCmdScriptDataError $ readScriptDataOrFile sDataOrFile
pure (TxOutDatumInTx supp sData)
TxOutInlineDatumByValue _ ->
txFeatureMismatch era TxFeatureInlineDatums

TxOutInlineDatumByValue sDataOrFile -> do
let cEra = alonzoEraOnwardsToCardanoEra supp
babbageOnwards <- maybe (txFeatureMismatch cEra TxFeatureInlineDatums) pure $ forEraMaybeEon cEra
sData <- firstExceptT TxCmdScriptDataError $ readScriptDataOrFile sDataOrFile
pure $ TxOutDatumInline babbageOnwards sData

-- TODO: Currently we specify the policyId with the '--mint' option on the cli
-- and we added a separate '--policy-id' parser that parses the policy id for the
Expand Down

0 comments on commit 98f3773

Please sign in to comment.