Skip to content

Commit

Permalink
#406 Enable use of inline datums in Babbage era transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed Oct 27, 2023
1 parent fced0aa commit 46fda57
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
forEraInEon cEra (txFeatureMismatch cEra TxFeatureInlineDatums) $ \babbageOnwards -> do
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 46fda57

Please sign in to comment.