File tree Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ library
8282 BotPlutusInterface.ChainIndex
8383 BotPlutusInterface.Contract
8484 BotPlutusInterface.Effects
85- BotPlutusInterface.Estimate
85+ BotPlutusInterface.ExBudget
8686 BotPlutusInterface.Files
8787 BotPlutusInterface.Helpers
8888 BotPlutusInterface.QueryNode
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ balanceTxIO pabConf ownPkh unbalancedTx =
136136 txWithoutFees <-
137137 hoistEither $ balanceTxStep minUtxos utxoIndex changeAddr $ tx `withFee` 0
138138
139- exBudget <- newEitherT $ BodyBuilder. buildRaw @ w pabConf privKeys txWithoutFees
139+ exBudget <- newEitherT $ BodyBuilder. buildAndEstimateBudget @ w pabConf privKeys txWithoutFees
140140
141141 nonBudgettedFees <- newEitherT $ CardanoCLI. calculateMinFee @ w pabConf txWithoutFees
142142
Original file line number Diff line number Diff line change 33{- | Module provides the way of building ".raw" transactions with execution budget
44 estimated with `Cardano.Api` tools.
55-}
6- module BotPlutusInterface.BodyBuilder (buildRaw ) where
6+ module BotPlutusInterface.BodyBuilder (buildAndEstimateBudget ) where
77
88import BotPlutusInterface.CardanoCLI qualified as CardanoCLI
99import BotPlutusInterface.Effects (PABEffect , estimateBudget )
@@ -28,14 +28,14 @@ import Prelude
2828 then uses body of this transaction to estimate execution budget
2929 and build final body with budget set.
3030-}
31- buildRaw ::
31+ buildAndEstimateBudget ::
3232 forall (w :: Type ) (effs :: [Type -> Type ]).
3333 Member (PABEffect w ) effs =>
3434 PABConfig ->
3535 Map PubKeyHash DummyPrivKey ->
3636 Tx ->
3737 Eff effs (Either Text ExBudget )
38- buildRaw pabConf privKeys tx = runEitherT $ do
38+ buildAndEstimateBudget pabConf privKeys tx = runEitherT $ do
3939 buildDraftTxBody
4040 >> estimateBudgetByDraftBody (Text. unpack $ txFilePath pabConf " raw" (txId tx))
4141 >>= buildBodyUsingEstimatedBudget
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ writeBalancedTx contractEnv (Right tx) = do
249249 skeys = Map. filter (\ case FromSKey _ -> True ; FromVKey _ -> False ) privKeys
250250 signable = all ((`Map.member` skeys) . Ledger. pubKeyHash) requiredSigners
251251
252- void $ newEitherT $ BodyBuilder. buildRaw @ w pabConf privKeys tx
252+ void $ newEitherT $ BodyBuilder. buildAndEstimateBudget @ w pabConf privKeys tx
253253
254254 -- TODO: This whole part is hacky and we should remove it.
255255 let path = Text. unpack $ Files. txFilePath pabConf " raw" (Tx. txId tx)
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ module BotPlutusInterface.Effects (
2323) where
2424
2525import BotPlutusInterface.ChainIndex (handleChainIndexReq )
26- import BotPlutusInterface.Estimate qualified as Estimate
26+ import BotPlutusInterface.ExBudget qualified as ExBudget
2727import BotPlutusInterface.Types (
2828 BudgetEstimationError ,
2929 CLILocation (.. ),
@@ -131,7 +131,7 @@ handlePABEffect contractEnv =
131131 QueryChainIndex query ->
132132 handleChainIndexReq contractEnv. cePABConfig query
133133 EstimateBudget txPath ->
134- Estimate . estimateBudget contractEnv. cePABConfig txPath
134+ ExBudget . estimateBudget contractEnv. cePABConfig txPath
135135 )
136136
137137printLog' :: LogLevel -> LogLevel -> String -> IO ()
Original file line number Diff line number Diff line change 11-- | Module contains implementation for `estimateBudget` effect
2- module BotPlutusInterface.Estimate (
2+ module BotPlutusInterface.ExBudget (
33 estimateBudget ,
44) where
55
You can’t perform that action at this time.
0 commit comments