Skip to content

Commit c8a9151

Browse files
Add comments
1 parent 2cdb15a commit c8a9151

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/BotPlutusInterface/CardanoCLI.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ queryTxOuts txIds = do
197197
TxIdsResponse chainTxs -> Right $ foldMap (fmap (sortTxOut . fst) . txOutRefMap) chainTxs
198198
_ -> Left "Wrong PAB response"
199199
where
200+
-- Keep values in TxOuts sorted for deterministic ToData conversion
200201
sortTxOut :: TxOut -> TxOut
201202
sortTxOut txOut = txOut {txOutValue = sortValue $ txOutValue txOut}
202203

@@ -218,6 +219,9 @@ getTxInInfos txOutRefs = do
218219
toEither :: Maybe TxInInfo -> Either Text TxInInfo
219220
toEither = maybeToRight "Couldn't find TxOut"
220221

222+
{- | Builds the TxInfo for direct Data conversion and usage "onchain"
223+
Must keep all inputs and values ordered for determinism
224+
-}
221225
buildTxInfo ::
222226
forall (w :: Type) (effs :: [Type -> Type]).
223227
Member (PABEffect w) effs =>

0 commit comments

Comments
 (0)