Skip to content

Commit

Permalink
Address comments by @Jimbo4350
Browse files Browse the repository at this point in the history
  • Loading branch information
palas committed Aug 8, 2024
1 parent 99c1712 commit 9d7e0ac
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions cardano-testnet/src/Testnet/Process/Cli/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ data ReferenceScriptJSON
data TxOutAddress = PubKeyAddress PaymentKeyInfo
| ReferenceScriptAddress (File ReferenceScriptJSON In)
-- ^ The output will be created at the script address
-- and the output will include the reference script.

-- | Calls @cardano-cli@ to build a simple ADA transfer transaction to
-- the specified outputs of the specified amount of ADA. In the case of
-- a reference script address, the output will be the corresponding script
-- address, and the script will be published as a reference script in
-- the output.
-- a reference script address, the output will be created at the
-- corresponding script address, and the output will contain the reference
-- script.
--
-- Returns the generated @File TxBody In@ file path to the created unsigned
-- transaction file.
Expand All @@ -77,12 +78,14 @@ mkSpendOutputsOnlyTx execConfig epochStateView sbe work prefix srcWallet txOutpu

txIn <- findLargestUtxoForPaymentKey epochStateView sbe srcWallet
fixedTxOuts :: [String] <- computeTxOuts
void $ execCli' execConfig $
[ anyEraToString cEra, "transaction", "build"
, "--change-address", srcAddress
, "--tx-in", T.unpack $ renderTxIn txIn
] ++ fixedTxOuts ++
[ "--out-file", unFile txBody
void $ execCli' execConfig $ mconcat
[ [ anyEraToString cEra, "transaction", "build"
, "--change-address", srcAddress
, "--tx-in", T.unpack $ renderTxIn txIn
]
, fixedTxOuts
, [ "--out-file", unFile txBody
]
]
return txBody
where
Expand Down

0 comments on commit 9d7e0ac

Please sign in to comment.