@@ -11,7 +11,7 @@ import BotPlutusInterface.Effects (
1111 PABEffect ,
1212 createDirectoryIfMissingCLI ,
1313 posixTimeRangeToContainedSlotRange ,
14- printLog ,
14+ printBpiLog ,
1515 )
1616import BotPlutusInterface.Files (DummyPrivKey , unDummyPrivateKey )
1717import BotPlutusInterface.Files qualified as Files
@@ -65,6 +65,7 @@ import Plutus.V1.Ledger.Api (
6565
6666import BotPlutusInterface.BodyBuilder qualified as BodyBuilder
6767import Data.Bifunctor (bimap )
68+ import Prettyprinter (pretty , viaShow , (<+>) )
6869import Prelude
6970
7071{- | Collect necessary tx inputs and collaterals, add minimum lovelace values and balance non ada
@@ -91,7 +92,7 @@ balanceTxIO pabConf ownPkh unbalancedTx =
9192 (unBalancedTxValidityTimeRange unbalancedTx)
9293 (unBalancedTxTx unbalancedTx)
9394
94- lift $ printLog @ w Debug $ show utxoIndex
95+ lift $ printBpiLog @ w Debug $ viaShow utxoIndex
9596
9697 -- We need this folder on the CLI machine, which may not be the local machine
9798 lift $ createDirectoryIfMissingCLI @ w False (Text. unpack " pcTxFileDir" )
@@ -135,7 +136,7 @@ balanceTxIO pabConf ownPkh unbalancedTx =
135136
136137 let minUtxos = prevMinUtxos ++ nextMinUtxos
137138
138- lift $ printLog @ w Debug $ " Min utxos: " ++ show minUtxos
139+ lift $ printBpiLog @ w Debug $ " Min utxos:" <+> pretty minUtxos
139140
140141 -- Calculate fees by pre-balancing the tx, building it, and running the CLI on result
141142 txWithoutFees <-
@@ -147,7 +148,7 @@ balanceTxIO pabConf ownPkh unbalancedTx =
147148
148149 let fees = nonBudgettedFees + getBudgetPrice (getExecutionUnitPrices pabConf) exBudget
149150
150- lift $ printLog @ w Debug $ " Fees: " ++ show fees
151+ lift $ printBpiLog @ w Debug $ " Fees:" <+> pretty fees
151152
152153 -- Rebalance the initial tx with the above fees
153154 balancedTx <- hoistEither $ balanceTxStep minUtxos utxoIndex changeAddr $ tx `withFee` fees
0 commit comments