Skip to content
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

[FR] - build transactions without outputs in cardano-cli #2223

Closed
refi93 opened this issue Dec 16, 2020 · 1 comment · Fixed by #2226
Closed

[FR] - build transactions without outputs in cardano-cli #2223

refi93 opened this issue Dec 16, 2020 · 1 comment · Fixed by #2226
Assignees
Labels
enhancement New feature or request

Comments

@refi93
Copy link

refi93 commented Dec 16, 2020

External

Area
Other cardano-cli

Describe the feature you'd like
Currently, there seems to be no way to serialize raw transactions that would not have an output, which may indeed be convenient when signing certificates where the inputs cover the fees exactly.

Example of a valid command (tx with one output):

cardano-cli shelley transaction build-raw --tx-in 89ba28b30e5eebc7d37c0123713b9e6089b90e07b3fb7d33979dc8d443df646e#1 --tx-out addr_test1qrwzf2dkeseu6mcv3jtw8muvseqz55np5529269lgg6fvap60uya8h6v7e488xwzkpdl5g6dtg54vrp3rlzaknzfqugse3ujve+50 --ttl 42 --fee 42 --out-file tx_example.raw

But this one (the same except missing output) fails with Missing: --tx-out TX-OUT error even though a tx with no outputs should technically be a valid tx, if I understand correctly:

cardano-cli shelley transaction build-raw --tx-in 89ba28b30e5eebc7d37c0123713b9e6089b90e07b3fb7d33979dc8d443df646e#1 --ttl 42 --fee 42 --out-file tx_no_out.raw
@refi93 refi93 added the enhancement New feature or request label Dec 16, 2020
@dcoutts
Copy link
Contributor

dcoutts commented Dec 17, 2020

diff --git a/cardano-cli/src/Cardano/CLI/Shelley/Parsers.hs b/cardano-cli/src/Cardano/CLI/Shelley/Parsers.hs
index e09e6a3f..08796631 100644
--- a/cardano-cli/src/Cardano/CLI/Shelley/Parsers.hs
+++ b/cardano-cli/src/Cardano/CLI/Shelley/Parsers.hs
@@ -501,7 +501,7 @@ pTransaction =
   pTransactionBuild :: Parser TransactionCmd
   pTransactionBuild = TxBuildRaw <$> pCardanoEra
                                  <*> some pTxIn
-                                 <*> some pTxOut
+                                 <*> many pTxOut
                                  <*> optional pMintMultiAsset
                                  <*> optional pInvalidBefore
                                  <*> optional pInvalidHereafter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants